This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:340:in `block in initialize' | |
/Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:333:in `each' | |
/Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:333:in `initialize' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/remote_specification.rb:52:in `new' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/remote_specification.rb:52:in `method_missing' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:101:in `block in __dependencies' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:98:in `each' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:98:in `__dependencies' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:68:in `activ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ResqueHelper | |
def with_resque | |
Resque.module_eval do | |
def self.enqueue(task, *args) | |
task.perform(*args) | |
end | |
end | |
yield | |
Resque.module_eval do | |
def self.enqueue(task, *args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
def fail!(msg = "Failure!") | |
puts(msg) | |
exit(1) | |
end | |
REPOSITORY_URL = 'git://github.com/mxcl/homebrew.git' | |
PACKAGE_URL = 'http://github.com/mxcl/homebrew/tarball/master' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Typical way of handling the email in the controller | |
class UsersController < ApplicationController | |
def create | |
@user = User.new params[:user] | |
UserMailer.deliver_welcome(@user) if @user.save | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Having some trouble using merb-parts to render a mailing list signup form. Tried with both Haml & Erb and can get the expected results. | |
Here is the source for the part I'm using: | |
class ContactFormPart < Merb::PartController | |
def new | |
@contact = Contact.new | |
@redirect_to = params[:redirect_to] | |
render |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test/unit' | |
class HelloWorldTest < Test::Unit::TestCase | |
def test_hello_world | |
object = HelloWorld.new | |
assert_equal "hello world", object.hello_world | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- !ruby/object:Show | |
date: 12/31/2008 | |
venue: | |
name: The Note | |
locale: West Chester, PA | |
sets: | |
one: | |
- Crutch | |
- Dead Clowns | |
- One Rabbit Race -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= | |
Setlist Format Template | |
============================= | |
- !ruby/object:Importer::Show | |
date: | |
venue: | |
locale: | |
name: | |
sets: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/repos/harvest$ irb | |
>> require 'harvest' | |
=> true | |
@harvest = Harvest(:email => "[email protected]", | |
:password => "123456", | |
:sub_domain => "tomatoist", | |
:headers => {"User-Agent" => "Tomatoist", 'Content-Type' => 'application/xml' }) | |
@harvest.timesheet.new(:hours => 3, :notes => 'workdammit', :project_id => 388131, :task_id => 319119, :spent_at => Date.today).save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library/Application\ Support/Firefox | |
git init | |
git add . | |
git commit -m "Saving FF3 Profile." | |
git checkout -b ff3.5 | |
open /Applications/Firefox3.5 | |
(close Firefox3.5) | |
git commit -m "Saving FF3.5 Profile." | |
git checkout master | |
open /Applications/Firefox |