Skip to content

Instantly share code, notes, and snippets.

View petebrowne's full-sized avatar

Pete Browne petebrowne

View GitHub Profile
@petebrowne
petebrowne / CSSTransitionGroup.coffee
Created October 3, 2014 21:05
ReactCSSTransitionGroup Events
React = require('react')
ReactTransitionGroup = require('react/lib/ReactTransitionGroup')
CSSTransitionGroupChild = require('./CSSTransitionGroupChild.cjsx')
CSSTransitionGroup = React.createClass
displayName: 'CSSTransitionGroup'
propTypes:
@petebrowne
petebrowne / in_network.sql
Created January 15, 2014 21:03
Insurance Coverage SQL queries. Third one is broken...
SELECT DISTINCT "insurance_insuranceissuer"."id", "insurance_insuranceissuer"."slug", "insurance_insuranceissuer"."issuer_code", "insurance_insuranceissuer"."legal_name", "insurance_insuranceissuer"."marketing_name", "insurance_insuranceissuer"."company_code", "insurance_insuranceissuer"."group_code", "insurance_insuranceissuer"."state", "insurance_insuranceissuer"."created_at", "insurance_insuranceissuer"."updated_at" FROM "insurance_insuranceissuer" INNER JOIN "insurance_coverage_practiceissuer" ON ( "insurance_insuranceissuer"."id" = "insurance_coverage_practiceissuer"."issuer_id" ) WHERE ("insurance_coverage_practiceissuer"."in_network" = %s AND "insurance_coverage_practiceissuer"."practice_id" = %s ) LIMIT 21' - PARAMS = (True, u'b107925f-aac8-4baa-b304-3ec720ef082d'); args=(True, u'b107925f-aac8-4baa-b304-3ec720ef082d')
@petebrowne
petebrowne / filters_1.py
Created February 10, 2013 17:27
These are some proposed filter configuration designs for Django Assetfiles. The goal is to have a natural API for defining the inputs and filters, while being able to determine the input files from given output files.
from assetfiles.conf import filter, patterns
from assetfiles.filters import (CoffeeFilter, ConcatFilter,
SassFilter, UglifyFilter)
# Resembles Django's URL configuration where the filters are basically views.
# Apps could define their own filter patterns, but you would not need to
# explicitly `include` filter patterns.
#
# The big trick here is reversing the patterns in order to find the input files
@petebrowne
petebrowne / config.ru
Created October 1, 2011 19:53 — forked from jayzes/config.ru
Sprockets/Compass Madness
require 'rubygems'
require "bundler/setup"
require 'rack'
require 'sprockets'
require 'sprockets-sass'
require 'compass'
Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |paths|
paths.push *Compass.sass_engine_options[:load_paths]
@petebrowne
petebrowne / gist:752136
Created December 22, 2010 21:29
Head.js Opera 11.0 Loading Bug
<!-- Works in Opera 11.0 -->
<html>
<head>
<script src="head.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script>
head.js("script1.js");
head.ready(function() {
alert('READY!');
/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:52:in `initialize'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:355:in `new'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:355:in `search'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:181:in `resolve'
/usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:95:in `sort_by'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:177:in `each'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:177:in `sort_by'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:177:in `resolve'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:162:in `start'
/home/[username]/.gem/ruby/1.8/gems/bundler-1.0.0/lib/bundler/resolver.rb:131:in `resolve'