CI for latex files

I wanted to make a build pipeline for my resume which is written in Latex. Using Travis CI, I was able to add a build that would upload an automatically compiled PDF as a release for every tag in a git repository.

sudo: required
dist: trusty
- sudo apt-get -qq …
more ...

Tracing Functions in Python


Sometimes I want to debug the inputs and outputs of function calls to visualize flow or to follow execution passively.

Rather than adding logging statements and littering them around the code, a single decorator can be crafted to show the life cycle of a function:

def trace_args(f):
    def wrapper …
more ...

Spinning down a Harddrive

I wanted to spin down a hard drive before disconnecting. I have an external hard drive and even after I unmounted the drive the disks were still spinning.

Find the device label of the mounted drive:

$ lsblk
sda    253:0    0  20G …
more ...

List User Installed Packages

I started thinking about doing a fresh linux install and was worried that I might not remember all the packages that I had manually installed. A quick search revealed a one-liner that compares the currently installed packages to the list of packages that were available initially to produce a nice …

more ...

Clean up Docker Instances

Three useful commands to clean up docker if you run out of space

Clean up Containers

docker rm $(docker ps -a -q)

Clean up Images

docker rmi $(docker images | grep "^<none>" | awk '{print $3}')

Clean up Volumes

docker volume rm $(docker volume ls -qf dangling=true)
more ...

Configure pulseaudio output via command line

Changing the currently active audio output

List available audio devices

First, list all the available output devices like so:

pacmd list-cards

Or similarly:

pactl list cards

Card Index

Index of the card is found in the first couple lines:

$ pacmd list-cards
Welcome to PulseAudio! Use "help" for usage information.
>>> 1 …
more ...

Age of git tracked file II


Identify the last time an arbitrary line (let's say line 1) was changed for every file in the repository.

Step 1

Try and use blame to identify changes to the first line only:

$ git blame -L 1,1 -- README
^193d722 (Paul Schwendenman 2012-07-23 16:51:03 +0200 1) ======================

Grab …

more ...

Age of git tracked file


I use a password store named pass. Pass is a command line based manager that attempts to follow the Unix philosophy (roughly tools should do one thing and do it well.) I wanted to know when the last time I updated each password in my store, so that I …

more ...

Signing a multi page PDF


Rather than printing a document, filling it out by hand and then scanning to so that you are able to return it electronically, use Gimp and ImageMagick to sign documents electronically.


  1. First, make sure to have a png image with the signature on a transparent background.

  2. Next, open …

more ...