Skip to content

Instantly share code, notes, and snippets.

View willwhite's full-sized avatar

Will White willwhite

View GitHub Profile
#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 }
/*
Map {
background-color: #fff;
}
#world {
line-color: #ccc;
line-width: 0.5;
@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
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);
})
/Users/diggersf/src/TileMill/lib/node/mapnik/index.js:118
dirs.push('C:\Windows\Fonts'));
^
SyntaxError: Unexpected token )
at Module._compile (node.js:458:37)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object.<anonymous> (/Users/diggersf/src/TileMill/lib/node/tilelive.js/lib/tilelive/map.js:6:14)
module.exports = {
'foo': function() {
assert.response(app, {
url: '/foo',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '{bar: "baz"}'
}, {
module.exports.paths = {
'fonts': '/usr/local/lib/mapnik2/fonts',
'input_plugins': 'Usage: mapnik-config [OPTION]',
};
Warning: node-mapnik initialization failed
in "/Users/diggersf/src/TileMill/lib/node/mapnik/settings.js" the input_plugins directory: "Usage: mapnik-config [OPTION]" does not exist
Auto-loading of Datasource input plugins will not be available.
See the docs/FAQ on ideas for how to fix this issue.
module senchalabs connect 0.3.0
module visionmedia express 1.0.0
module documentcloud underscore 1.1.1
module andris9 node-markdown v0.1.0
module developmentseed vargs v0.1.0
module developmentseed cradle v0.2.0
module wdavidw node-csv-parser v0.0.2
module donpark hbs 0.0.2
module caolan async v0.1.0
module developmentseed display v0.0.4
@willwhite
willwhite / gist:628906
Last active September 23, 2015 22:57
// Use node.js to generate md5 hash
var hash = require('crypto').createHash('md5').update('STRING TO HASH').digest('hex');