Skip to content

Instantly share code, notes, and snippets.

View hugowetterberg's full-sized avatar

Hugo Wetterberg hugowetterberg

View GitHub Profile
@perifer
perifer / gist:1327738
Created October 31, 2011 15:22
Install XHProf

1. Download and install latest version:

cd ~/Projects
git clone https://github.com/facebook/xhprof.git xhprof.YOURDOMAIN
cd xhprof.YOURDOMAIN/extension
phpize
CFLAGS="-arch x86_64 -arch i386"
./configure
make
@banksean
banksean / mersenne-twister.js
Created February 10, 2010 16:24
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();