Skip to content

Instantly share code, notes, and snippets.

View tmcw's full-sized avatar
💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
View GitHub Profile
@tmcw
tmcw / index.js
Last active December 17, 2015 07:29 — forked from anonymous/index.js
void require('http://d3js.org/d3.v3.min.js');
// An introduction to d3js scales
//
// scales are transformations from an input
// domains to output ranges. you use them for
// transforming your input data into your output
// representation: $1B in the stock market might
// mean 200px on a laptop screen, and so on.
var pre = '<pre>*</pre>';
var txt = '';
var chars = ' xx xxx 0000000000005550';
window.setInterval(function() {
var txt = '';
var c = chars.split('');
var l = c.pop();
chars = [l].concat(c).join('')
@tmcw
tmcw / WELCOME.md
Last active December 14, 2015 15:38 — forked from techlady/WELCOME.md

Welcome to OpenStreetMap, the world's open-source map.

You've just joined a community of over one million contributors who are creating a free, worldwide map.

// Types
var one = 1;
var two = 2;
// three;
window.three;
window.one = 1;
one = 1;
var one = [];
var one = {one: 1};
one.two = 1;
@tmcw
tmcw / README.md
Last active November 9, 2021 04:55 — forked from anonymous/README.md
Jenks Natural Breaks with simple-statistics and d3
@tmcw
tmcw / index.html
Last active December 12, 2015 03:48 — forked from wboykinm/index.html
<DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
#map-ui {
position:absolute;
@tmcw
tmcw / index.html
Last active December 11, 2015 16:09 — forked from wboykinm/index.html
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
@tmcw
tmcw / event.js
Created December 18, 2012 19:44 — forked from wboykinm/event.js
$(layer).click(function(e) {
$.each(map.layers, function(l) {
l.disable();
});
map.enableLayer(i);
$(this).addClass('active');
});
@tmcw
tmcw / index.html
Created November 22, 2012 15:55 — forked from mourner/index.html
SVG points and 3d transforms
<!DOCTYPE html>
<meta charset="utf-8">
<title>SVG Swarm</title>
<style>
svg {
position: absolute;
top: 0;
}