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
| #start a rails app without activerecord | |
| rails new app_name --skip-active-record | |
| # Start rspec configuration | |
| rails g rspec:install | |
| # Generate mongo configuration | |
| rails g mongoid:config |
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
| allowed_dirs = Dir["/Users/homedir/Pictures/*"].select { |dir| dir if dir.match(/(au)/) } | |
| allowed_dirs.each do |current_directory| | |
| allowed_dirs.each do |another_directory| | |
| next if current_directory == another_directory | |
| Dir["#{current_directory}/*"].each do |current_photo| | |
| Dir["#{another_directory}/*"].each do |another_photo| | |
| puts ">> Current: #{current_photo} == Another: #{another_photo}" if current_photo == another_photo | |
| end | |
| 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
| +----------------------+-------+-------+---------+---------+-----+-------+ | |
| | Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
| +----------------------+-------+-------+---------+---------+-----+-------+ | |
| | Controllers | 233 | 203 | 3 | 19 | 6 | 8 | | |
| | Helpers | 4 | 4 | 0 | 0 | 0 | 0 | | |
| | Models | 93 | 71 | 6 | 8 | 1 | 6 | | |
| | Libraries | 651 | 554 | 24 | 79 | 3 | 5 | | |
| | Integration tests | 0 | 0 | 0 | 0 | 0 | 0 | | |
| | Functional tests | 7 | 3 | 1 | 0 | 0 | 0 | | |
| | Unit tests | 99 | 66 | 7 | 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
| #Colors | |
| NO_COLOR="\[\e[0m\]" | |
| BLACK="\[\033[0;30m\]" | |
| RED="\[\033[0;31m\]" | |
| GREEN="\[\033[0;32m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| BLUE="\[\033[0;34m\]" | |
| MAGENTA="\[\033[0;35m\]" | |
| CYAN="\[\033[0;36m\]" | |
| WHITE="\[\033[0;37m\]" |
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
| Hojeee é mais uma segunda-feira, | |
| a patroa ta avisada, | |
| não tenho hora pra voltar. | |
| Vou pro bar com amigos, | |
| Entre uma cerveja e outra, | |
| não vejo a hora passar | |
| Conversa nerd, filosófica ou afiada | |
| o que importa é a cervejada |
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
| class OperationsController < ApplicationController | |
| respond_to :json | |
| def create | |
| app = App.find_by_app_key!(params[:app_key]) #aqui retorna um 404 | |
| operation = app.new_operation(params[:operation]) | |
| operation.save | |
| respond_with operation | |
| end | |
| 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
| aaronh-chronic (0.3.9) | |
| actionmailer (2.3.8, 2.3.5) | |
| actionpack (2.3.8, 2.3.5) | |
| actionwebservice (2.3.8) | |
| activemodel (3.0.6) | |
| activerecord (3.0.3, 2.3.8, 2.3.5) | |
| activerecord-sqlserver-adapter (2.3.8) | |
| activeresource (2.3.8, 2.3.5) | |
| activesupport (3.0.6, 3.0.3, 2.3.8, 2.3.5) | |
| acts_as_reportable (1.1.1) |
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
| <ul> | |
| <li><a href="http://metronus.com/blog/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">André Fonseca</a></li> | |
| <li><a href="http://nighto.net/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">Arlindo Pereira</a></li> | |
| <li><a href="http://blog.justen.eng.br/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">Álvaro Justen</a></li> | |
| <li><a href="http://bkether.blogspot.com/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">Bruno Barros</a></li> | |
| <li><a href="http://blog.brunoborges.com.br/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">Bruno Borges</a></li> | |
| <li><a href="http://www.caikesouza.com/?utm_source=rafael.adm.br&utm_medium=affiliate&utm_content=textlink&utm_campaign=horaextra">Caike Sousa</a></li> | |
| <li><a href="http://diegodu |
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
| ### THIS IS PART OF A QUERY | |
| def conditions_for_regioncode(region_ids) | |
| regions = [] | |
| region_ids.each do |region| | |
| regions << "reg.regioncode = '#{region}'" | |
| end | |
| "(#{regions.join(' OR ')})" | |
| 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
| pt-br: | |
| formtastic: | |
| yes: 'Sim' | |
| no: 'Não' | |
| create: 'Criar %{model}' | |
| update: 'Atualizar %{model}' | |
| submit: 'Salvar %{model}' | |
| required: 'obrigatório' |