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
# List all process | |
ps -axf | |
# Kill a specific process | |
sudo kill <process_id> | |
# List all ips and ports | |
sudo netstat -ln |
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 'activesupport' | |
require 'feedzirra' | |
feed = Feedzirra::Parser::RSS.new | |
feed.feed_url = "http://feeds.feedburner.com/gizmodobr?format=xml" # URL from my database | |
feed.last_modified = Time.utc(2012, 1, 1) # Feed from my database | |
entry = Feedzirra::Parser::RSSEntry.new | |
entry.url = "http://feedproxy.google.com/~r/gizmodobr/~3/5YLB2D-K49w/story01.htm" # Last entry URL on my database |
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
Banco Número | |
Banco Do Brasil S.A. 0001 | |
Banco Central Do Brasil 0002 | |
Banco Da Amazonia S.A. 0003 | |
Banco Do Nordeste Do Brasil S.A. 0004 | |
Banco Nacional Do Desenvolvimento Econom 0007 | |
Banco Do Estado De Sao Paulo S.A. - Bane 0008 | |
Sc Credit Suisse Hg 0011 | |
Banco Standard De Investimentos S.A. 0012 | |
Sc Senso 0013 |
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
### PaymentWay | |
class PaymentWay < ActiveRecord::Base | |
belongs_to :payable, :polymorphic => true | |
end | |
class CreatePaymentWays < ActiveRecord::Migration | |
def change | |
create_table :payment_ways do |t| | |
t.string :name | |
t.references :payable, :polymorphic => true # Will create two columns => :payable_id and :payable_type |
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
git log --graph --pretty="format:%C(yellow)%h%C(cyan)%d%Creset %s => %C(green)%an%C(white), %C(red)%ar%Creset" |
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
fabianoalmeida $ autotest -n | |
loading autotest/rails_rspec2 | |
/Users/fabianoalmeida/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -rrubygems -S /Users/fabianoalmeida/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.7.0/bin/rspec --tty '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/cities_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/countries_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/languages_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/options_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/organizations_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/questions_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/quizzes_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/roles_controller_spec.rb' '/Users/fabianoalmeida/Desenvolvimento/captie/spec/controllers/states |
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
Gems included by the bundle: | |
* ZenTest (4.5.0) | |
* actionmailer (3.1.0) | |
* actionpack (3.1.0) | |
* activemodel (3.1.0) | |
* activerecord (3.1.0) | |
* activeresource (3.1.0) | |
* activesupport (3.1.0) | |
* ansi (1.3.0) | |
* archive-tar-minitar (0.5.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
# Linux | |
env LD_LIBRARY_PATH=$LD_LIBRARY_PATH ARCHFLAGS="-arch i386" gem install ruby-oci8 | |
# Mac | |
env DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH ARCHFLAGS="-arch x86_64" gem install ruby-oci8 |
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
# Install MySQL | |
sudo apt-get install mysql-server | |
# After set the root password | |
# Configure the file: | |
sudo vi /etc/mysql/my.conf | |
# And add this configuration to bind-address attribute (under [mysqld]) | |
bind-address = 0.0.0.0 |
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
# Before it's necessary install a lib | |
sudo apt-get install libpq-dev | |
# And then | |
gem install pg | |
More: http://i.justrealized.com/2010/install-pg-gem-postgresql-ubuntu/ |