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
# irbrc merged | |
# http://eustaquiorangel.com/posts/552 | |
# http://gist.github.com/86875 | |
require "irb/completion" # activate default completion | |
require 'irb/ext/save-history' # activate default history | |
require "tempfile" # used for Vim integration | |
require 'pp' | |
# save history using built-in options |
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
#!/bin/sh | |
# http://blog.tinogomes.com/2010/02/24/ssh-copy-id-no-mac-os-x/ | |
KEY="$HOME/.ssh/id_rsa.pub" | |
if [ ! -f $KEY ];then | |
echo "private key not found at $KEY" | |
echo "* please create it with "ssh-keygen -t dsa" *" | |
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *" |
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
# ... | |
namespace :bundler do | |
task :create_symlink, :roles => :app do | |
shared_dir = File.join(shared_path, 'bundle') | |
release_dir = File.join(current_release, '.bundle') | |
run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}") | |
end | |
task :bundle_new_release, :roles => :app do |
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
valor = 20.62 | |
class Float | |
def +(value) | |
"Ahhhh pegadinha do malandro" | |
end | |
end | |
puts valor+2 | |
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
#!/bin/sh | |
apt-get install build-essential ssh ruby-full | |
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz | |
tar xzvf rubygems-1.3.7.tgz | |
cd rubygems-1.3.7 | |
ruby setup.rb | |
ln -snf /usr/bin/gem1.8 /usr/bin/gem | |
echo "gem: --no-ri --no-rdoc">$HOME/.gemrc |
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
source :gemcutter | |
gem "rails", "3.0.0.rc" | |
gem "bundler", ">= 1.0.0.rc.4" | |
gem "state_machine", ">= 0.9.2" | |
gem "pg", "0.9.0" | |
gem "haml", ">= 3.0.4" | |
gem "compass", ">= 0.10.2" | |
gem "rails3-generators" | |
gem "inherited_resources", "1.1.2" |
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
# config/deploy/hoptoad.rb.erb | |
HoptoadNotifier.configure do |config| | |
config.api_key = "<%=api_key%>" | |
config.environment_name = "<%=environment_name%>" | |
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
infinity_test do | |
notifications :growl do | |
show_images :mode => :faces | |
end | |
use :test_framework => :rspec | |
before_run do | |
clear :terminal | |
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
user system total real | |
file_new_parser 65.520000 0.370000 65.890000 ( 68.159821) | |
string_new_parser 71.690000 0.290000 71.980000 ( 74.296380) | |
old_parser 119.490000 1.880000 121.370000 (132.974209) |
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 'nokogiri' | |
class DocumentHandler < Nokogiri::XML::SAX::Document | |
attr_reader :opened, :closed | |
def initialize | |
@level = 0 | |
@opened = 0 | |
@closed = 0 | |
end |
OlderNewer