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.
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.