Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
@cspanring
cspanring / app.js
Created November 10, 2013 02:18
Ember CartoDB Leaflet Example
App = Ember.Application.create();
App.IndexView = Ember.View.extend({
cartoDbUser: 'cspanring',
cartoDbSql: 'SELECT * FROM cambridge_neighborhoods',
cartoDbCartoCss: '#cambridge_neighborhoods { \
polygon-fill: yellow; \
polygon-opacity: 0.2; \
line-width: 2; \
@cspanring
cspanring / index.html
Last active December 27, 2015 16:49
Basic Leaflet CartoDB Core Example
<!DOCTYPE html>
<html>
<head>
<title>Leaflet CartoDB Core Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
@cspanring
cspanring / index.html
Last active December 26, 2015 19:39
Basic CartoDB, Leaflet, UTFGrid example.
<!DOCTYPE html>
<html>
<head>
<title>Leaflet CartoDB Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
@cspanring
cspanring / nginx.conf
Created August 15, 2013 19:24 — forked from mbertrand/nginx.conf
GeoNode nginx configuration (with supervisor)
server {
listen 80;
server_name mydomain.edu localhost;
location /static {
alias /www/geonode/src/GeoNodePy/geonode/static_root;
}
#GEOSERVER
@cspanring
cspanring / shp2pgsql.sh
Created August 15, 2013 14:47
Shapefile to PostGIS batch import bash script
#!/bin/bash
EPSG_CODE=<EPSG_CODE>
DATABASE_NAME=<DATABASE_NAME>
DATABASE_SCHEMA=<DATABASE_SCHEMA>
DATABASE_USER=<DATABASE_USER>
for f in *.shp
do
shp2pgsql -I -s $EPSG_CODE -d $f $DATABASE_SCHEMA.`basename $f .shp` > `basename $f .shp`.sql
done
@cspanring
cspanring / index.html
Created August 8, 2013 19:14
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@cspanring
cspanring / index.html
Created August 7, 2013 17:31
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@cspanring
cspanring / index.html
Created August 7, 2013 17:26
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@cspanring
cspanring / homebrew-qgis.md
Last active December 20, 2015 07:29
Homebrew hints for QGIS 1.8.0

Homebrew hints for QGIS 1.8.0

Qwt 6.1.0 upgrade is causing crashes or build problems
Downgrade to Qwt 6.0.1 and reinstall

$ brew remove qwt
$ git checkout 4392eba Library/Formula/qwt.rb
$ brew install qwt

QGIS shows SIP error messages on startup, indicating that QGIS is using the system Python instead of Homebrew's Python

@cspanring
cspanring / .jshintrc
Created July 15, 2013 13:04
jshint config file
{
"node": true,
"browser": true,
"es3": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"quotmark": true,
"curly": true,
"eqeqeq": true,