I have been wanting to add a dark theme to this blog ever since Apple introduced dark mode to MacOS and iOS. The solution if you don’t want to supply a UI switch is to use the css media query prefers-color-scheme that checks the user’s system preference which has been available in Safari for a little while and works in Chrome on a Mac at least.
As part of my callerid project I use a simple CSV address book to lookup names from an inbound call. Having to maintain this manually in a spreadsheet is far too painful if I can just export from a master source from time to time and as I keep my addresses synced in my mac and phone using the Contacts app I just need a away to export them to a file. Natively the Contacts app can export as a vCard and I am sure there must be suitable parsers to read one but that would mean changing my super simple CSV address book code. What is interesting is that like a number of Apple applications it uses Sqlite as its backing store. Crack open the file, run some queries and you can retrieve contact data.
A Github Pages site is great for hosting a git project’s website but can also be used for your own personal site if you like.
It is pretty easy to setup and is free. The url of the site will be username.github.io which seems
fine. This site is hosted on Github Pages and I have been pretty pleased with it in particular as https is always forced.
I recently acquired a new mac at work and soon realised that I was missing my familiar
git template with commit message good form hints. In addition after a subsequent merge
failed the fix with its commit retained the git warning comments in the message when they
used to be removed. For posterity sake the .gitconfig needs the following lines: