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

Pushing to pypi


  1. Make in your project

    from setuptools import setup
          description='thing do-er',
          author='Your Name',
          classifiers=['Environment :: Console',
                       'Intended Audience :: Developers',
                       'License :: OSI Approved :: MIT License',
                       'Programming Language :: Python :: 3.4',
                       'Operating System :: POSIX :: Linux',
                       'Topic …
more ...

Screenshot with mplayer

To take screenshots with mplayer, you need to first run mplayer with a special flag.

mplayer -vf screenshot movie001.mp4

Then once the movie is playing you can screen shot any frame by hitting the 's' key. mplayer will name the files starting with shot0001.png.

When I first tried …

more ...

Colored diff on the Command line

If you wanted your diff output to be colored you have three options

  1. Use a verison control program that outputs colored diff output

    git diff --color=always old-file new-file | less -R
    note:Mercurial does not allow you to run its hg diff outside of a repository
  2. Use a text editor …

more ...

Manually Connecting Ethernet

I broke my computers internet installing wicd.

Getting internet back

  1. Check the interfaces

    $ ifconfig
  2. Check eth0 explicitly

    For whatever reason, my eth0 wasn't showing up until I explicitly specified it.

    $ ifconfig eth0
  3. Get an ip address

    $ sudo ifconfig eth0
  4. Connect to the outside internet

    sudo route …
more ...

Shrinking ova file

The Problem

I wanted to export a virtual machine and send it to a customer. However when I exported the OVA file, it was a massive 12GB. I have exported this virtual machine before and normally the ova is 2GB.

First, I check to see if some log file has …

more ...

Setting up kippo on Raspberry Pi

Downloading Kippo

  1. Download tarball from Google code.
note:the project has since moved to github

2. In my case most of the traffic was attempting a sftp connection. The version of kippo that I acquired from …

more ...