My Recent Pastes (540 and counting)

Pastes by rsl (540 and counting)

Pages:

Below are the 15 most recent pasties by rsl.

September 16, 2008
6:57PM EDT
by rsl

class Klass
  @array = [1,2,3]
  
  def self.fuckup
    backup = @array.dup

September 16, 2008
5:12PM EDT
by rsl

> class Foo
    def speak
      puts "speaking"
      end
    end

September 15, 2008
2:24PM EDT
by rsl

module MyModule
  def self.included(base)
    base.extend ClassMethods
  end

September 11, 2008
2:09PM EDT
by rsl

From d3eedfaae09942c3d99377174ddf8cd554eee0a2 Mon Sep 17 00:00:00 2001
From: rsl <rsl@luckysneaks.com>
Date: Thu, 11 Sep 2008 14:07:44 -0400
Subject: [PATCH] don't hit the db if there's no ids for records

September 10, 2008
2:24PM EDT
by rsl

From 9b1480a62af1c7a9141bbd3f74cf50098144e3fa Mon Sep 17 00:00:00 2001
From: rsl <rsl@luckysneaks.com>
Date: Wed, 10 Sep 2008 14:22:05 -0400
Subject: [PATCH] fixed association preloading to use = instead of IN when there's only one record

September 09, 2008
12:28AM EDT
by rsl

sneaky:optimized_oyster rsl$ sudo gem cleanup
Cleaning up installed gems...
Attempting to uninstall capistrano-2.4.3
Successfully uninstalled capistrano-2.4.3
Attempting to uninstall capistrano-2.4.0

September 08, 2008
8:47PM EDT
by rsl

diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index 61fa34a..c60850f 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -95,7 +95,7 @@ module ActiveRecord

August 15, 2008
2:01PM EDT
by rsl

richcollins joined the chat room.
[1:49pm] richcollins: Is config.gem completely broken?
[1:50pm] richcollins: These gems that this application depends on are missing
[1:50pm] richcollins: except they aren't
[1:50pm] rsl: richcollins: http://www.codinghorror.com/blog/archives/001079.html

August 15, 2008
12:37PM EDT
by rsl

    # Override Rails' default
    def caches_page(*actions)
      return unless perform_caching
      actions = actions.map(&:to_s)
      after_filter do |c|

August 15, 2008
11:25AM EDT
by rsl

scope = Entry.live
@entries = params[:time] == "recent" ? scope.recent : scope.all

August 15, 2008
8:52AM EDT
by rsl

class CellSystem
  def self.cells
    @@cells ||= []
  end
end

August 14, 2008
7:19PM EDT
by rsl

ignoring attempt to close fund:0x1ffa234 with a
  opened at byte 495, line 13
  closed at byte 511, line 13
  attributes at open: {}
  text around open: "href=\"/funds/1352\">#<Fund:0x1ffa234></a>"

August 14, 2008
11:37AM EDT
by rsl

  def parsed_sort_code
    @parsed_sort_code ||= sort_code.to_s.scan(/../)
  end
  
  %w{first middle last}.each_with_index do |segment, index|

August 13, 2008
4:13PM EDT
by rsl

"> "123asd[,".gsub(/[^[:alnum]]/, "")
(irb):1: warning: character class has `[' without escape
(irb):1: warning: regexp has `]' without escape
# => "123asd[,"
> "123asd[,".gsub(/[^\[:alnum\]]/, "")

August 13, 2008
3:53PM EDT
by rsl

[3:34pm] charsets joined the chat room.
[3:35pm] charsets: hey
[3:35pm] charsets: if i add
[3:35pm] charsets: a new entry in the database
[3:35pm] charsets: how do i render it

Next page

Previous page