Skip to content

Instantly share code, notes, and snippets.

View tatiC's full-sized avatar

Tati Carvalho tatiC

  • Untried Possibilities
  • Brasil - Rio de Janeiro
View GitHub Profile
@tatiC
tatiC / heroku_commands.rb
Created October 13, 2011 20:23
heroku_commands.rb
$ heroku help
=== General Commands
help # show this usage
version # show the gem version
login # log in with your heroku credentials
logout # clear local authentication credentials
list # list your apps
ruby-1.9.2-p136 :001 > ['tatiana','ana lucia', 'sergio ney', 'marco aurelio' ] - ['tatiana','cantidio', 'marco aurelio', 'renata' ]
=> ["ana lucia", "sergio ney"]
@tatiC
tatiC / subtract.rb
Created February 6, 2011 23:15
ruby strange output
p1 = File.open('people1.txt').readlines
p2 = File.open('people2.txt').readlines
puts p1 - p2
=begin
ruby-1.9.2-p136 :006 > f1 = File.open('people1.txt').readlines
=> ["tatiana\n", "ana lucia\n", "sergio ney \n", "marco aurelio \n"]
ruby-1.9.2-p136 :007 > f2 = File.open('people2.txt').readlines
=> ["tatiana\n", "cantido \n", "marco aurelio\n", "renata"]