Cleaning up my notes folder
Most of the time the simplest tool is good enough. It is worth writing down the commands you only need twice a year. There is probably a better way, but this one is easy to remember.
Measuring before changing anything saved me from a pointless rewrite. The fix turned out to be one line, after an hour of looking in the wrong place.
Writing a tiny test first made the problem obvious. The documentation was correct, I just did not read it carefully.