You can't combine them
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 Cached | |
def cache(*method_names) | |
method_names.each do |m| | |
original = instance_method(m) | |
results = {} | |
define_method(m) do |*a| | |
results[a] ||= original.bind(self).call(*a) | |
end | |
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
require 'formula' | |
class TmuxForIterm2 < Formula | |
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20120726.zip' | |
md5 '596c8ff70a836f67ee3197bb60cf92b3' | |
homepage 'http://code.google.com/p/iterm2/wiki/TmuxIntegration' | |
depends_on 'libevent' | |
def install |
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
# Loaded when a new shell is started | |
# Put environment changes in .bashrc instead, unless it's only for new shells, and not sub-shells | |
source ~/.bashrc |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
require "bundler/capistrano" | |
after "deploy:finalize_update", "bundle:jruby_install" | |
namespace :bundle do | |
desc "Install bundle environment for jruby" | |
task :jruby_install do | |
old_current_release = fetch(:current_release) | |
set :bundle_dir, File.join(fetch(:shared_path), 'jruby_bundle') | |
set :current_release, File.join(fetch(:current_release), 'lib/jruby_daemon') | |
install |