Today I Learned
My Today I Learned snippets. Inspired by simonw/til.
Browse these TILs at https://til.alexwlchan.net/
40 TILs to date.
applescript
bash
- Create a directory before you
cp
ormv
a file to it – 7 January 2024
buildkite
- Use concurrency gates to prevent concurrent deployments – 1 June 2023
css
- How to create a footer that’s always at the bottom of the page – 12 January 2024
- How to style a <details> element differently depending on whether it’s open or closed – 7 January 2024
curl
- How to do resumable downloads – 17 October 2023
fish
- Beware of using
test -n
with command expansion – 22 January 2024
flickr
- The acronym "woe" in the Flickr API stands for "Where On Earth" – 2 October 2023
github
- Run the Netlify CLI in GitHub Actions – 6 January 2024
- SVGs are only rendered on GitHub if you use an <img> that points to another file – 4 January 2024
interesting-words
- Calley-ope (calliope) Syndrome is pronouncing a word wrong because you’ve only ever read it on the page – 27 December 2021
javascript
- Sort a list of DOM elements by sorting and calling appendChild() – 11 January 2024
- Use Unicode property escapes to detect emoji – 6 September 2023
liquid
- Use the {% capture %} tag to assign complex strings to variables – 12 January 2024
live-text
- Live Text is aware of how hyphenation works – 26 December 2023
macos
- Run a script on a schedule as a LaunchAgent – 22 January 2024
nginx
- Use shlex.split() to parse log files quickly – 5 January 2024
photokit
- How to delete albums – 27 December 2023
python
- Do offline geo-lookups of IP addresses – 19 January 2024
- How to gracefully restart a gunicorn app – 16 January 2024
- How to find the longest common suffix in a list of strings – 14 January 2024
- How to simulate shell pipes with the subprocess module – 13 January 2024
- Manage MP3 metadata from iTunes with eyed3 – 12 January 2024
- Create flag emojis for countries – 10 January 2024
- Use the regex library to get Unicode property escapes – 4 January 2024
- Run a randomly selected subset of tests with pytest – 3 January 2024
- The sqlite3 context manager doesn’t close connections – 2 January 2024
rsync
- How to move files when you need sudo on the remote server – 17 January 2024
spreadsheets
- Use the IMAGE function to insert an image into a spreadsheet – 9 January 2024
sqlite
- How to tally combinations of values across multiple columns – 17 January 2024
- Getting a tally of SQLite values as a CSV – 3 January 2024
- Using sqlite-utils to convert a CSV into a SQLite database – 2 January 2024
svg
- Pausing the animation of <svg> elements can affect child <svg> elements differently in different browsers – 7 January 2024
- Animate an attribute of an element with <animate> – 4 January 2024
swift
- How to profile Swift code – 23 May 2023
wikimedia-commons
- Go between the M-IDs and filenames – 8 December 2023
- How to find files that use a particular SDC field – 16 October 2023
- Why the term "snak" keeps appearing in the API – 10 October 2023
youtube
- Modifying Liked videos with the Python API – 3 January 2024
- Get a list of Liked videos – 3 January 2024