My Recent Pastes (183 and counting)

Pastes by defunkt (183 and counting)

Pages:

Below are the 15 most recent pasties by defunkt.

April 02, 2008
12:37AM EDT
by defunkt

rails_root = "/data/github/current"

God.watch do |w|
  w.name     = 'bj'
  w.interval = 30.seconds

September 23, 2007
6:22PM EDT
by defunkt

## This is the final pastie.  You can now go outside and play.

September 23, 2007
6:21PM EDT
by defunkt

## Shoes api scraper
matches = `grep rb_define_method shoes/*`

hash = Hash.new { |h, k| h[k] = [] }

September 23, 2007
6:20PM EDT
by defunkt

## .vimrc
set foldmethod=syntax
set foldlevelstart=1
set foldnestmax=5
"set foldclose=all

September 23, 2007
6:20PM EDT
by defunkt

  1) Failure:
test_spec:163
<"\302\241Recepci\303\263n, amigo!"> expected but was
<"\241Recepci\363n, amigo!">.

September 20, 2007
1:22PM EDT
by defunkt

Install this: http://www.vim.org/scripts/script.php?script_id=4

Then put this in your .vimrc:

vmap c :TC<CR>

September 18, 2007
7:09PM EDT
by defunkt

#!/usr/bin/env ruby
#
# An example hook script that is called after a successful
# commit is made.
#

September 17, 2007
2:21AM EDT
by defunkt

  require:
    upstream: 127.0.0.1:9010
    server_name: require.errtheblog.com

  require_plugins:

September 13, 2007
4:18PM EDT
by defunkt

require File.dirname(__FILE__) + '/helper'

context "Filter (using select)" do
  
  xspecify "simple ==" do

September 13, 2007
3:35PM EDT
by defunkt


Chris,
Just thought you'd like to know what Matz said about Ambition.
---------------------

September 12, 2007
12:04AM EDT
by defunkt

$:.unshift File.dirname(__FILE__) + '/../lib'
%w( ambition rubygems active_record benchmark ).each { |f| require f }

class User < ActiveRecord::Base
  def self.reflections

September 11, 2007
11:30PM EDT
by defunkt

## Ambition 0.1.0
                                    user     system      total        real
simple select                   7.030000   0.020000   7.050000 (  7.052899)
dual select                     8.050000   0.010000   8.060000 (  8.094917)
join select                     7.890000   0.030000   7.920000 (  8.003906)

September 11, 2007
11:23PM EDT
by defunkt

## Ambition 0.1.0
                                    user     system      total        real
simple select                   0.680000   0.010000   0.690000 (  0.691003)
dual select                     0.820000   0.000000   0.820000 (  0.823362)
join select                     0.800000   0.000000   0.800000 (  0.801985)

September 11, 2007
9:25PM EDT
by defunkt

## runs against db with sql
User.select { |u| u.age > 30 }.each ... blah ...

## runs against our array
User.mock_with users(:chris, :pj, :todd)

August 07, 2007
12:18PM EDT
by defunkt

class Struct
  include Enumerable

  # Branch on whether this is a Struct/Struct subclass or a generated anonymous class
  def self.new(*args, &block)

Next page