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);
},
@cspanring
cspanring / add_openfilegdb_drv.diff
Created May 7, 2014 15:55
Adds OpenFileGDB GDAL driver to QGIS 2.2
From c54e2a8f30d3755550c61fc7a2f55df928c1cf50 Mon Sep 17 00:00:00 2001
From: Christian Spanring <cspanring@gmail.com>
Date: Wed, 7 May 2014 11:40:09 -0400
Subject: [PATCH] Add OpenFileGDB read-only driver option to OGR directory
drivers
available in gdal-1.11.0.
See https://github.com/qgis/QGIS/commit/a096cf45e4ad2fe9dc35fdb3d4453c73e26e7621 for details in QGIS master.
---
src/providers/ogr/qgsogrprovider.cpp | 4 ++++
@cspanring
cspanring / map.geojson
Last active August 29, 2015 14:01
Somerville Porchfest 2014, the plan. (full map and listing: http://www.somervilleartscouncil.org/porchfest/map/2014)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cspanring
cspanring / isodate.js
Created August 19, 2014 15:46
Ember Data Isodate Transform (requires moment.js)
import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(serialized) {
if (serialized) {
return moment(serialized).toDate();
}
return serialized;
},

Keybase proof

I hereby claim:

  • I am cspanring on github.
  • I am cspanring (https://keybase.io/cspanring) on keybase.
  • I have a public key whose fingerprint is CC71 87E3 0D9F C4FA 7307 70F0 4FF8 DBE9 11D2 B681

To claim this, I am signing this object:

@cspanring
cspanring / ember-cli@0.1.6-error.txt
Last active August 29, 2015 14:13
ember-cli error after upgrading from 0.1.5 to 0.1.6 (ember 1.8.1, ember-data 1.0.0-beta.12)
`ember s` error output:
File: sasaki-floorplan/adapters/application.js
false == true
AssertionError: false == true
at Visitor.PVp.visitWithoutReset (/Users/cspanring/Projects/sasaki-floorplan/node_modules/ember-cli-esnext/node_modules/broccoli-esnext/node_modules/esnext/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:135:12)
at Visitor.PVp.visit (/Users/cspanring/Projects/sasaki-floorplan/node_modules/ember-cli-esnext/node_modules/broccoli-esnext/node_modules/esnext/node_modules/recast/node_modules/ast-types/lib/path-visitor.js:117:21)
at Function.transform (/Users/cspanring/Projects/sasaki-floorplan/node_modules/ember-cli-esnext/node_modules/broccoli-esnext/node_modules/esnext/node_modules/regenerator/lib/visit.js:31:18)
at transform (/Users/cspanring/Projects/sasaki-floorplan/node_modules/ember-cli-esnext/node_modules/broccoli-esnext/node_modules/esnext/lib/index.js:86:23)
at compile (/Users/cspanring/Projects/sasaki-floorplan/node_modules/ember-cli-esnext/node_modules/br
@cspanring
cspanring / QGIS cmake in homebrew
Created January 31, 2011 01:38
homebrew formula cmake arguments and output for QGIS.
cmake -DCMAKE_INSTALL_PREFIX=~/Applications -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_INTERNAL_SPATIALITE=TRUE -DGEOS_INCLUDE_DIR=/usr/local/Cellar/geos/3.2.2/include -DGEOS_LIBRARY=/usr/local/Cellar/geos/3.2.2/lib/libgeos_c.dylib -DGDAL_INCLUDE_DIR=/usr/local/Cellar/gdal/1.7.3/include -DGDAL_LIBRARY=/usr/local/Cellar/gdal/1.7.3/lib/libgdal.dylib -DPYTHON_EXECUTABLE=/usr/local/Cellar/python/2.7.1/bin/python
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
@cspanring
cspanring / sqlconfig.xml
Created February 10, 2011 21:21
weave db configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlConfig SYSTEM "/opt/weave_data/config/sqlconfig.dtd">
<sqlConfig serverName="MAPC Weave">
<connection database="geonode" dbms="PostGreSQL" ip="localhost" name="GeoNode" pass="***" port="5432" user="user"/>
<databaseConfig connection="GeoNode" dataConfigTable="conf_attr" geometryConfigTable="conf_geom" schema="weave"/>
<connection database="gisdata" dbms="PostGreSQL" ip="0.0.0.0" name="MAPC_GISDATA" pass="***" port="5432" user="user"/>
<connection database="postgres" dbms="PostGreSQL" ip="0.0.0.0" name="MAPC_Weave" pass="***" port="5432" user="user"/>
<databaseConfig connection="MAPC_Weave" dataConfigTable="config_attributecolumn" geometryConfigTable="config_geometry" schema="weave"/>
</sqlConfig>
@cspanring
cspanring / install-weave-nightly.sh
Created February 11, 2011 16:09
download and install nighly weave builds
#!/bin/bash
# download and install nightly weave build
# steps:
# download
# extract
# copy weave client files to www dir
# remove old weave server app from tomcat
# copy weave server app to tomcat dir
{
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 : "",