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 / 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 / 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 / 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 / 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: