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 / file.json
Last active August 29, 2015 13:57
{ "county": "",
"city": "Ottawa",
"website": "http://data.ottawa.ca/dataset/address-points-main-and-subordinates",
"license": "",
"year": ""
}
@tmcw
tmcw / -
Created March 14, 2014 22:04
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.history
setopt autopushd pushdsilent
fpath=(/usr/local/share/zsh-completions $fpath)
autoload -U colors && colors
autoload -U compinit promptinit
@tmcw
tmcw / -
Created March 19, 2014 18:48
WARN [launcher]: Can not load "Safari", it is not registered!
Perhaps you are missing some plugin?
WARN [launcher]: Can not load "Firefox", it is not registered!
Perhaps you are missing some plugin?
window.L.Icon.Default.imagePath = '//api.tiles.mapbox.com/mapbox.js/' + 'v' +
require('./package.json').version + '/images';
@tmcw
tmcw / index.js
Created March 28, 2014 17:33
Gist from mistakes.io
// Hi!
(function() { return 'hi'; })();
// This is a sketchpad for Javascript
// ----------------------------------
// * 2 spaces are default so that stuff fits
// on projectors.
// * some things might be weird, don't be afraid
// * console.whatever doesn't do anything
@tmcw
tmcw / index.js
Created March 28, 2014 20:17
requirebin sketch
var treeui = require('treeui');
var insertCSS = require("insert-css");
insertCSS("body { font:normal 12px/20px sans-serif; } .treeui-caret { color:#555; font-size:10px; padding-right:5px; } .treeui-caret:hover { cursor:pointer; } .treeui-level { padding-left:15px; border-left:1px solid #555; } ");
treeui(request)
.onclick(function(level) {
console.log(level);
})
.appendTo(document.body);
@tmcw
tmcw / index.js
Created March 31, 2014 14:40
Gist from mistakes.io
'/dccode/foo'.replace(/^\/dccode/simple/)
@tmcw
tmcw / index.js
Created March 31, 2014 16:22
Gist from mistakes.io
void require('https://rawgithub.com/mapbox/node-sphericalmercator/master/sphericalmercator.js');
var sph = new SphericalMercator();
sph.inverse([2113201.397, 5244297.435])
@tmcw
tmcw / index.js
Created March 31, 2014 21:20
Gist from mistakes.io
void require('https://rawgithub.com/mapbox/node-sphericalmercator/master/sphericalmercator.js')
var sph = new SphericalMercator();
var zoom = 10;
tl = sph.px([0, 20], zoom);
br = sph.px([10, 0], zoom);
((br[0] - tl[0]) / 256) * ((br[1] - tl[1]) / 256)
@tmcw
tmcw / -
Created April 1, 2014 14:53
Undefined symbols for architecture x86_64:
"_CGLChoosePixelFormat", referenced from:
_main in glsl_optimizer_tests.cpp.o
"_CGLCreateContext", referenced from:
_main in glsl_optimizer_tests.cpp.o
"_CGLDestroyContext", referenced from:
_main in glsl_optimizer_tests.cpp.o
"_CGLDestroyPixelFormat", referenced from:
_main in glsl_optimizer_tests.cpp.o
"_CGLSetCurrentContext", referenced from: