Skip to content

Instantly share code, notes, and snippets.

View gavinblair's full-sized avatar

Gavin Blair gavinblair

View GitHub Profile
@gavinblair
gavinblair / currentfunction.py
Created October 9, 2013 20:32
Sublime Text plugin to display the current function in the status bar. I put it in %APPDATA%/Sublime Text 2/Packages/currentfunction/
import sublime, sublime_plugin
class FunctionInStatusListener(sublime_plugin.EventListener):
def on_deactived(self, view):
view.erase_status('function name')
def on_close(self, view):
view.erase_status('function name')
@gavinblair
gavinblair / gist:7344513
Created November 6, 2013 21:35
domain access - add this after the $databases settings in sites/default/settings.php
/**
* Add the domain module setup routine.
*/
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';
@gavinblair
gavinblair / plugin.js
Created November 22, 2013 16:04
Pattern for creating a JavaScript plugin, from http://codereview.stackexchange.com/a/21147
(function(ns){
//private scoping
var privVar = '...';
function priv(){...}
//expose a function
ns.myFunc = function(){...};
}(this.myLib = this.myLib || {}));
@gavinblair
gavinblair / post.md
Last active December 29, 2015 13:29
PenEquity Woodland Vote

DeForest City?

City Council voted August 27th, 2013 on whether to clear a woodland to build a mall (they voted YES). Before the vote, I attempted to raise some awareness about the issue by building PenEquity Woodland Vote - it uses an Open Council API to turn your address into the correct Ward number, then compares it to a spreadsheet that knows which councillor is planning on voting YES or NO.

Technology used:

PenEquity Woodland Vote

@gavinblair
gavinblair / post.md
Last active December 29, 2015 13:29
gifparty

gifparty

A gifparty is something I just made up right now. I guess it's like a youtube party, but with gifs.

This app will pull in gifs from a Google spreadsheet, display each for 10 seconds. It continually checks the spreadsheet for updates and adds new gifs to the end of the queue.

Make your own gifparty

@gavinblair
gavinblair / post.md
Created November 27, 2013 17:52
gifmirror
@gavinblair
gavinblair / post.md
Last active December 29, 2015 15:59
qrpong
@gavinblair
gavinblair / post.md
Created November 28, 2013 16:11
QRapt
@gavinblair
gavinblair / post.md
Last active December 29, 2015 15:59
Gluten Free Lunch

Gluten Free Lunch

I found out that I had a problem with gluten in February 2012. It wasn't as difficult as I thought it would be to go gluten free. There are only really three recurring issues that I constantly face:

  • If something is gluten free, it doesn't mean that I will like it - There are a LOT of gluten free products out there. A lot of it tastes like sand.
  • I miss beer. - I have taken to drinking White Russians. That's a hell of a caucasian, Jackie
  • If I don't pack a lunch, I'm screwed. - I have about four go-to lunches in downtown London. This list starts to feel pretty short after a while, and it severely limits options when going out with others.

While I can't do much about the first two (besides becoming The Dude), I can at least crowdsource some options for lunch downtown! Check it out, and if you know any gluten free meals downtown, please add to the list.

@gavinblair
gavinblair / wanted.md
Last active January 4, 2016 03:59
Wanted: #ldnont Council Meeting Vote Parser

Open Council

Open Council is happening! Currently a London implementation of Kevin O'Donnell's OttWatch system is working hard on pulling meetings from London's SIRE system, making it so you can discuss individual council meetings publicly.

A very important part of the original vision for Open Council was the ability to view council votes by councillor. We are almost there! London records their votes in a very different way than Ottawa, however, and we've run into a bit of a snag.

So, I have a programming challenge for you!

Given a council meeting's minutes from London's implementation of SIRE, output the motions made and the voting results in a machine-readable format.