mysql -h [HOST] -P [PORT] -u [USER] DB_NAME -e '[QUERY]' -p > [FILE_NAME].csv
sudo tcpdump -i any -n host [IP_ADDRESS]
sudo tcpdump -i any -nn -s0 -v src [IP_ADDRESS]
sudo tcpdump -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'
sudo mtr -n --report -c 1 [IP_ADDRESS]
networksetup -setdnsservers Wi-Fi 1.1.1.1 | curl -I google.com
Start a phx.server with node name and cookie
elixir --name [email protected] --cookie foobar -S mix phx.server
Use –remsh to start remote console
iex --name [email protected] --cookie foobar --remsh [email protected]
pg_dump --host localhost --port 5432 --username postgres --verbose --file "<abstract_file_path>" --table public.tablename dbname
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [user] -d [db] [filename].dump
or
psql --verbose --clean --no-acl --no-owner -h localhost -U [user] [filename].sql [db]
When used plain format option with pg_dump
socat TCP-LISTEN:8080,fork,reuseaddr TCP:google.com:443