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
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
### 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
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
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
# 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
#user nobody; | |
worker_processes 1; | |
error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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 -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
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
function renderProtovis(hash) { | |
if(hash == "" || hash == null){ | |
return | |
} | |
var keys = Array(); | |
var data = Array(); | |
var max = 0; | |
for (index in hash) { | |
keys.push(hash[index].date_local); |
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
Dinr::Application.routes.draw do | |
ActiveAdmin.routes(self) | |
devise_for :admin_users, ActiveAdmin::Devise.config | |
devise_scope :user do | |
get '/login' => 'devise/sessions#new' | |
get '/logout' => 'devise/sessions#destroy' | |
end |