Skip to content

Instantly share code, notes, and snippets.

View willwhite's full-sized avatar

Will White willwhite

View GitHub Profile
SphericalMercator.prototype.envelope_to_xyz = function(bbox, minzoom, maxzoom) {
var ll0 = [bbox[0],bbox[3]]
var ll1 = [bbox[2],bbox[1]]
var that = this;
_.range(minzoom, maxzoom+1).forEach(function(z) {
px0 = that.ll_to_px(ll0,z);
px1 = that.ll_to_px(ll1,z);
_.range(px0[0]/256.0, px1[0]/256.0+1).forEach(function(x) {
console.log(x);
})
@willwhite
willwhite / nginx.conf
Created February 10, 2011 16:08
nginx upstart configuration from http://wiki.nginx.org/Upstart
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
console owner
exec /usr/local/sbin/nginx -c /path/to/nginx.conf -g "daemon off;"
respawn
/*
Map {
background-color: #fff;
}
#world {
line-color: #ccc;
line-width: 0.5;
#crime {
polygon-opacity:0.5;
polygon-fill:#6db075;
[MOD_INDX01>0][MOD_INDX01 < 24599] { polygon-fill:#6db075 }
[MOD_INDX01>24600][MOD_INDX01 < 49199] { polygon-fill:#78b67f }
[MOD_INDX01>49200][MOD_INDX01 < 73799] { polygon-fill:#83bc8a }
[MOD_INDX01>73800][MOD_INDX01 < 98399] { polygon-fill:#8ec294 }
[MOD_INDX01>98400][MOD_INDX01 < 122999] { polygon-fill:#99c89f }
[MOD_INDX01>123000][MOD_INDX01 < 147599] { polygon-fill:#a4cea9 }
[MOD_INDX01>147600][MOD_INDX01 < 172199] { polygon-fill:#afd4b3 }
#world {
polygon-fill:#eee;
}
#crime {
polygon-opacity:0.5;
polygon-fill:#6db075;
[MOD_INDX01>0][MOD_INDX01 < 24599] { polygon-fill:#6db075 }
[MOD_INDX01>24600][MOD_INDX01 < 49199] { polygon-fill:#78b67f }
[MOD_INDX01>49200][MOD_INDX01 < 73799] { polygon-fill:#83bc8a }
this.RESOLUTIONS = [];
var maxResolution = 156543.03390625;
for(var zoom=0; zoom<=this.MAX_ZOOM_LEVEL; ++zoom) {
this.RESOLUTIONS[zoom] = maxResolution / Math.pow(2, zoom);
}
node.js:63
throw e;
^
Error: dlopen(/Users/diggersf/src/tilemill/lib/node/mapnik/_mapnik.node, 1): Library not loaded: /opt/local/lib/libfreetype.6.dylib
Referenced from: /usr/local/lib/libmapnik2.dylib
Reason: image not found
at Module._loadObjectSync (node.js:360:13)
at Module.loadSync (node.js:336:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
Problem : Order Information
WILLIAM > Order Information
Viquez > Hello WILLIAM_, Thank you for contacting Comcast Live Chat Support. My name is Viquez. Please give me one moment to review your information.
Viquez > Hello, thank you for choosing Comcast! This is the Transfer Department, my name is Yessenia and I will be processing your order. First, I will just need to confirm some basic information from you. Afterwards, I would like to ask you a few questions to make sure we set the transfer of services properly. How are you doing today?
WILLIAM_ > Great, how are you?
Viquez > I am glad to know you are doing great. It is a pleasure having you in chat today.
Viquez > I am great as well thanks for asking William.
Viquez > Just to confirm, you are a current Comcast customer and you would like to transfer your services to your new address. Is that correct?
WILLIAM_ > Yep, that's correct.
Viquez > Excellent! You have reached the right person. It will be my pleasure to help you with your request.
Error: Cannot find module 'sphericalmercator'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at require (module.js:348:19)
at Object.<anonymous> (/Users/diggersf/src/tilestream-pro/node_modules/tilestream/lib/tileset.js:8:15)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
@willwhite
willwhite / disable.sh
Created July 26, 2011 15:49
Low Bandwidth Testing
#!/usr/bin/env sh
sudo ipfw delete 1