Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am zgiles on github.
  • I am zgiles (https://keybase.io/zgiles) on keybase.
  • I have a public key whose fingerprint is 94C0 8512 3D70 096A 63DF F06D 339D 84E8 437F AD91

To claim this, I am signing this object:

const makeStateToPropsDiffY = (...ys) => (state) => ({
data: ys.map(
(y) => state.summary.map(
(o) => ({ x: parseInt(o.timestamp), y: parseInt(o[y]) })
)
)
})
@zgiles
zgiles / kicknoise.js
Created November 23, 2015 03:43
kicks
var lodash = require('lodash');
var noitech = require('noitech');
var SinWave = function(n,f) {
var f = f ? f : 440;
return lodash.map(lodash.range(n), function(n) { return Math.sin(f * (2 * Math.PI) * n / 44100); } );
}
var DiminishingSinWave = function(n, f, c) {
var f = f ? f : 440;
// Put the fingerprint from their picture in where the 0123 is...
var mutes = JSON.parse(localStorage.getItem('muted')) || [];
var fingerprint = "0000000111111112222222223333333";
mutes.push(fingerprint);
localStorage.setItem('muted', JSON.stringify(mutes));