Skip to content

Instantly share code, notes, and snippets.

View tapajos's full-sized avatar

Marcos Tapajós tapajos

View GitHub Profile
(tapajos:kumade (master))$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.2.0]
(tapajos:kumade (master))$ rake cucumber
/Users/tapajos/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -S bundle exec cucumber
@extra-timeout @creates-remote @disable-bundler
Feature: Kumade executable
As a user
I want to be able to use the kumade executable
So I can have a better experience than Rake provides
commit b7ebbca20e431fbad3c8b5486582aa2bf67d91b7
Author: Marcos Tapajos <tapajos@gmail.com>
Date: Thu Sep 1 12:09:43 2011 -0300
Resolve problema do bug da fase da lua. detalhes: http://catb.org/jargon/html/P/phase-of-the-moon.html
(tapajos:kumade (git))$ rake
(in /Users/tapajos/workspace/kumade)
/Users/tapajos/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -S bundle exec rspec ./spec/kumade/base_spec.rb ./spec/kumade/deployer_spec.rb ./spec/kumade/git_spec.rb ./spec/kumade/runner_spec.rb
....................................................
Finished in 8.77 seconds
52 examples, 0 failures
/Users/tapajos/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -S bundle exec cucumber
@extra-timeout @creates-remote @disable-bundler
Feature: Kumade executable
function rails {
if [ -e script/rails ]; then
script/rails $@
else
`which rails` $@
fi
}
function rake {
if [ -e Gemfile ]; then
function rails {
if [ -e script/rails ]; then
script/rails $@
else
`which rails` $@
fi
}
function rake {
if [ -e Gemfile ]; then
function rake {
if [ -e Gemfile ]; then
bundle exec rake $@
else
`which rake` $@
fi
}
(tapajos:myfinance (master))$ rvm list
rvm rubies
=> ruby-1.9.2-p180 [ x86_64 ]
(tapajos:myfinance (master))$
@tapajos
tapajos / gist:827977
Created February 15, 2011 18:41
Relação programadores x designers
Diz a regra que devem ser dois programadores para cada designer.
def step1 # we can have a lot of fun...
end
def step2 # there's so much we can do...
end
def step3 # it's just you for me...
end
require 'nokogiri'
require 'open-uri'
meu_lance = 100.00
def get_current_price()
doc = Nokogiri::HTML(open("http://viniciusteles.com.br/moveis/puff-lilas"))
doc.xpath('//div[@id="bidding"]/h3/em').to_s =~ /.*R\$ (.*).*/
$1.to_f
end