I hereby claim:
- I am brianjlandau on github.
- I am brianjlandau (https://keybase.io/brianjlandau) on keybase.
- I have a public key ASADZdepX0J5-Vj2nmxaby26kkElaVpSHeHAW6n6Hg3j_Qo
To claim this, I am signing this object:
{ | |
"presets": [ | |
[ | |
"env", | |
{ | |
"modules": false, | |
"targets": { | |
"browsers": "> 1%", | |
"uglify": true | |
}, |
I hereby claim:
To claim this, I am signing this object:
/* | |
DatePicker v4.4 by frequency-decoder.com | |
- This is a revised version that works with jQuery 1.2.6 as I found the original didn't work properly. | |
Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/) | |
Please credit frequency-decoder in any derivative work - thanks. | |
You are free: |
#!/usr/bin/env bash | |
if [ ${#1} -eq 0 ] | |
then echo "Error: Please supply a URL"; exit 1; | |
fi | |
ENCODING_HEADER=$(curl --silent -I $1 -H "Accept-Encoding: gzip,deflate" | tr -d '\r' | sed -En 's/^Content-Encoding: (.+)$/\1/p') | |
if [ "$ENCODING_HEADER" == "gzip" ] | |
then echo "GZIP: Enabled" |
ActiveRecord::Reflection::AbstractReflection.class_eval do | |
def build_association(*options, &block) | |
attributes = if options.first.is_a?(Hash) | |
options.first.with_indifferent_access | |
end | |
if attributes && attributes[:type].present? | |
attributes[:type].constantize.new(*options, &block) | |
else | |
klass.new(*options, &block) |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'set' | |
require 'digest/md5' | |
require 'open-uri' | |
require 'tinder' | |
require 'active_support/all' | |
require 'awesome_print' | |
# ... | |
RSpec.configure do |config| | |
# ... | |
config.include VisitWithoutRedirectsHelper, :type => :request | |
# ... | |
end |
class EmailCollection | |
include Enumerable | |
delegate :each, :to => :email_addresses | |
def initialize(raw_email_addresses) | |
@raw_email_addresses = raw_email_addresses | |
end | |
def valid_emails | |
select do |email| |
config.before(:each, :type => :request) do | |
if example.metadata[:js] | |
self.class.use_transactional_fixtures = false | |
end | |
end | |
config.after(:each, :type => :request) do | |
if example.metadata[:js] | |
self.class.use_transactional_fixtures = true | |
DatabaseCleaner.clean # Truncate the database | |
Capybara.reset_sessions! # Forget the (simulated) browser state |