Skip to content

Instantly share code, notes, and snippets.

View aaronlidman's full-sized avatar

Aaron Lidman aaronlidman

View GitHub Profile
@leplatrem
leplatrem / gist:1415767
Created December 1, 2011 10:47
Leaflet Offline Tiles using SQL Storage
/*
* L.TileLayer.LocalCache : A tile layer using SQL Storage, if available.
*/
L.TileLayer.LocalCache = L.TileLayer.extend({
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
subdomains: 'abc',
@panicsteve
panicsteve / gist:1641705
Created January 19, 2012 18:26
Form letter template for acquired startups
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@nvkelso
nvkelso / countTiles.py
Created March 1, 2012 22:04 — forked from andrewharvey/countTiles.py
Given a WGS84 bounding box and an OSM tile zoom range calculates a total number of tiles and how much the Amazon Cloud will cost ya.
#!/usr/bin/python
# README
#
# This script is from: https://gist.github.com/1953554
# By Nathaniel Vaughn Kelso and Mike Migurski @ Stamen
#
# Based on script by andrewharvey: https://gist.github.com/1675606
#
# This script should be considered CC0 licensed
@GothAck
GothAck / index.js
Created March 20, 2012 18:33
Parsing BIG compressed XML data (OpenStreetMap) with Node.js
#!/usr/bin/env node
/*
* Parsing BIG compressed data with Node.js and SAX
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2
* Greg Miell 2012
*/
// Simple string trim prototype extension
String.prototype.trim = function() {
@sgillies
sgillies / geo_interface.rst
Last active April 10, 2024 00:26
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@migurski
migurski / polygonize.py
Created April 25, 2012 22:16
Polygonize a bag of lines
from sys import argv
from shapely.ops import polygonize
from shapely.geometry import asShape, LineString
import json
if __name__ == '__main__':
input = argv[1]
input = json.load(open(input))
@emacsen
emacsen / pyxbot.py
Created May 11, 2012 00:15
OSM Tiger expansion code
from xml.sax.handler import ContentHandler
import os
import codecs
from xml.sax.saxutils import escape
class OSMHandler(ContentHandler):
"""This is a base OSMHandler class which sets up the XML parsing, etc.
You will want to override the selectElement and transformElement
functions"""
@liamcurry
liamcurry / html5video.sh
Created May 14, 2012 20:24 — forked from markupboy/html5video.sh
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
# Output file for HTML5 video
# requirements: ffmpeg .6+
# usage: ./html5video.sh infile.mp4 640x360
target_directory='converted'
file=`basename $1`
filename=${file%.*}
filepath=`dirname $1`
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 18, 2024 11:00
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@migurski
migurski / gray-scott.py
Created September 9, 2012 02:21
Adaptation of Nicolas P. Rougier’s Gray-Scott implementation with the Glumpy dependencies removed
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright INRIA
# Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr)
#
# DANA is a computing framework for the simulation of distributed,
# asynchronous, numerical and adaptive models.
#
# This software is governed by the CeCILL license under French law and abiding