Skip to content

Instantly share code, notes, and snippets.

View blech's full-sized avatar

Paul Mison blech

View GitHub Profile
@blech
blech / README.md
Last active December 18, 2015 22:29 — forked from NelsonMinar/README.md
Fun with vector maps (forked from NelsonMinar)

Fun with vector maps

Quick TopoJSON vector tile demo map, derived from an earlier GeoJSON demo. Original README follows.

A goofy slippy map of various vector tile data sources. With some fun colours, greetz to Aaron and Mike and Mike and the whole Prettymaps crew.

Sacramento, CA

@blech
blech / README.md
Last active December 18, 2015 19:49
Polymaps railways (initially in London)
@blech
blech / README.md
Last active December 18, 2015 19:39
Central London's railways
@blech
blech / README.md
Last active December 18, 2015 19:38 — forked from mbostock/.block
Highlighted railways, San Francisco
@blech
blech / flip.it VjRUL
Created May 13, 2013 18:14
Flipboard's UA dependent short URL expansion
Flipboard short URL http://flip.it/VjRUL with iPhone UA:
$ curl -A "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" http://flip.it/VjRUL
<iframe id="appLoader" style="display:none;"></iframe>
<script>
var flipboardURL = 'flipboard://showSection/flipboard%2Fsingleurl%252Fhttp%253A%252F%252Ft.co%252Fo9hDkbJXl3?resetStack=true&referrer=twitter&createDevice=iphone&canAddToFlipboard=false&createAction=shareWithComment&showPreselectedItem=true';
var appStoreURL = "http://ax.itunes.apple.com/us/app/flipboard/id358801284?mt=8";
var googlePlayURL = "https://play.google.com/store/apps/details?id=flipboard.app&feature=nav_result#?t=W251bGwsMSwyLDNd";
// try and launch Flipboard with the add section url
@blech
blech / lego_parse.py
Last active December 15, 2015 02:49
Lego expenses
#!/usr/bin/python
import csv
import datetime
import sys
from decimal import *
data = []
@blech
blech / defaults.sh
Last active December 14, 2015 01:39 — forked from anonymous/gist:5007651
New machine defaults.write commands.
defaults write FixedWidthFontSmoothingThreshold 9
defaults write com.barebones.bbedit FixedWidthFontSmoothingThreshold -int 9
defaults write -g NSDisableAutomaticTermination -bool yes
defaults write -g NSScrollAnimationEnabled -bool NO
defaults write com.apple.dock no-glass -boolean YES
defaults write com.apple.dock showhidden -bool true
defaults write com.apple.dashboard mcx-disabled -boolean YES
defaults write -g NSDisableAutomaticTermination -bool yes
killall Dock
@blech
blech / snow_data_mining.py
Last active December 11, 2015 09:48
A rough percentage of snowy photos in London
#!/usr/bin/python
import simplejson
import urllib
api_url = 'http://api.flickr.com/services/rest/'
api_method = 'flickr.photos.search'
api_key = '6cbbb899ee09051e575a63f57e954a5a'
results = {}
@blech
blech / find8192.py
Created September 17, 2011 01:31
Find Muni bus 8192. Or not.
#!/usr/bin/python
import re
import time
import urllib
from xml.dom.minidom import parse, parseString
# data structure
ids = dict()
@blech
blech / README.md
Last active September 26, 2015 15:57
Set camera make & model EXIF

exiftool -make=Lomo -model="Lomo LC-A+" -makernotes:all= DSCF0001.jpg