Skip to content

Instantly share code, notes, and snippets.

View steve9001's full-sized avatar

Steve Masterman steve9001

View GitHub Profile
@steve9001
steve9001 / prng.js
Created May 7, 2019 17:34 — forked from blixt/prng.js
A very simple, seedable JavaScript PRNG.
/**
* Creates a pseudo-random value generator. The seed must be an integer.
*
* Uses an optimized version of the Park-Miller PRNG.
* http://www.firstpr.com.au/dsp/rand31/
*/
function Random(seed) {
this._seed = seed % 2147483647;
if (this._seed <= 0) this._seed += 2147483646;
}
@steve9001
steve9001 / setup.sh
Created December 28, 2012 16:44 — forked from bkaney/setup.sh
#!/usr/bin/env zsh
# Install the following first:
#
# - chrome
# - iterm2
# - connect.apple.com command-line: XCode tools
successfully() {