Skip to content

Instantly share code, notes, and snippets.

View rkrzr's full-sized avatar

Robert Kreuzer rkrzr

View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@orclev
orclev / trie.hs
Created February 28, 2012 04:23
Haskell trie implementation
import Data.Maybe
import Control.Monad (liftM)
import Data.List (isPrefixOf)
import qualified Data.Map as M
import qualified Data.Foldable as F
-- | Trie container data type
data Trie a = Trie { value :: Maybe a
, children :: M.Map Char (Trie a) }
deriving (Show)
@specialunderwear
specialunderwear / babel.sh
Created September 15, 2011 08:58
Install all utf8 locales on ubuntu
#! /bin/sh
cd /usr/share/locales
./install-language-pack eo
./install-language-pack ia
./install-language-pack ie
./install-language-pack io
./install-language-pack vo
./install-language-pack ca
@scvalex
scvalex / README
Created April 30, 2011 02:27
Simple Python script to upload a file to Rackspace CloudFiles
CONFIGURATION
-------------
To setup, simply set your username and API access key in the
cloudfiles.get_conenction call. If you're not using the UK
version of Rackspace, remove the third parameter from the above
call.
EXAMPLE USAGE
-------------
anonymous
anonymous / gist:929217
Created April 19, 2011 18:43
| While lhs.exec = \env -> let f = \env' -> case @e.eval env' of
VFalse -> env'
VTrue -> f (@s1.exec env')
in f e