My Recent Pastes (141 and counting)

All Pasties (over 141 and counting)

Pages: 1 3 5 10

Below are summaries of the 15 most recent pasties by Brian Donovan.

May 22, 2007
3:31PM EDT
by Brian Donovan

1
2
3
4
5
--- original
+++ mutation 
def self.chown(options = {  })   
  options = options.dup   
  options[:audit] = true unless options.has_key?(:audit)   

May 22, 2007
2:54PM EDT
by Brian Donovan

1
2
3
4
5
41 mutations remaining...
40 mutations remaining...
39 mutations remaining...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
Mutation caused a syntax error:

May 15, 2007
2:18PM EDT
by Brian Donovan

1
2
3
4
  def self.make_random_registered_user
    login = String.random(8) while exists?(:login => login)
    signup :login => login, :password => password
  end

May 01, 2007
1:50PM EDT
by Brian Donovan

1
2
3
4
5
class Array
  def method_missing_with_magic_map(method, *args, &block)
    method_missing_without_magic_map(method, *args, &block)
  rescue NoMethodError
    error = $!

April 25, 2007
4:49PM EDT
by Brian Donovan

1
2
3
4
5
## Upcoming

#<HCalendar:0x1455910
 @category=["Festivals", "worldshelters", "MAKE"],
 @description=

April 25, 2007
3:33PM EDT
by Brian Donovan

1
2
3
4
autoload -U colors
colors
export PROMPT="$fg[cyan]%n $fg[yellow]%~
\$%{$reset_color%} "

April 25, 2007
3:28PM EDT
by Brian Donovan

1
2
3
4
autoload -U colors
colors
export PROMPT="$fg[cyan]%n $fg[yellow]%~
\$$reset_color " 

April 20, 2007
12:59PM EDT
by Brian Donovan

1
2
3
4
5
module ActiveRecord
  class Base
    protected
    def define_read_method_with_memoization(symbol, attr_name, column)
      define_read_method_without_memoization(symbol, attr_name, column)

April 12, 2007
8:09PM EDT
by Brian Donovan

1
2
3
4
5
if $0 == 'irb'
  self.instance_eval do
    def method_missing(method, *args)
      User.find_by_login(method.to_s) || super
    end

April 12, 2007
7:50PM EDT
by Brian Donovan

1
2
3
4
5
# dealing with whatever=true|false|0|1|t|f
# pflag lets you check it using:
# 
#   pflag.whatever?
# 

April 11, 2007
7:38PM EDT
by Brian Donovan

1
2
3
4
5
var $mocha = {
  expectations: [], 
  actuals: [], 
  
  actualsForObject: function(obj) {

April 10, 2007
4:11PM EDT
by Brian Donovan

1
2
3
4
5
>> v=Venue.find(:first)
=> #<Venue:0x339e72c ...>
>> v.user.is_a? User
=> true
>> v.user = User.new

April 06, 2007
6:10PM EDT
by Brian Donovan

1
2
3
4
5
*** LOCAL GEMS ***

actionmailer (1.3.3, 1.3.2)
    Service layer for easy email delivery and testing.

March 28, 2007
8:04PM EDT
by Brian Donovan

1
2
3
4
5
  def context_alert(options={})
    with_options({:widget => 'alert'}.merge(options)) do |alert|
      in_context do |context|
        obj = Builder::BlankSlate.new
        ivs = Object.instance_method(:instance_variable_set).bind(obj)

March 28, 2007
7:44PM EDT
by Brian Donovan

1
2
3
4
5
  def context_alert(options={})
    with_options({:widget => 'alert'}.merge(options)) do |alert|
      in_context do |context|
        obj = Object.new
        obj.instance_variable_set("@context", context)

Next page

Previous page