Skip to content

Instantly share code, notes, and snippets.

View iaincarsberg's full-sized avatar

Iain Carsberg iaincarsberg

View GitHub Profile
@iaincarsberg
iaincarsberg / use.js
Created January 16, 2012 17:46 — forked from tbranyen/use.js
A RequireJS compatible plugin to provide shimming capabilities declaratively.
/* RequireJS Use Plugin v0.1.0
* Copyright 2012, Tim Branyen (@tbranyen)
* use.js may be freely distributed under the MIT license.
*/
define({
version: "0.1.0",
// Invoked by the AMD builder, passed the path to resolve, the require
// function, done callback, and the configuration options.
//
@iaincarsberg
iaincarsberg / use.js
Created January 27, 2012 14:23 — forked from tbranyen/use.js
A RequireJS compatible plugin to provide shimming capabilities declaratively.
/* RequireJS Use Plugin v0.1.0
* Copyright 2012, Tim Branyen (@tbranyen)
* use.js may be freely distributed under the MIT license.
*/
define({
version: "0.1.0",
// Invoked by the AMD builder, passed the path to resolve, the require
// function, done callback, and the configuration options.
//
@iaincarsberg
iaincarsberg / mersenne-twister.js
Created February 15, 2012 17:34 — forked from banksean/mersenne-twister.js
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();