An exercise in learning D3 / a proof of concept / my hat-in-the-ring for what comes next after Polymaps and Modest Maps. See the github project page for more information.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: node app.js | |
worker: node consumer.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key was generated using: | |
tom% openssl genrsa -des3 -out example.com.key 2048 | |
Generating RSA private key, 2048 bit long modulus | |
....+++ | |
..........................................................................................................................+++ | |
e is 65537 (0x10001) | |
Enter pass phrase for example.com.key: | |
Verifying - Enter pass phrase for example.com.key: | |
%tom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = require('url'), | |
mongodb = require('mongodb'); | |
var sourceUrl = 'mongodb://user:pass@host:port/db', | |
targetUrl = 'mongodb://user:pass@host:port/db', | |
collectionName = 'my_awesome_collection'; | |
function openDbFromUrl(mongoUrl, cb) { | |
var dbUrl = url.parse(mongoUrl), | |
dbName = dbUrl.pathname.slice(1), // no slash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to make a folder full of animated gifs into a folder full of vertical frames | |
# (brew install imagemagick) | |
for i in *.gif;do echo $i | |
convert "$i" "`echo $i | sed -e 's/\.gif//g'`%02d.gif" | |
convert "`echo $i | sed -e 's/\.gif//g'`*.gif" -append $i | |
done | |
# to make a folder full of html into a folder full of pdfs | |
# (brew install wkhtml2pdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Modest Maps JS - Throwable Test</title> | |
<script type="text/javascript" src="modestmaps.min.js"></script> | |
<script type="text/javascript"> | |
(function(MM){ | |
MM.ThrowableHandler = function() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MM = require('modestmaps'), | |
Canvas = require('canvas'), | |
Image = Canvas.Image; | |
get = require('get'), | |
express = require('express'); | |
function renderStaticMap(provider, dimensions, zoom, location, callback) { | |
var canvas = new Canvas(dimensions.x, dimensions.y), | |
ctx = canvas.getContext('2d'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2010, The Barbarian Group | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that | |
the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this list of conditions and | |
the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TextField.h | |
// | |
// Created by Tom Carden on 8/9/11. | |
// Copyright 2011 Bloom Studio, Inc. All rights reserved. | |
// | |
#pragma once | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.core.*; | |
import com.modestmaps.core.*; | |
import com.modestmaps.geo.*; | |
public class OpenStreetMapProvider extends AbstractMapProvider { | |
public String[] subdomains = new String[] { "", "a.", "b.", "c." }; | |
public OpenStreetMapProvider() { |