TIL
Short notes on things I've learned.
-
The Markdown reference
Everything the theme knows how to render — headings, inline marks, lists, tables, callouts, math, diagrams, footnotes — shown in context so the type and spacing can be judged together.
-
Pretty-print JSON in one shell pipe
curl -s url | python -m json.tool — no jq required for a quick look.
-
git switch beats git checkout
git switch -c branch says what it does; checkout is four tools in a trenchcoat.
-
git commit --fixup and autosquash
Amend an older commit in a branch without an interactive rebase dance.
-
Go's errors.Join
You can wrap multiple errors into one since 1.20 — great for validation that collects everything.
-
Go's defer runs in LIFO order
Stacked defers unwind last-in-first-out — which is exactly what you want for paired setup and teardown.