Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
@brianboyer
brianboyer / gist:1696819
Created January 29, 2012 02:21
Lion dev environment notes
@yhahn
yhahn / report.md
Created February 1, 2012 21:48
export report
  • world coastline as line
  • zoom 0 - 8
  • Copied is total z,x,y coordinates considered.
  • Blank is total number of tiles considered fully transparent.
  • Skipped is total z,x,y coordinates that are never requested from Mapnik at all.

Results

--metatile=8
@bnoordhuis
bnoordhuis / deamontest.js
Created February 5, 2012 22:35 — forked from AndreasMadsen/deamontest.js
Frist draft on a simple javascript deamon
var child_process = require('child_process');
function startDeamon(child, args) {
var newEnv = JSON.parse(JSON.stringify(process.env));
newEnv.deamonOptions = JSON.stringify({exec: child, args: args});
var deamonWatcher = child_process.fork(process.argv[1], ['deamon'], {
From 2ba75d69db5a74d61ea4dde54c9e3b4d78d69210 Mon Sep 17 00:00:00 2001
From: Igor Zinkovsky <[email protected]>
Date: Mon, 6 Feb 2012 22:53:39 -0800
Subject: [PATCH] enable 64bit windows build
---
common.gypi | 17 +-
deps/openssl/config/k8/openssl/opensslconf-posix.h | 278 +++++++++++++++++++
deps/openssl/config/k8/openssl/opensslconf-win32.h | 262 ++++++++++++++++++
deps/openssl/config/k8/openssl/opensslconf.h | 281 +-------------------
@creationix
creationix / jsonparse.js
Created February 13, 2012 23:20
event-only version of jsonparse
// Named constants with unique integer values
var C = {};
// Tokenizer States
var START = C.START = 0x11;
var TRUE1 = C.TRUE1 = 0x21;
var TRUE2 = C.TRUE2 = 0x22;
var TRUE3 = C.TRUE3 = 0x23;
var FALSE1 = C.FALSE1 = 0x31;
var FALSE2 = C.FALSE2 = 0x32;
var FALSE3 = C.FALSE3 = 0x33;
From 5e4425c51a6548562a20f310de329b74ab560985 Mon Sep 17 00:00:00 2001
From: Microsoft Interop Team <[email protected]>
Date: Wed, 15 Feb 2012 11:07:00 -0800
Subject: [PATCH] 64bit build on vcexpress
---
vcbuild.bat | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcbuild.bat b/vcbuild.bat

TileMill/Carto painting order hierarchy

Mapnik draws shapes using a painter's algorithm. Objects that are drawn first may be visually obstructed by objects that are painted later.

The paint order of objects is first controlled by the order of the layers - in a TileMill project, layers at the bottom of the list are drawn first and layers at the top of the list are drawn last.

Within each layer, you can control the order of group of styles via Carto attachments. If you don't explicitly create any attachments in Carto, a single default group will be created behind the scenes for all the rules in a layer.

Within each style rule the paint order of objects is defined by the order they are pulled from the datasource. For example, the first result from a database query is painted first, the second result is painted second, and so on. For file-based sources such as GeoJSON or Shapefiles you would have to edit the file in an external program to control this or

/* If you compile with -O2 the code will print "Wrong behavior", compiling
* with -O0 the code will print "Correct behavior".
*
* Tested with:
* Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
* Target: x86_64-apple-darwin11.3.0
* Thread model: posix
*/
#include <stdio.h>
@perrygeo
perrygeo / gist:1903033
Created February 24, 2012 19:09
Sed scripts to fix blank lines and whitespace; helps code comply with PEP8
# Removes whitespace chars from blank lines
pep8 -r --select=W293 -q --filename=*.py /usr/local/src/madrona/madrona/ | xargs sed -i 's/^[ \r\t]*$//'
# Removes trailing blank lines from files
pep8 -r --select=W391 -q --filename=*.py /usr/local/src/madrona/madrona/ | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'
# Squashes consecutive blanks lines into one
pep8 -r --select=E303 -q --filename=*.py /usr/local/src/madrona/madrona/ | xargs sed -i '/./,/^$/!d'
# confirm
@kkaefer
kkaefer / README.md
Created February 29, 2012 21:05
Missing Tiles

Usage:

node missingtiles.js database.bigtiles > missing.txt node filter_blank.js database.bigtiles missing.txt > missing_filtered.txt node generate_coords.js missing_filtered.txt > missing.json

Note: the first task takes pretty long, like a couple of hours.

missingtiles.js and filter_blank.js output tms coordinates