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 more

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 list of packages. You will also …

Read more

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, …

Read more

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, Flash …

Read more

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 out of a …

Read more

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 case → git …

Read more

Find process by port number

My tmux session crashed, including a local server instance I was running. Now when I try to restart the server I get an error saying it’s still running? How do I kill it? You probably already …

Read more

User Interface Algorithms

Even something as simple as a dropdown menu or a bar graph can introduce usability problems. From a slide out menu disappearing when a user’s mouse moves a few pixels too far, to requiring …

Read more

Enabling Source Maps in Chrome

Update: Google have now compiled a solid walkthrough that can be see here: Debugging JavaScript - Source Maps I’ve seen a couple of posts about enabling source map support, but never actually …

Read more

How to enable the Safari Debug Menu

This past month I’ve encountered a few people that didn’t know about the Debug menu that is available in Safari. Granted, for most engineers it won’t be of any use, but for some it …

Read more