This file contains 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
= f.association :cities, :collection => State.all, :as => :grouped_select, | |
:group_method => :cities, :group_label_method => :name |
This file contains 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 st |
This file contains 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
development: | |
adapter: postgresql | |
encoding: utf8 | |
reconnect: false | |
host: localhost | |
database: database_development | |
username: username | |
password: password | |
test: |
This file contains 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 'nokogiri' | |
require 'htmlentities' | |
require 'open-uri' | |
estados = [ "ac", "al", "am", "ap", "ba", "ce", "df", "es", "go", "ma", "mg", "ms", "mt", | |
"pa", "pb", "pe", "pi", "pr", "rj", "rn", "ro", "rr", "rs", "sc", "se", "sp", | |
"to" ] | |
@result = Hash.new |
This file contains 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
awk '{ if( NR > 2 ) { print } }' file > outputfile |
This file contains 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 'haml' | |
require 'html2textile' | |
files = Dir["*"] | |
files.each do |f| | |
unless f == 'script.rb' || f == 'index.html.haml' | |
system("awk '{ if( NR > 2 ) { print } }' #{f} > #{f[0..-11] + '.temp'}") # remove first 2 lines | |
end | |
end |
This file contains 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
-- Os dados contidos nesse arquivo foram extraídos do site: http://ibge.gov.br/cidadesat utilizando ruby, nokogiri e expressões regulares. | |
-- Autor: Mauricio Natanael Ferreira | |
-- Github: https://github.com/manfe | |
-- Twitter: @manfe01 | |
-- Email: contato [at] ferreiramauricio [dot] com | |
-- *********************************************************************************************************************************************** | |
-- id ... |
This file contains 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
# encoding: utf-8 | |
require 'rubygems' | |
require 'mysql2' | |
require 'pry' | |
require 'nokogiri' | |
require 'htmlentities' | |
require 'open-uri' | |
require 'active_record' |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title></title> | |
</head> | |
<body> | |
<form action="processarFormulario.php" method="GET"> | |
<p>Blablabla pergunta.... blablabla</p> |
This file contains 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
/* Todos os elementos H1 receberão os estilos que estiverem dentro das chaves. */ | |
h1 { | |
text-align: center; | |
color: #BD1010; | |
} | |
/* Todos os parágrafos que estiverem com a classe ‘nome-da-classe’ receberão os estilos */ | |
p.nome-da-classe { | |
color:#ABC; | |
} |
OlderNewer