Skip to content

Instantly share code, notes, and snippets.

View petebrowne's full-sized avatar

Pete Browne petebrowne

View GitHub Profile
/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'
@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!');
@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 / 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 / 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 / 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 / bem.scss
Created March 5, 2015 17:35
BEM Mixins
// BEM mixins for laying out modules.
// Based on:
//
// https://medium.com/@marcmintel/pushing-bem-to-the-next-level-with-sass-3-4-5239d2371321
$element-separator: '__' !default;
$modifier-separator: '--' !default;
// Creates a "block" in a BEM module.
//
@petebrowne
petebrowne / keybase.md
Created November 10, 2015 22:53
keybase.md

Keybase proof

I hereby claim:

  • I am petebrowne on github.
  • I am petebrowne (https://keybase.io/petebrowne) on keybase.
  • I have a public key whose fingerprint is 7DD0 A89C 06AD F4F6 CFC1 AB45 B26F 34F6 A3E8 52DB

To claim this, I am signing this object:

navigator.serviceWorker.register('service-worker.js').then(function(registration) {
console.log('registered!', registration)
});
console.log(self);
self.addEventListener('install', event => {
console.log('installed!', event);
});
self.addEventListener('activate', event => {
console.log('activated!', event);
});