Skip to content

Instantly share code, notes, and snippets.

View aaronlidman's full-sized avatar

Aaron Lidman aaronlidman

View GitHub Profile
@springmeyer
springmeyer / osm.pbf to postgis
Created November 1, 2010 07:23
import a pbf file into postgis from geofabrik using osmosis and osm2pgsql
# note: there is work afoot to load pbf directly with osm2pgsql
# http://lists.openstreetmap.org/pipermail/dev/2010-October/020953.html
# but for now osmosis >= 0.37 works best
# install java/osmosis if you don't already have it
sudo apt-get install sun-java6-jre
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.37.zip
unzip osmosis-0.37.zip
cd osmosis-0.37
chmod +x bin/osmosis
@tmcw
tmcw / jargon.md
Last active October 5, 2016 14:39
Startup English
This team is growing We're hiring lots of people
"Hunger" Enthusiasm
"Fire" Enthusiasm
"Spark" Enthusiasm
Commander's intent Goals
Onboarding Training
The best Pretty good
Burn Money-losing
@tmcw
tmcw / open-source-status.md
Created April 1, 2017 16:01
Where I'm at with Open Source Projects

More

  • I'm planning on spending much more time on documentation.js, to get it up to its stated mission and to nurture a larger community.
  • I'll also spend time on simple-statistics and the projects within my tmcw account.

Less

I've abandoned my maintainer statuses and privileges at mapbox, Turfjs, osmlab, tilemill-project, and openstreetmap.

  • Bryan Housel is the new owner of the osmlab organization and the openstreetmap/iD project
// each top-level message in a file is tag-prefixed (like fields) to differentiate between types
message Data {
oneof data_type {
fixed32 block_size = 1; // byte length of the following block (metadata + features/geometries)
Metadata metadata = 2;
Collection feature_collection = 3;
Collection geometry_collection = 4;
Collection collection_end = 5;
@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))
@surjikal
surjikal / install.md
Last active July 23, 2018 19:05
Presto Installation Instructions for OSX
  1. Install JDK 1.8

  2. See if JAVA_HOME ENV variable is set to 1.8. If not, add this line in your ~/.bashrc:

    export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
    

    And apply the changes to your session:

source ~/.bashrc

@perrygeo
perrygeo / ogrcat
Last active August 1, 2018 22:54
ogrcat: make line-delimited geojson features to stdout from any ogr vector datasource
#!/bin/bash
#
# ogrcat
# produces line-delimited geojson features
# Like `fio cat` but uses ogr2ogr under the hood
ECHO_FEATURES=""
ogr2ogr -f GeoJSON /vsistdout/ "$@" | while read line
@celoyd
celoyd / t.py
Last active October 2, 2018 23:36
A simple, mostly-not-mine Twitter stream consumer and s3 bucketer
#!/usr/bin/env python
'''
This code is adapted from the consensus best practice python Twitter feed
consumer that's been floating around for a while now on StackOverflow etc.
My only addition to speak of is TenminWriter. (A "tenmin" is ten minutes
worth of stream. It's just a convenient chunk; you might want to make it
shorter or longer.)
THERE ARE BUGS HERE. THIS IS BARELY TESTED. DO NOT TRUST IT.
@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`
@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