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 26, 2015 21:59 — forked from tomgp/LICENSE.txt
DST Transitions

Using some animated clocks from d3 to show the difference between how US and EU timezone transitions work.

The top row shows three clocks in the three main European Union timezones on the last Sunday in October. As London passes 0200 BST it resets to 0100 GMT; simultaneously, the clocks change in Berlin and Helsinki.

The bottom row shows four clocks for the US timezones, on the first Sunday in November. In contrast to the EU clocks, the DST ripples across the country at 0200 local time.

(Thanks to bl.ocks.org/tomgp/6475678 for the starting point and to @mbostock for help with heights.)

@blech
blech / index.html
Last active December 25, 2015 22:29
Weekender - the NYC MTA's map.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Weekender</title>
</head>
<body style='margin:0; padding:0;'>
<div style='white-space:nowrap; height:256px;'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_0_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_1_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_2_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_3_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_4_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_5_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_6_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_7_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_8_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_9_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_10_0.png'><img src='http://web.mta.
@blech
blech / .run
Last active December 25, 2015 17:59 — forked from mbostock/.block
python -m SimpleHTTPServer 5120
@blech
blech / supersub.py
Created August 26, 2013 01:36
Make Unicode sub- and super-scripts
#!/usr/bin/python
# -*- coding: utf8 -*-
def up(input):
normal = u"0123456789+-()"
superscript = u"⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾"
trantab = dict((ord(a), ord(b)) for a, b in zip(normal, superscript))
return input.translate(trantab)
def down(input):
@blech
blech / ll2zxy.html
Last active December 21, 2015 07:38
Find My Tiles: lat/long to zxy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Find My Tiles</title>
<link rel="stylesheet" href="http://husk.org/collected.css">
</head>
<body>
<h1>Find My Tiles</h1>
<p id="latitude">Finding your lat/long…</p>
@blech
blech / map.geojson
Created August 13, 2013 20:02
london-airports.geojson (via:geojson.io)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blech
blech / README.md
Last active December 21, 2015 00:58 — forked from mbostock/.block

Forking mbostock's vector tiles gist/block, but for London and with motorways in blue.

I'm not quite sure what else I'm going to do with this yet. Hack in onHashChange? Realise that polymaps is better for this stuff?

@blech
blech / README.md
Last active December 20, 2015 23:39
Footpaths, London

This is just my railways map, lightly tweaked to show footpaths, inspired by Pedestrian London by Panos Mavros.

As with the railways map, I really need to do my own vector tiles extracts for the London area, so that I can allow zoom levels that show footpaths further out. (The hard zoom limit of 15 is because the source data doesn't show footpaths beyond that level.)

@blech
blech / README.md
Last active December 20, 2015 21:29
Yahoo! logo! generator!

Yahoo! logo randomiser and generator.