Skip to content

Instantly share code, notes, and snippets.

@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@shaneutt
shaneutt / LICENSE
Last active November 20, 2025 09:11
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@zubaer-ahammed
zubaer-ahammed / Frequently Needed SSH Commands.md
Last active January 19, 2024 14:47
Frequently Needed SSH Commands ( Mostly Linux & Mac + PUTTY for windows)

Useful SSH Commands:

  1. first command: sudo whoami
  2. Create a file named "testfile": touch testfile
  3. make a directory named "testdir": mkdir testdir
  4. list or show all files and folders in a dir: ls
    • For showing hidden files also run this command with a flag: ls -a
  5. change directory: cd
  6. back on directory: cd ..
  7. go to the root directory: cd ~
@soarez
soarez / ca.md
Last active November 21, 2025 15:58
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.