A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
Use extractDocs.py to parse and index the StackOverflow posts.xml file into an existing index. | |
Usage: extractDocs.py [options] file | |
Options: | |
-h, --help show this help message and exit | |
-s SERVER, --server=SERVER | |
ElasticSearch Server | |
-i INDEX, --index=INDEX | |
Index name to use |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
-- | |
-- Created by: Sean Korzdorfer | |
-- Created on: 06/08/12 17:05:27 | |
-- This script incudes code from an example posted by Rob Trew | |
-- String Library can be obtained at: | |
-- http://applescript.bratis-lover.net/library/string/ | |
-- Any line which contains a path needs to be edited for the users environment | |
-- NB: this could easily be edited to append. | |
#!/usr/bin/env python | |
# A quick and dirty script to rename a pinboard.in tag. | |
# I'll probably update this become a proper command line app one day | |
import urllib2 | |
import pinboard | |
pinuser = "" | |
pinpasswd = "" |
tell application "Safari" to set recipeurl to URL of front document | |
tell application "Safari" to set recipetitle to name of front document | |
set ingredients to (do shell script "curl http://recipedistiller.com/recipe/classify/?recipeurl=" & recipeurl & " | textutil -convert txt -stdin -stdout | grep '.' | sed 's/ • DELETE //g'") | |
set my text item delimiters to "VIEW RECIPE" | |
set ingredients to text item 2 of ingredients | |
set my text item delimiters to "©" | |
set ingredients to text item 1 of ingredients |
<iframe src="http://www.screenr.com/embed/xhe" width="650" height="396" frameborder="0"></iframe> |
#! /bin/bash | |
function usage { | |
echo "`basename $0` [OPTIONS] [OUTPUT-PREFIX]" | |
echo "Archives Vim installation." | |
echo " " | |
echo "Options:" | |
echo " --windows ... build distributable for MS Windows system" | |
echo " -h|--help ... show help" | |
exit 1 |
#! /bin/bash | |
if [[ -z $1 ]] | |
then | |
if [[ -z $VIMRUNTIME ]] | |
then | |
VIMRUNTIME=$HOME/.vim | |
fi | |
else | |
VIMRUNTIME="$1" |
from fabric.context_managers import cd | |
from fabric.contrib.files import exists | |
from fabric.decorators import hosts | |
from fabric.decorators import task | |
from fabric.operations import run | |
from fabric.operations import sudo | |
PACKAGES = [ | |
# 'python-mapnik', | |
'binutils', |