Skip to content

Instantly share code, notes, and snippets.

View sweenzor's full-sized avatar

Matt Sweeney sweenzor

View GitHub Profile
@sweenzor
sweenzor / generate_locations_json.py
Created April 18, 2012 20:49 — forked from mbostock/.block
Google Maps + D3
#!/usr/bin/env python
import json
import random
def build_rand_str():
gen = ''
for i in range(8):
gen += random.choice('ABCDEFGH')
return gen
@sweenzor
sweenzor / generate_geojson.py
Created July 9, 2012 02:33 — forked from ZJONSSON/index.html
D3 + Leaflet
#!/usr/bin/env python
import random
f = open('us-states.json', 'w')
f.write("""{"type":"FeatureCollection","features":[\n""")
lat = 35.0
lng = -87.3
@sweenzor
sweenzor / basic-leaflet.md
Last active October 22, 2016 04:39 — forked from sweenzor/generate_geojson.py
Most basic leaflet.js map posible

most basic of leaflet maps

basically the most basic of leaflet maps posible

basically

@sweenzor
sweenzor / prefs.js
Created November 23, 2013 07:05 — forked from johnbender/prefs.js
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
import random
import signal
import gevent
import redis
REDIS_URL = 'redis://127.0.0.1:6379'
REDIS_CHANNEL = 'pubsub_demo'