Skip to content

Instantly share code, notes, and snippets.

@kilfu0701
kilfu0701 / _install.sh
Last active April 13, 2017 02:19
install python 2.7.6 from source. ( CentOS )
## install deps if need
yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel
## if build from python src
cd ~
mkdir src
cd src
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar zxvf Python-2.7.6.tgz
cd Python-2.7.6
@danieldk
danieldk / parmap.go
Created October 1, 2012 10:32
Parallel mapping in Go
package parmap
import (
"runtime"
)
type empty struct{}
type semaphore chan empty
@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: