Skip to content

Instantly share code, notes, and snippets.

@waloriju
waloriju / CTe.md
Last active August 29, 2015 14:09
Instalando emissor CTe
# CPF and CNPJ validators Rails 3+ style
# By Arthur Corenzan <arthur@corenzan.com>
# Based on the work of André Camargo <andre@boaideia.inf.br>
#
# Copy this file to your initializers or lib directory, then apply like this:
#
# class Person
# ...
#
# validates :cpf, :cpf => true
#------------------------------------------------------------------------------
# Rotinas para verificação de CPF e CNPJ
# Linguagem: Ruby
# Escrito por: André Camargo < andre@boaideia.inf.br > http://blog.boaideia.inf.br
# Use, copie, melhore a vontade! Patches são bem-vindos...
#------------------------------------------------------------------------------
def check_cpf(cpf=nil)
return false if cpf.nil?
nulos = %w{12345678909 11111111111 22222222222 33333333333 44444444444 55555555555 66666666666 77777777777 88888888888 99999999999 00000000000}
@waloriju
waloriju / zsh
Last active December 21, 2015 02:58
Definindo meu ZSH
#robbyrussell/oh-my-zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
#Set zsh as your default shell:
chsh -s /bin/zsh
#Theme
mate .zshrc
#Edit
@waloriju
waloriju / AndroidSDK.md
Last active December 20, 2015 22:48
Android SDK

Run: Android-sdk_r22.0.5 - Download

curl -ks https://gist.github.com/WanderleyJunior/6207252/raw/run.sh | bash -
@waloriju
waloriju / NetBeans.md
Last active December 20, 2015 22:38
Instalação netbeans-7.3.1 português/br
@waloriju
waloriju / gist:6203382
Created August 11, 2013 04:28
Criar usuário no postgre
sudo su postgres
createuser -P -s -e seu_usuario
@waloriju
waloriju / Eclipse-Kepler-x86_64.md
Last active December 20, 2015 22:09
Instalando eclipse x64 no Ubuntu 13.04
@waloriju
waloriju / Rails4.md
Last active December 20, 2015 22:09
Ubuntu install Ruby, Rails, Gems