xrandr --output $(xrandr -q | awk '/ connected / {print $1}') --brightness 0.8
View listing-solarized.tex
\definecolor{keywordscolor1}{RGB}{72, 91, 98}
\definecolor{keywordscolor2}{RGB}{133, 153, 3}
\definecolor{keywordscolor3}{RGB}{181, 137, 3}
\definecolor{identifiercolor}{RGB}{37, 116, 206}
\definecolor{commentscolor}{RGB}{130, 144, 144}
\definecolor{attributescolor}{RGB}{203, 75, 22}
View nteract python virtualenv
python -m ipykernel install --user --name some-env --display-name "Python (some-env)"

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:

Keybase proof

I hereby claim:

  • I am himito on github.
  • I am himito ( on keybase.
  • I have a public key whose fingerprint is 8C42 A211 D6B2 9DF5 19CD 6D20 1F2F CABB 75FD 2C8E

To claim this, I am signing this object:

for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
View Convert Tikz to PDF
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname