Git aliases for fun and profit

haskell-kata’s Quickstart now has this neat little ditty at the start: 1 2 git config --local alias.build '!sh -c \'for file in *.hs; do ghc -o "${file%.hs}-bin" "$file"; done\'' git build Git is the gift that keeps on giving. I was on the hunt for a subdirectory-scoped alias, and I just discovered this incredibly flexible way to create new Git subcommands. History: 2 years ago I read through the 1200 page behemoth Haskell Programming from First Principles....

December 3, 2023

Outage postmortem: Why didn't SelkoArchive get today's news?

For some reason, my daily archive of Finland’s “clear news” broadcast didn’t work today. Why not? TL;DR: Just a Git snafu. Quick recap of the archive: There are 3 Git repos: selkouutiset-scrape simply scrapes the HTML https://yle.fi/selkouutiset at 6 PM every day via a Github Action. selkouutiset-scrape-cleaned pulls in scrape and turns it into a stack of translated, properly-named Markdown files, by the magic of shell scripts, systemd timers, and a tiny VM in a datacenter somewhere....

December 1, 2023

Things Word has that SSGs, by and large, don't

Recommendations appreciated. Disclaimer: Most of these make little sense in an Internet medium anyway. An index. An index simply lists the terms and topics discussed in a document, along with the pages they are listed on. A glossary. Could be as simple as a CSV file of terms and definitions, or as complex as a whole extra glossary/ folder. Related: A “Acronyms and Abbreviations” section. Even moreso than the last, this could be a simple CSV....

November 30, 2023

No such thing as a Post-Push Hook

Tonight I was hacking away at some more little automations to make this TIL nice and presentable over at https://hiandrewquinn.github.io/til-site/. Git has a wonderful system called “hooks” which live under .git/hooks/, come loaded with examples so you can remember how they all work, and – surprisingly – don’t contain a local post-push hook! There’s post-receive, but that expects to be able to run a script on the server side – not helpful when I’m pushing to one of Github’s many, many anonymous boxes....

November 18, 2023