Tamsyn font for terminal and programming

I find tamsyn font to be one of the best fonts for programming and terminal. It has this old-school feel of DOS fonts that I find particularly good on the eyes when writing code or working in the terminal.

On Archlinux:

  sudo pacman -S tamsyn-font

To use in urxvt add to .Xdefaults:

  URxvt.font: -*-tamsyn-*-*-*-*-16-*-*-*-*-*-*-*

Embedding files in Go apps

It can be really useful to embed files into Go apps. There's already libraries such as assetfs that can do that and more for you.

However, we can achieve something similar by simply converting a file to a Go variable, e.g.:


assetName=$(echo -n $1 | tr '.' '_' | tr '/' '_' | tr '-' '_')

echo "package main"
echo -n "const Asset_${assetName} = \""
xxd -p $1 | sed 's/\(.\{2\}\)/\\x\1/g' | tr -d '\r\n'
echo "\""