- download
- Edit your
.autotest
and add this line:Autotest::Growl::image_dir = File.expand_path("~")+'/Dropbox/Public/fu'
(or wherever you unpacked fu.zip) - ???????
- Profit!
This file contains 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 Kernel | |
# usage: | |
# require 'irb_drop' | |
# ...do some stuff... | |
# irb_drop(binding) # irb will open here with the current local variables | |
# ...continue doing stuff... | |
def irb_drop(context=nil, *argv) | |
require 'irb' | |
require 'pp' | |
require 'yaml' |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains 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
passenger nginx rails bundler status error | |
2.2.5 0.8.22 2.3.5 no OK | |
2.2.5 0.8.22 2.3.9 yes FAIL passenger not finding gems | |
2.2.5 0.8.50 2.3.9 yes FAIL couldn't compile | |
2.2.12 0.8.50 2.3.9 yes FAIL passenger not finding gems | |
2.2.13 0.8.50 2.3.9 yes FAIL PassengerHelper not starting | |
2.2.15 0.7.67 2.3.9 yes FAIL PassengerHelper not starting | |
2.2.15 0.8.50 2.3.9 yes FAIL PassengerHelper not starting | |
3.0.0.pre3 0.8.50 2.3.9 yes OK (requires libcurl4-openssl-dev) |
This file contains 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 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
require 'time' | |
# USAGE: | |
# Put ids of IMDB shows here: | |
movie_ids = %w(tt0773262 tt0121955 tt0182576 tt0460649 tt0903747 tt0412142) |
This file contains 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
class Cart < ActiveRecord::Base | |
has_many :line_items | |
delegate :empty?, :to => :line_items | |
end | |
class User < ActiveRecord::Base | |
has_one :cart | |
end | |
@user = User.new |
This file contains 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 Kernel | |
# Terminate the current process - the hard way | |
def t! | |
`kill -9 #{$$}` | |
end | |
module_function :t! | |
end | |
This file contains 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
#!/bin/sh | |
# ================================================================ | |
# | |
# Convert a mysql database dump into something sqlite3 understands. | |
# | |
# Adapted from | |
# http://stackoverflow.com/questions/489277/script-to-convert-mysql-dump-sql-file-into-format-that-can-be-imported-into-sqlit | |
# | |
# (c) 2010 Martin Czygan <[email protected]> |
This file contains 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
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
This file contains 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
#!/bin/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
OlderNewer