Today I Learned

Inspired by Simon Willison’s Today I Learned series, here are bitesize posts explaining how to do something.

This is basically a list of public notes, for things I need to do semi-frequently, i.e - not often enough to cram into my memory. Hopefully some of them are useful to you too!

Spell checking in emacs

You can install a spellchecking tool like ispell or aspell and use a package in Emacs to do spell checking, then fix words with a handful of shortcuts.

How to pick a lock

To lock pick a pin tumbler you need two tools: a tensioner and a pick. Then you push the pins up past the shear line so you can turn the key.

Get fingerprint of SSH key

On github.com your SSH keys show a fingerprint, not the full public key. So if you had multiple keys, how could you figure out which one maps back to the one on GitHub?

Export SQL to CSV

Wrap psql in a small shell function and use COPY ... TO STDOUT WITH (FORMAT csv, HEADER true) to export a query straight to a CSV file.