Skip to content

Instantly share code, notes, and snippets.

View kevinpeno's full-sized avatar
🏠
Working from home

Kevin Peno kevinpeno

🏠
Working from home
View GitHub Profile
@mbostock
mbostock / .block
Last active August 29, 2023 06:47
Hexagon Mesh
license: gpl-3.0
@xk
xk / SubArray.js
Created October 28, 2011 06:59 — forked from CrabDude/SubArray.js
Node.js Array subclass
// 20111028 jorge@jorgechamorro.com
// How to subclass Array
// In reply to https://gist.github.com/1100841/9c959db9314338a09c0f288c2c0ca5553816e400
function subArray () {
var nu= Array.apply(null, arguments);
nu.__proto__= subArray.prototype;
return nu;
}
@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();