Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
@cspanring
cspanring / controllers.application.js
Last active January 20, 2017 20:26
truth helpers cp
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
truthArray: ['truth'],
truth: null,
showTruth: Ember.computed.bool('truth')
@cspanring
cspanring / controllers.application.js
Created October 27, 2016 20:30
external url issue
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
openUrl() {
window.location.assign('http://google.com');
}
}
@cspanring
cspanring / python.rb
Created October 13, 2016 18:16
Python 2.7.10 homebrew formula
class Python < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org"
head "https://hg.python.org/cpython", :using => :hg, :branch => "2.7"
url "https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz"
sha256 "eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a"
revision 2
bottle do
revision 3
scss_files: "app/styles/*.scss"
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BemDepth:
enabled: false
@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

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 / 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;
},
@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 / 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 ++++
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},