Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
@cspanring
cspanring / basemap-readme.md
Created June 13, 2012 12:18
MAPC basemap integration

MAPC basemap integration

This document explains how you can integrate a MAPC tile layer.

First, download or include our layer definitions:

<script type="text/javascript" src="http://tiles.mapc.org/layers.js"></script>

Then, follow the instructions below to add a MAPC layer to your JavaScript map:

@cspanring
cspanring / almost-github.css
Created August 1, 2012 12:52
almost github css
html,
body {
color: black;
}
* {
margin: 0;
padding: 0;
}
@cspanring
cspanring / psqlfix.txt
Created August 13, 2012 15:26
Change postgres default template0 to UTF8 encoding
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
@cspanring
cspanring / ubuntu-django-setup.md
Created September 12, 2012 12:26
A few quick steps to setup Ubuntu 10.04 as Django application server

Basic Ubuntu 10.04.3 LTS server setup to deploy Django appplications

This document covers basic steps to setup

  • a django user who will serve Django applications,
  • [Nginx] as web server,
  • [Gunicorn] as a WSGI and
  • [PostgreSQL] with [PostGIS] as database server.

...on a default Ubuntu 10.04 server installation.

@cspanring
cspanring / hubway-hackday.md
Created October 27, 2012 00:34
Hubway Data Visualization Hack Day
@cspanring
cspanring / Nginx-domain-conf
Created January 26, 2013 01:00
Example Nginx and Gunicorn configurations for GeoNode deployment
server {
listen 80;
server_name mydomain.org;
root /var/www;
access_log off;
error_log /home/user/geonode/log/nginx_error.log;
@cspanring
cspanring / cfa-boston-mapc-meetup.markdown
Created February 20, 2013 15:34
Notes from the CfA Boston Brigade meetup at MAPC.

CfA Brigade Boston Weekly Hack Night

Feb 19th, 2013 @ MAPC

MAPC Mission

The Metropolitan Area Planning Council (MAPC) is a regional planning agency serving the people who live and work in the 101 cities and towns of Metropolitan Boston. Our mission is promoting smart growth principles and regional collaboration.

Projects

@cspanring
cspanring / location_v2.json
Last active December 14, 2015 09:59
Urbanite Location Model
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ 0, 0 ]
},
"properties": {
"name": "NAME",
"bounded_box": {
"southwest": {
@cspanring
cspanring / geojson-goes-ember.js
Last active December 14, 2015 16:19
Dabbling with GeoJSON and ember.js
// The GeoJSON object
//
// {
// "type": "FeatureCollection",
// "features": [
// {
// "type": "Feature",
// "geometry": {
// "type": "Point",
// "coordinates": [42.3875, -71.1]