Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
@cspanring
cspanring / postgis.rb
Created September 19, 2011 00:12 — forked from tokumine/postgis.rb
PostGIS 2.0SVN Homebrew formula
# PostGIS 2.0SVN Homebrew Formula
#
# from @batu @vizzuality
#
# To use, place this file in /usr/local/Library/Formula/, then:
#
# > brew install gdal --HEAD --with-postgres
# > brew install --use-gcc postgis --HEAD
#
# If you want the original formula back just go to /usr/local and do:
@cspanring
cspanring / install-mapnik2.md
Created October 26, 2011 00:20
Mapnik2 on Ubuntu 10.04 installation

Mapnik2 on Ubuntu 10.04 installation

http://trac.mapnik.org/wiki/UbuntuInstallation

sudo apt-get install -y g++ cpp \
python-dev libxml2 libxml2-dev \
libfreetype6 libfreetype6-dev \
libjpeg62 libjpeg62-dev \
libltdl7 libltdl-dev \
libpng12-0 libpng12-dev \
@cspanring
cspanring / maven2.rb
Created October 27, 2011 20:59
Maven 2.2.1 homebrew formula (required for GeoNode build environment)
require 'formula'
class Maven2 <Formula
url 'http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz'
homepage 'http://maven.apache.org/'
if ARGV.build_head?
md5 'a40881f56a3087828545f30921ff393f'
else
md5 '3f829ed854cbacdaca8f809e4954c916'
@cspanring
cspanring / pagination.html
Created November 8, 2011 02:53
linaro django pagination template for Bootstrap framework
{# use in combination with https://github.com/zyga/django-pagination #}
{# and http://twitter.github.com/bootstrap/ #}
{# project-dir/templates/pagination/pagination.html #}
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
<ul>
{% block previouslink %}
{% if page_obj.has_previous %}
@cspanring
cspanring / childreninpoverty.xml
Created December 28, 2011 19:14
Session State to debug Weave Nightly Dec 28
<WeaveProperties name="WeaveProperties">
<backgroundColor>13421772</backgroundColor>
<cssStyleSheetName>weaveStyle.css</cssStyleSheetName>
<dashboardMode>true</dashboardMode>
<dashedSelectionBox>5,5</dashedSelectionBox>
<dataInfoURL/>
<debugScreenBounds>false</debugScreenBounds>
<defaultTextFormat>
<bold>false</bold>
<color>0</color>
[
{
"sessionState": {
"enableAddMap": true,
"dataInfoURL": null,
"enableAddPieChartHistogram": true,
"enableAddRScriptEditor": true,
"geometryMetadataRequestMode": "xyz",
"enableAddPieChart": true,
"enableAddRadViz": true,
@cspanring
cspanring / tastyhacks.py
Created February 8, 2012 18:25
Add GeoJSON support for geometry fields in django-tastypie
# Shamelessly stolen from https://github.com/newsapps/django-boundaryservice/blob/master/boundaryservice/tastyhacks.py
from django.contrib.gis.db.models import GeometryField
from django.utils import simplejson
from tastypie.bundle import Bundle
from tastypie.fields import ApiField, CharField
from tastypie.resources import ModelResource
@cspanring
cspanring / jquery.spin.js
Created February 13, 2012 14:22 — forked from innotekservices/jquery.spin.js
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@cspanring
cspanring / Freelance-Web-Developer-Post.md
Created March 16, 2012 11:04
Freelance Web Developer Job

Metropolitan Area Planning Council
Boston, MA
March 16th 2012

Freelance Web Developer

  • This is a Request for Quotes issued under M.G.L. c.30B.
  • The date stamp or postmark deadline for response is Friday, March 30th, 2012.
  • All responses go to [email protected]
  • All quotes must remain valid for 2 weeks following the response deadline.
@cspanring
cspanring / TileLayer.Bing.js
Created May 9, 2012 19:55 — forked from pagameba/TileLayer.Bing.js
Leaflet Bing layer
/*
* Portions of this code and logic copied from OpenLayers and
* redistributed under the original Clear BSD license terms:
*
* http://trac.osgeo.org/openlayers/browser/license.txt
*
* Copyright 2005-2010 OpenLayers Contributors, released under
* the Clear BSD license. See authors.txt for a list of contributors.
* All rights reserved.
*