Public Gists by bcardarella

Gravatar
Sat Oct 24 22:35:21 -0700 2009
1
2
3
# Install gems locally, and only locally, without gem complaining
# about path access, and ensuring access to executables.
#
Gravatar
Fri Oct 02 13:44:03 -0700 2009
1
2
3
# HaveFilter matchers for RSpec
# save as: spec/support/have_filter.rb
#
gist: 191210 Should Have Named Scope mat...
Gravatar
Tue Sep 22 09:22:44 -0700 2009
1
2
3
module Shoulda # :nodoc:
  module ActiveRecord # :nodoc:
 
gist: 185644 Float#round_to_faction
Gravatar
Fri Sep 11 16:04:23 -0700 2009
1
2
3
class Float
 
  # Takes a fraction and will round a float to the nearest multiple
Gravatar
Sun Aug 30 08:12:57 -0700 2009
1
2
3
:HI: Hawaii
:KY: Kentucky
:MN: Minnesota
Gravatar
Wed Aug 26 05:59:18 -0700 2009
1
2
3
---
:UY: Uruguay
:NP: Nepal
Gravatar
Mon Jun 29 13:14:51 -0700 2009
1
2
3
context "My Custom Query" do
   setup do
      @positive_record = positive_record_getter
Gravatar
Fri May 01 10:56:54 -0700 2009
1
2
Dan Pickett, http://en.oreilly.com/rails2009/profile/46469
Brian Cardarella, http://en.oreilly.com/rails2009/profile/45790
Gravatar
Sat Apr 25 12:09:41 -0700 2009
1
2
3
require 'rubygems'
require 'wirble'
require 'pp'
gist: 98869 Benchmark your Test::Unit t...
Gravatar
Mon Apr 20 18:06:28 -0700 2009
1
2
3
require 'test/unit'
require 'benchmark'
 
gist: 98663 Evil Autotest has Temper Ta...
Gravatar
Mon Apr 20 11:53:49 -0700 2009
1
2
3
# http://gist.github.com/10524
# Prevents autotest from running your entire test suite after fixing a failed test.
# Works with ZenTest 3.10.0
Gravatar
Thu Apr 09 09:33:32 -0700 2009
1
2
stub(current_user).shows { Object.new }
stub.instance_of(Object).build(anything) { my_stuff }
Gravatar
Thu Apr 09 08:35:35 -0700 2009
1
2
3
h1. Boston.rb hackfest, April 7th, 2009
 
h2. Hello
Gravatar
Tue Mar 31 20:50:16 -0700 2009
1
2
3
oading autotest/cucumber_rails
Warning: $KCODE is NONE.
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/treetop-1.2.5/lib/treetop/ruby_extensions/string.rb:31: warning: method redefined; discarding old indent
Gravatar
Sun Mar 01 21:39:44 -0800 2009
1
2
3
[*1..99].reverse.each do |i|
  phrase = ["#{i} bottles of beer on the wall",
           "#{i} bottles of beer",
gist: 66515 Ruby 1.8 and 1.9 side-by-side
Gravatar
Wed Feb 18 12:15:36 -0800 2009
1
2
3
#!/bin/sh
 
mkdir -p /usr/local/src && cd /usr/local/src
gist: 64930 ApplScript to setup Environ...
Gravatar
Sun Feb 15 16:45:32 -0800 2009
1
2
3
tell application "MacVim"
activate
set bounds of the first window to {0, 0, 950, 900}
gist: 60866 Pretty Bash Prompt with col...
Gravatar
Mon Feb 09 09:00:43 -0800 2009
1
2
3
# use with .git-completion.sh
# this script will color the branch name RED if it is dirty
 
gist: 59440 Commit message rewriter for...
Gravatar
Fri Feb 06 07:27:20 -0800 2009
1
2
3
#!/usr/bin/env ruby
#
# Copy this file into .git/hooks and chmod +x
gist: 58383 Git Autocompletion
Gravatar
Wed Feb 04 14:25:51 -0800 2009
1
2
3
source ~/.git-completion.sh
 
alias gco='git co'