Skip to content

Instantly share code, notes, and snippets.

View cam-stitt's full-sized avatar

Cameron Stitt cam-stitt

View GitHub Profile
@cam-stitt
cam-stitt / fields.py
Created February 24, 2014 05:45
A SQLAlchemy field to process "tags"
from unittest import TestCase
from sqlalchemy.types import TypeDecorator, VARCHAR
class Tags(TypeDecorator):
impl = VARCHAR
def process_bind_param(self, value, dialect):
if value is None:
@cam-stitt
cam-stitt / config.cson
Created August 24, 2014 22:07
Atom config
'exception-reporting':
'userId': '470e2e69-cec8-36bf-090a-65c0ddd4caa4'
'release-notes':
'viewedVersion': '0.92.0'
'welcome':
'showOnStartup': false
'metrics':
'userId': '2a39f9310c56400683f32f985736d69eb16fde65'
'editor':
'fontFamily': 'Ubuntu Mono'
@cam-stitt
cam-stitt / base.html
Created October 16, 2014 04:45
Example For Block Rendering
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Example</title>
{% block styles %}{% endblock %}
{% block scripts %}{% endblock %}
</head>
@cam-stitt
cam-stitt / withRequests.js
Created August 13, 2013 23:43
A simple request mixin for Flight
/*
this.ajax({
xhr: {
url: 'some/thing'
},
events: {
done: 'somethingDone',
fail: { node: document, event: 'ajaxError' }
}
@cam-stitt
cam-stitt / data_users.js
Created August 14, 2013 04:33
An example of the event flow in Flight.
define(function(require) {
var defineComponent = require('flight/lib/component');
return defineComponent(users);
var users = function() {
this.loadUsers = function(ev, data) {
var users = [{id: 1, name: 'Jack'}, {id:2, name: 'Jill'}];
this.trigger(document, 'dataUsers', {users: users});
};
@cam-stitt
cam-stitt / Preferences.sublime-settings
Created September 6, 2013 17:37
Sublime Text 3 Settings
{
"auto_complete": false,
"close_windows_when_empty": false,
"color_scheme": "Packages/User/Base16/base16-tomorrow.dark.tmTheme",
"find_selected_text": true,
"fold_buttons": true,
"folder_exclude_patterns": [
".svn",
".git",
".hg",
@cam-stitt
cam-stitt / FlightComponent.sublime-snippet
Last active December 25, 2015 17:59
Sublime Text snippet for coffee script flight component
<snippet>
<content><![CDATA[
define(function(require) {
var defineComponent = require('flight/lib/component');
return defineComponent(${1});
function ${1}() {
this.defaultAttrs({
@cam-stitt
cam-stitt / codeship_setup.sh
Last active August 24, 2016 12:12
Codeship Go
source /dev/stdin <<< $(curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/go.sh)"
go get github.com/Masterminds/glide
glide install
rsync -razC vendor/ $GOPATH/src/
@cam-stitt
cam-stitt / example.proto
Last active March 6, 2017 01:44
GRPC Healthcheck
syntax = "proto3";
package example;
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {

Linux:

sudo apt-get install -y autoconf automake libtool

OSX:

brew install autoconf automake libtool