Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


My Recent Pastes (435 and counting)

Browse Pastes by technoweenie (435 and counting)


June 12, 2008
7:28PM EDT
by technoweenie

class Foo
  include ActiveModel::StateMachine

  state_machine do
    state :open

May 20, 2008
12:39PM EDT
by technoweenie

class << ActiveRecord::Base
  def concerns(*args)
    args.each do |concern|
      require_dependency "#{name.underscore}/#{concern}"
    end

May 18, 2008
11:29AM EDT
by technoweenie

## your .git/config

[branch "master"]
        remote = origin
        merge = refs/heads/master

April 18, 2008
4:57PM EDT
by technoweenie

## post-receive hook

/home/git/ruby/duplikate.rb mephisto "rel-0.8"

## duplicate.rb script

April 11, 2008
1:56AM EDT
by technoweenie

desc "freeze rails edge"
task :edge do
  ENV['SHARED_PATH']    = '../../shared' unless ENV['SHARED_PATH']
  ENV['GIT_FORK']     ||= 'rails'
  ENV['RAILS_PATH']   ||= File.join(ENV['SHARED_PATH'], 'rails')

March 28, 2008
5:31PM EDT
by technoweenie

$("a")
   .filter(".clickme")
     .click(function(){
       alert("You are now leaving the site.");
     })

March 28, 2008
9:38AM EDT
by technoweenie

class Foo
  state_machine :initial => :init do
    state :init
    state :start, :enter => :blah
    event :start, :from => :init, :to => :start

March 27, 2008
4:00PM EDT
by technoweenie

class Foo
  state_machine :initial => :init do
    state :init
    state :start, :enter => :blah
    event :start, :from => :init, :to => :start

March 26, 2008
9:51PM EDT
by technoweenie

>> t = Time.now.utc.xmlschema
=> "2008-03-27T02:50:01Z"
>> ActiveSupport::JSON.decode %({"a": #{t.inspect}})
=> {"a"=>Thu Mar 27 02:50:01 UTC 2008}

March 26, 2008
2:40PM EDT
by technoweenie

if @records.each do |record|
  puts record
end.empty?
  puts 'empty!'
end

March 26, 2008
12:45PM EDT
by technoweenie

onready do |doc|
  (doc / '.txaction_display') do
    livequery 'mouseover' do
      (self / '.editbutton').show if self['merchantid']
      (self / '.merge_icon').show

March 25, 2008
1:59PM EDT
by technoweenie

>> gem 'rails'
=> true
>> gem 'rails'
=> false
>> gem 'rails', '= 2.0.1'

March 10, 2008
1:19PM EDT
by technoweenie

#!/usr/bin/ruby

# Post your direct messages from certain users as public tweets
# 
# (ex) Broadcast DM's from tyler-durden and spacemonkey

March 06, 2008
5:29PM EDT
by technoweenie

>> u.admin?
=> false
>> u.admin
=> false
>> u.admin = nil

March 04, 2008
6:09PM EDT
by technoweenie

## my repo's post-receive hook
/home/git/ruby/duplikate.rb mephisto "rel-0.8"

## duplicate.rb
#! /usr/bin/ruby

Next page