I hereby claim:
- I am ottonascarella on github.
- I am ottonascarella (https://keybase.io/ottonascarella) on keybase.
- I have a public key ASCbxUbhsdCT9B9aWy0v8Rk36QTs9bu3KZC_pQ0V0-kj9go
To claim this, I am signing this object:
// Matraka's source code decoded and beautified | |
// by @tlack | |
// | |
// Matraka is a 1005 byte Javascript "demo" by p01. It includes an 'evolving animation' | |
// and great dirty synth music. View here: | |
// | |
// http://www.p01.org/releases/MATRAKA/matraka.png.html | |
// | |
// I fondly recall the demo scene of my youth, puzzling over the work of Future | |
// Creators and those guys. I was puzzled by this worked so I had to figure it |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Function.prototype.throttle = function(delay) { | |
var outter = this, | |
timer, control = false; | |
return function() { | |
if (control) return; | |
control = true; | |
var inner = this, |
Function.prototype.debounce = function(delay) { | |
var outter = this, | |
timer; | |
return function() { | |
var inner = this, | |
args = [].slice.apply(arguments); | |
clearTimeout(timer); |
/* improved version of the one found at https://developer.mozilla.org/docs/Web/API/Element/matches */ | |
(function(p) { | |
if (p.matches) return; | |
p.matches = | |
p.matchesSelector || | |
p.mozMatchesSelector || | |
p.msMatchesSelector || | |
p.oMatchesSelector || | |
p.webkitMatchesSelector || | |
function(s) { |
(ns flatten-it) | |
(defn flatten-it [coll] | |
(loop [acc [], aseq coll] | |
(let [[fst & rst] aseq] | |
(cond | |
(empty? aseq) (seq acc) | |
(sequential? fst) (recur (into acc (flatten-it fst)) rst) | |
:otherwise (recur (into acc [fst]) rst))))) |
function flatten(xs) { | |
return xs.reduce((acc, item) => { | |
if (Array.isArray(item)) { | |
return acc.concat(flatten(item)); | |
} | |
acc.push(item); | |
function type (v) { | |
if (typeof v.constructor['@@type'] === 'string') return v.constructor['@@type']; | |
if (isNaN(v)) return 'NaN'; | |
return ({}).toString.call(v).replace(/\[object\s|\]/g, ''); | |
} |
const getIn = (...path) => target => { | |
return path.reduce((obj, k) => { | |
return (obj == null) ? obj : obj[k]; | |
}, target); | |
} |
I hereby claim:
To claim this, I am signing this object: