Skip to content

Instantly share code, notes, and snippets.

@dklassen
Last active August 29, 2015 14:13
Show Gist options
  • Save dklassen/e64ed4c2e125c3c415fe to your computer and use it in GitHub Desktop.
Save dklassen/e64ed4c2e125c3c415fe to your computer and use it in GitHub Desktop.
Daily Commands I always forget.md

what is listening on a given port

lsof -n -i4TCP:8080 | grep LISTEN

Encrypt

% tar cz folder_to_encrypt | openssl enc -aes-256-cbc -e > out.tar.gz.enc

Decrypt

% openssl aes-256-cbc -d -in out.tar.gz.enc | tar xz

Kill jobs and Flush Swap

ls -1 /etc/sv | grep sql | xargs -I@ sv stop @ swapoff -a swapon -a

For that rare occasion you want to start up a smtp mail server (with python)

python -m smtpd -n -c DebuggingServer localhost:1025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment