Gists
I always forget how to do this kind of stuff.
Prevent automatic list numberic in markdown
1\. HelloRemove image metadata
$ exiftool -all= my_image.jpegCreate a text file of size N (around 20 MB)
yes hello | head -c 20000000 > sample.txtpsql enhancements
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%x%# ' \set PROMPT2 '[more] %R > ' \pset null '[NULL]' \x auto \set VERBOSITY verbose \set HISTFILE ~/.psql_history- :DBNAME \set HISTCONTROL ignoredups \set COMP_KEYWORD_CASE upperGPG (symmetric) decryption (echoing password)
$ echo $key | gpg --batch --yes --passphrase-fd 0 --output $1.plain --decrypt $1Base64 encoding
$ echo -n 'my-string' | base64Show octal file permissions
$ stat -c '%a' ~/.ssh/authorized_keysCreate parent directories as needed
$ mkdir -p env/roles/nginx/{tasks,handlers,defaults}Search for strings in git history excluding certain files
$ git log -S "private-key" -p -- . ':(exclude)*.html*' ':(exclude)*.js*'