Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},
{
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)
meta : { // Optional: Simple Dublin Core Metadata Element Set
title : "",
creator : "",
subject : "",
description : "",
publisher : "",
contributor : "",
@cspanring
cspanring / python2.6 for homebrew
Created July 14, 2011 15:00 — forked from voidfiles/python2.6 for homebrew
Python 2.6.x Homebrew Formula
require 'formula'
<<-COMMENTS
This is the Homebrew formula for Python.
Versions
--------
This formula is currently tracking version 2.6.x.
@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 / 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 / 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.
*
@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

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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
import Ember from 'ember';
export default Ember.Controller.extend({
appName: `Ember's Route Hook Order`,
actions: {
clearLog() {
Ember.$('.log-item').remove();
}
}