James McDonald

Stuff I wrote about things

Passmenu pass frontend for macOS

I use pass for all my password-storage needs. It’s a simple shell wrapper around GPG and git and it works really nicely. On Linux, I use the passmenu dmenu script to quickly look up passwords and copy them to the clipboard, and I was very much missing that feature on my Mac. So being that sort, I learned some Swift and some Cocoa and made a little tool to do just that. Read more →

Docker swarm monitoring

I’ve seen a bunch of posts lately about how to set up Docker swarm monitoring with tools like cAdvisor and node_exporter which advise running them like this: docker service create --mode global -p 9100:9100 ... That will indeed run one container on each swarm node, but it has a subtle problem. When you connect to host:9100, the ingress network routing will connect you to a random instance each connection (for swarm routing values of random). Read more →

Git post-receive hook for Puppet control repo updates

I made a fairly simple post-receive hook setup to automatically update my Puppet master when I push changes to my control repo. I keep the repo in gitolite, so I wanted to use a regular git hook rather than web hook magic (or even magicer Puppet Enterprise Code Manager magic). My control repo itself is based on the puppetlabs control-repo on github. Essentially the idea is that every branch in the repo becomes a Puppet environment on your master, complete with automatically updated modules based on a Puppetfile. Read more →

Hardcoded GNOMEish composition

From Ubuntu docs about the Compose key at https://help.ubuntu.com/community/ComposeKey: The compose key sequences used by Gnome are derived from the X compose tables of XFree86 version 4.0 with further modifications to provide a Gnome standard for all locales. They are hard coded into the program in source file gtk+-2.10.7/gtk/gtkimcontextsimple.c Digging into the current Debian gtk+ source verifies this: <br /> /* This file contains the table of the compose sequences,<br /> * static const guint16 gtk_compose_seqs_compact[] = {}<br /> * IT is generated from the compose-parse. Read more →

Get off of my iCloud

Like several people I know, I have two AppleID accounts for personal use. I have one that I set up back when an iPod was my only Apple gadget and they first opened the iTunes Store. This has all my (large number of) iTunes purchases associated with it. I also have a MobileMe account that I set up a while later when I first bought a Mac, which I now largely use for the me. Read more →