Skip to content

Instantly share code, notes, and snippets.

@askmi
Last active October 29, 2022 18:54
Show Gist options
  • Save askmi/1319bc572f8734cc802b16eb507b9248 to your computer and use it in GitHub Desktop.
Save askmi/1319bc572f8734cc802b16eb507b9248 to your computer and use it in GitHub Desktop.

CHROME

/usr/bin/google-chrome-stable --enable-logging --v=1 --user-data-dir="/tmp/chrome-anonym" &

CURL

curl --http2 -sS  http://localhost:9088/management/readiness | jq 
https://everything.curl.dev/http/http2
https://serversforhackers.com/c/curl-with-http2-support

nc

nc -l -n -v -p 5555        // listen on port 5555
nc -n localhost 5555       // connect
nc -z -v localhost 1-65000 2>&1 | grep succeeded  // scan ports

BASH

$$ = The PID number of the process executing the shell.
$? = Exit status variable.
$0 = The name of the command you used to call a program.
$1 = The first argument on the command line.
$2 = The second argument on the command line.
$n = The nth argument on the command line.
$# The number of command line arguments.
$* = All the arguments on the command line.
$@ expands into a list of separate parameters
$- Options set using set builtin command
$_ Gives the last argument to the previous command. At the shell startup, it gives the absolute filename of the shell script being executed.

BASE 64

openssl base64 -e <<< 'Hello'
openssl base64 -d <<< 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK'

echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode
echo `echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode` // output (includes newline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment