Static git hosting with stagit

I like hosting my own services when possible. But I don’t like maintaining complex systems, so instead of setting up my own GitLab, Gitea, or Gogs service I decided to follow the same path I took with this blog and host some of my git repos as static html pages using stagit . One of the neat features of git is that you can actually clone from one of these static repos so they aren’t just html pages but are full copies of the git repo, complete with history.

Weather TL;DR

What is it? Weather TL;DR is a simple weather forecast webapp using data from the weather.gov system. This was an experiment to see if I could write a simple webapp to tell me the current weather forecast in a compact and simple page. How do you use it? Usage it pretty simple. It will ask you if it is ok to use your location data. If you don’t agree then it presents a simple form where you can manually enter a latitude and longitude in decimal form.

Overly Complex Doorbell

I wanted to add some kind of doorbell indication to my office, and was almost ready to start buying parts for wired doorbell sensor like this one on hackaday.com , but I wasn’t sure how well it would work with the Beagle Bone Black that’s running my digitemp sensor network in the garage. I’d have to run about 20’ of wire over to the sensor from the Beagle and that was bound to effect the reliability.

letterbox - SMTP to Maildir delivery agent

Letterbox is a simple Go program that accepts SMTP connections and delivers mail to a per-user maildir directory. I use it to gather reports from various services on my LAN without needing to setup postfix or some other more complex MTA. Usage of letterbox: -config string Path to configutation file (default "letterbox.toml") -host string Host IP or name to bind to -maildirs string Path to the top level of the user Maildirs (default "/var/spool/maildirs") -port int Port to bind to (default 25) The configuration file is written using TOML .
Dragonflies

Dragonflies

I went for a hike the other day and managed to capture some decent photos of a dragonfly.

Setting up PXE boot with qemu

I was expecting to spend the whole afternoon getting a tftp server setup so I could PXE boot some qemu virtual machines for testing. I wanted to make sure it didn’t interfere with anything else on the LAN so it would have to be limited to the user mode network I use with my vms. Typically when I try to do something like this I end up trying a bunch of different things that don’t quite work right.

mpd-status - print song details

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.

Simple Schema Migration With Go

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.

Signing and Updating the Blog on S3

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.