Skip to content

Instantly share code, notes, and snippets.

View morganherlocker's full-sized avatar
☠️
computing

Morgan Herlocker morganherlocker

☠️
computing
View GitHub Profile
@morganherlocker
morganherlocker / Effects Pedal hacking 101.md
Last active October 11, 2017 19:47
Effects Pedal hacking 101

General:

  • start simple
  • start with fuzz
  • don't even bother looking at building an analog delay pedal yet :)

All you really need to know about electrical components:

Resistors

@morganherlocker
morganherlocker / gist:7491657
Created November 15, 2013 21:08
ogr2ogr geojson to KML
ogr2ogr -f KML /full/path/a.kml /full/path/b.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@morganherlocker
morganherlocker / README.md
Last active August 29, 2015 13:56
Geocolor Choloropleth with simplestyle-spec Styling

sc_poverty_unstyled.geojson contains South Carolina's counties, with a poverty index. To create a choloropleth viewable in a gist, we can use geocolor.

var fs = require('fs'),
    geocolor = require('geocolor')

var geo = JSON.parse(fs.readFileSync(__dirname+'/in/sc_pov.geojson'))

geo = geocolor(geo, 'poverty', 'quantile', 7, ['blue', 'red'])
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,

Update a donut chart extent based on a dragged brush extent

var melody = [22,18,8,6,18,20,24,26,20,18,12,18]
return function (t) {
t = t/1.28
return drums1(t)/4 + drums2(t)/2.4 + drums3(t)/18 + synth1(t) + synth2(t);
}
function sin (x, t) { return Math.sin(2 * Math.PI * t * x *.6) * 1.5 }