mpd-status is a simple Go program that queries the music player daemon and prints out the status for use with tmux. You need to have Go installed, clone the repo and run go build to create the binary. By default the output is the status (using unicode play/pause/stop characters), the artist name, and song title. Pass --volume to include the volume level from 0-100%, and --elapsed to output the elapsed time and duration, like 2m40s/3m43s.
In 2010 I wrote about a simple method for migrating schema with Python. Here’s the same kind of thing, but this time using Go. I’m using the SQLx extensions for database/sql and PostgreSQL as my database. The only requirement is an extra table named schema with a single version in it. This tracks which version of the schema update has been applied. This table is created in the first schema update below.
One drawback to using a static site is that when you make changes to things that are shared between pages all those pages have to be updated. And since I’m also GPG signing the pages one change can end up touching a couple hundred pages. With the move to Hugo I’ve also been updating things more often that I normally do. I had forgotten about the CloudFront limit on invalidation requests (first 1000 a month are free.
This blog has been running on Pelican since 2011. I’ve been pretty happy with it, even contributing AsciiDoc support upstream. But lately I’ve been feeling like it’s time for a change. I’d heard good things about Hugo from friends, and even though my first attempts with it were frustrating (thanks to their docs pointing to content/posts/ instead of content/post/) I decided to give it another try after my attempts to add a Mastodon social icon to the mg theme for Pelican failed.
Back in 2013 I wrote about using socat with Tor to setup a Hidden Service chat. It was pretty simple to setup and I wanted to see how much harder it would be to do with Whonix, since the Gateway handles Tor and the Workstation should run socat. Ends up it isn’t hard at all. On the Gateway you need to edit /usr/local/etc/torrc.d/50_user.conf (as root) and add a Hidden Service to it:
Whonix has released version 220.127.116.11.6 of their XFCE KVM build. Whonix is a Debian based operating system that routes all network traffic through the Tor network. It is included as part of Qubes OS or you can run disk images using your favorite virtualization solution. Their KVM release includes xml files for importing into libvirt, but sometimes that’s a bit too heavy of a solution and you want something simple where you don’t need to be root to set it up or run it.
You are being tracked. It is now no secret that on every level your cellphone is being used to compromise your privacy. Not only are the cellphone providers injecting tracking headers they have been selling off your location data to 3rd parties with lousy website security. We have no way to know how much of this data was archived, or who may have access to it. There is no way to ensure that it is all deleted.
I recently needed to convert a CD of xrays into jpeg images, and it wasn’t immediately obvious how to do this. The files on the CD were in DICOM format, which appears to be a commonly used format in the medical community that includes the image and extra metadata about the patient. I first used the aeskulap viewer which worked fine for viewing, but has no options (that I could find) for exporting them to regular jpeg images.
Inspired by this old post from Rob Smith I have started making some changes to the blog. All of the pages are now signed using my GPG key, and can be verified by running curl https://www.brianlane.com/ | gpg --verify on the page. Rob did this by adding a plugin to Jekyll, but I’m using the Pelican static blog system for these pages, and as far as I can tell Pelican’s plugin support has no way to make sure your plugin is the final one being executed.
We love the Logitech trackballs in my house. I’ve used them for so long that the oldest one I have has a PS/2 connector on it. Overall they hold up really well, and I’ve never had a problem with them completely dying on me. But the left button does wear out after a few years (or less, depending on how many games you play). I decided to finally do something about the growing pile of them by replacing the switch.