Set default brightness on Ubuntu

I use a Thinkpad laptop with Linux installed for most of my work these days. However, with Ubuntu 14.04, the brightness always resets to maximum when I restart. This gets annoying, especially if you

Read full post

List top level packages in NPM

Global: npm ls -g --depth=0 2>/dev/null

Project: npm ls --depth=0 2>/dev/null

You can drop the 2>/dev/null redirection but then you won't get a cleaner

Read full post

Kill timed out SSH sessions

Press Enter , ~ , . one after the other to disconnect from a frozen session. Simple but effective.

This works because these are escape sequences. Next time you SSH somewhere just type ~ and ? (tilde, then question mark) to

Read full post

GIF screencasts (Ubuntu)

To record short screencasts on Ubuntu I use byzanz. Byzanz is a desktop recorder and command line tool allowing you to record your current desktop or parts of it to an animated GIF, Ogg Theora,

Read full post

Improving battery life on a ThinkPad (Linux)

I recently purchased a ThinkPad X1 Carbon laptop. My OS choice is Linux and Ubuntu 14.04 works flawlessly on this particular laptop.

For a quick win when trying to get the most battery life

Read full post

Unapply a stash in Git

Using Git and just applied the wrong stash? No worries, the following will help you.

Unapply the last stash:

→ git stash show -p | git apply -R

Unapply a specific stash: e.g. 0 in this

Read full post