Skip to content

Instantly share code, notes, and snippets.

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

Edward Abrams zeroaltitude

🏠
Working from home
View GitHub Profile
@zeroaltitude
zeroaltitude / gist:5853587
Created June 24, 2013 21:03
Hack for portal zap range IITC
var zapTable = {
1: [75, 40],
2: [125, 45],
3: [175, 50],
4: [238, 55],
5: [300, 60],
6: [400, 65],
7: [500, 70],
8: [600, 75]
};
...
2) Inject params into scope -- even faster
..
// Create a class method 'process' which accepts params for imag and real
FFT.process(signalData, imag, real) {
// work with real and imag
..
};
// detect whether __proto__ is supported in this browser
var __proto_supported__ = false;
try
{
__proto_supported__ = ({}).__proto__;
} catch (e) { /* failed, so stays false */ }
if (typeof Object.create !== 'function')
{
Object.create = function (o)