Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
# easy_install boto
# You will also need:
# - A .pem keyfile generated using the Amazon web interface to create new instances
# - The secret and access keys created from the
# The only pre-reqs are having created a keypair (.pem file)
# via the amazon web interface and knowing the AWS key and secret
#
# Usage:
# export AWS_ACCESS_KEY_ID='blahblah'
# export AWS_SECRET_ACCESS_KEY='blebleble'
@boazsender
boazsender / open-civic-data.json
Created February 5, 2011 23:29
Concept for open civic data scheme for describing geospacial and temporal civic data (crime, weather, protests, public spaces, public housing projects, public transportation paths, public transportation schedules, etc).
{
category : "", // Required Single category from (http://opencivicdata.com/#categories-wg)
properties : {} // Required Common bin for domain specific properties from from (http://opencivicdata.com/#properties-wg)
start : "", // Optional RFC3339DateTime optional start date
end : "", // Optional RFC3339DateTime optional end date
geometry : {} // Optional Geojson location feature (http://geojson.org/geojson-spec.html)
}
{
category : "category_name", // Required Single category from (http://opencivicdata.com/#categories-wg)
meta : { // Optional: Simple Dublin Core Metadata Element Set
title : "",
creator : "",
subject : "",
description : "",
publisher : "",
contributor : "",
date : "",
@juniorz
juniorz / install_postgis_osx.sh
Created July 14, 2011 03:49
Installing PostGIS on Mac OS X and Ubuntu
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@ejh
ejh / leaflet-button-control.js
Created June 15, 2012 08:11
Leaflet control button example
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},
@springmeyer
springmeyer / mapnik-linux-fonts.txt
Created November 27, 2012 21:25
default fonts available on stock ubuntu
$ node
> require('mapnik').fonts()
[ 'DejaVu Sans Bold',
'DejaVu Sans Bold Oblique',
'DejaVu Sans Book',
'DejaVu Sans Condensed',
'DejaVu Sans Condensed Bold',
'DejaVu Sans Condensed Bold Oblique',
'DejaVu Sans Condensed Oblique',
'DejaVu Sans ExtraLight',
server {
listen 80;
server_name mydomain.edu localhost;
location /static {
alias /www/geonode/src/GeoNodePy/geonode/static_root;
}
#GEOSERVER
@bmount
bmount / qgis_libs.sh
Created February 7, 2013 00:05
reminder about installing QGIS build from here: http://qgis.dakotacarto.com/ with a combination of libraries from source and homebrew. Leave a comment if you notice something barbaric (or just bad.)
sudo mkdir -p /Library/Frameworks/GDAL.framework/Versions/1.9/
sudo ln -s /usr/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.9/GDAL
sudo mkdir -p /Library/Frameworks/PROJ.framework/Versions/4/
sudo ln -s /usr/local/Cellar/proj/4.8.0/lib/libproj.dylib /Library/Frameworks/PROJ.framework/Versions/4/PROJ
# did not work: sudo ln -s `pwd`/libgeos.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS
# did work:
# $PWD is /usr/local/Cellar/geos/3.3.6/lib
sudo ln -s `pwd`/libgeos_c.1.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS
sudo mkdir -p /Library/Frameworks/SQLite3.framework/Versions/3/
sudo ln -s /usr/local/Cellar/sqlite/3.7.15/lib/libsqlite3.0.8.6.dylib /Library/Frameworks/SQLite3.framework/Versions/3/SQLite3
@wycats
wycats / app.js
Last active February 11, 2016 16:08
App.Router.map(function() {
this.resource('post', { path: '/posts/:post_id' });
});
App.PostRoute = Ember.Route.extend({
model: function(params) {
return this.store.find('post', params.post_id);
}
});