Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
@springmeyer
springmeyer / test.c
Created July 28, 2011 17:18
test atof conversion of string to double
#include <stdlib.h>
#include <stdio.h>
/* test:
gcc -o test test.c
./test
0.000000
*/
int main(int argc, char **argv)
npm ERR! registry error parsing json
npm ERR! Error sending version data
npm ERR! SyntaxError: Unexpected token ILLEGAL
npm ERR! <html><title>Request timeout</title><body><h1>Request timeout</h1></body></html>
npm ERR! at Object.parse (native)
npm ERR! at IncomingMessage.<anonymous> (/Users/dane/.nvm/v0.4.9/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:163:25)
npm ERR! at IncomingMessage.emit (events.js:81:20)
npm ERR! at HTTPParser.onMessageComplete (http.js:133:23)
npm ERR! at CleartextStream.ondata (http.js:1227:22)
npm ERR! at CleartextStream._push (tls.js:303:27)
Creating files dir /Users/jmarlow/Documents/MapBox
Creating export dir /Users/jmarlow/Documents/MapBox/export
Creating project dir /Users/jmarlow/Documents/MapBox/project
Creating data dir /Users/jmarlow/Documents/MapBox/data
Creating cache dir /Users/jmarlow/Documents/MapBox/cache
Creating cache/tile dir /Users/jmarlow/Documents/MapBox/cache/tile
Started [Server Core:8889].
Error: Shape Plugin: error no attribute by the name of 'COUNTRY', available attributes are: 'ScaleRank' 'LabelRank' 'Z_POSTAL' 'Z_ABBREV' 'Z_NAME' 'Z_ADMIN' 'FeatureCla' 'SOVEREIGNT' 'SOV_A3' 'ADM0_DIF' 'LEVEL' 'TYPE' 'ADMIN' 'ADM0_A3' 'GEOU_DIF' 'NAME' 'ABBREV' 'POSTAL' 'NAME_FORMA' 'TERR_' 'NAME_SORT' 'MAP_COLOR' 'POP_EST' 'GDP_MD_EST' 'FIPS_10_' 'ISO_A2' 'ISO_A3' 'ISO_N3'
@springmeyer
springmeyer / gist:1125844
Created August 4, 2011 18:26
hello cairo kitchen sink
./configure \
--enable-pdf=yes \
--enable-ft=yes \
--enable-svg=no \
--enable-ps=no \
--enable-fc=no \
--enable-png=no \
--enable-gtk-doc=no \
--enable-qt=no \
--enable-quartz=no \
$ git checkout v0.4.0
Note: checking out 'v0.4.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
@springmeyer
springmeyer / test_universal_node.sh
Created August 8, 2011 17:59
test osx universal (32bit + 64bit) node.js executable
# if you have a mac running osx >= 10.6 with an "intel core duo"
# 32 bit processor as per http://support.apple.com/kb/ht3696
# could you run this test and comment here if it works?
curl -o node-universal.tar.bz2 http://tilemill-osx.s3.amazonaws.com/node-universal.tar.bz2
tar xvf node-universal.tar.bz2
./node-universal # you should see a prompt like > and no errors.
# try some math:
cairo-pdf-surface.c:5670:13: warning: implicit conversion from enumeration type 'enum _cairo_status' to different
enumeration type 'cairo_int_status_t' (aka 'enum _cairo_int_status') [-Wconversion]
return CAIRO_STATUS_SUCCESS;
~~~~~~ ^~~~~~~~~~~~~~~~~~~~
@springmeyer
springmeyer / zlib_arch.sh
Created August 8, 2011 21:18
zlib with 2 archectures
$ file node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node: Mach-O universal binary with 2 architectures
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node (for architecture x86_64): Mach-O 64-bit bundle x86_64
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node (for architecture i386): Mach-O bundle i386