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/bash | |
while [[ $# > 1 ]] | |
do | |
key="$1" | |
case $key in | |
-f|--from) | |
FROM="$2" | |
shift |
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
BRAZILIAN_STATES = { | |
'AC' => 'Acre', | |
'AL' => 'Alagoas', | |
'AP' => 'Amapá', | |
'AM' => 'Amazonas', | |
'BA' => 'Bahia', | |
'CE' => 'Ceará', | |
'DF' => 'Distrito Federal', | |
'ES' => 'Espírito Santo', | |
'GO' => 'Goiás', |
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
# CPF and CNPJ validators Rails 3+ style | |
# By Arthur Corenzan <[email protected]> | |
# Based on the work of André Camargo <[email protected]> | |
# | |
# Copy this file to your initializers or lib directory, then apply like this: | |
# | |
# class Person | |
# ... | |
# | |
# validates :cpf, :cpf => true |
NewerOlder