This week, I learned:

  • It’s pretty convenient (on Ubuntu) to be able to move windows around desktops. Apart from the usual Super + Arrow keys to manage windows within a desktop, you can use:
    • Ctrl + Alt + Left/Right Arrow: Move desktops
    • Ctrl + Alt + Shift + Left/Right Arrow: Move window to desktop
    • Super + Shift + Arrow: Move window to another monitor
    • Super + Drag: Drag window from anywhere
  • jq . file.json is an efficient way to pretty-print JSON files in the terminal. (Or jaq . file.json, which is ~30% faster.)
  • GitHub Copilot monthly premium requests were not reset at 12 am UTC
  • How Diffie Hellman Key Exchange Works by Julia Evans is an excellent explanation. Share a random number. A multiplies it by their private key and shares SA. B multiplies it by their private key and shares SB. They multiply the others’ key with their secret key and they get SAB = SBA. Now both of them have the same new secret they can encrypt/decrypt with, but no one else knows, even though they shared everything publicly! This may be one of the best cool uses of math I’ve seen in a long time.
  • Shell tricks I didn’t know:
    # ALT + . cycles through the last arguments typed
    mv file.{txt,md}    # Move file.txt to file.md
    ls |& tee file.txt  # Pipe both stdout and stderr to tee