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
sudo apt update | |
sudo apt upgrade -y | |
# install essential packages | |
sudo apt install -y git zip wget curl build-essential zsh ncurses-dev make gcc bison sqlite3 libssl-dev libudev-dev pkg-config tmux apt-transport-https default-libmysqlclient-dev unzip protobuf-compiler zlib1g-dev autoconf automake gdb libffi-dev zlib1g-dev libpq-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev postgresql-client tk-dev | |
# install oh-my-zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# git config | |
git config --global core.autocrlf input |
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
# open up PowerShell as an admin and run the following command | |
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 } |
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
# update system | |
sudo apt update | |
sudo apt full-upgrade | |
sudo apt autoremove | |
# install brave | |
sudo apt install apt-transport-https curl | |
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add - | |
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list | |
sudo apt update |
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
Para quem diz que o PT acabou com o Brasil, trago alguns dados que mostram que tivemos | |
um desenvolvimento e inclusão social sem precedentes em nossa história. | |
Mas, por interesse de uma elite econômica aliado à mídia, muitos passaram a | |
acreditar que o nosso país quebrou com Lula e Dilma. | |
Vejam vocês e concluam: | |
1. Produto Interno Bruto: | |
2002 – R$ 1,48 trilhões | |
2013 – R$ 4,84 trilhões |
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
import csv, simplejson, decimal, codecs | |
data = open("in.csv") | |
reader = csv.DictReader(data, delimiter=",", quotechar='"') | |
with codecs.open("out.json", "w", encoding="utf-8") as out: | |
for r in reader: | |
for k, v in r.items(): | |
# make sure nulls are generated | |
if not v: |
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
validates_each :cnpj do |row,key,value| | |
nulos = %w{11111111111111 22222222222222 33333333333333 44444444444444 5555#5555555555 66666666666666 77777777777777 88888888888888 99999999999999 00000000#000000} | |
valor = value.scan /[0-9]/ | |
if valor.length == 14 | |
unless nulos.member?(valor.join) | |
valor = valor.collect{|x| x.to_i} | |
soma = valor[0]*5+valor[1]*4+valor[2]*3+valor[3]*2+valor[4]*9+valor[5]*8+valor[6]*7+valor[7]*6+valor[8]*5+valor[9]*4+valor[10]*3+valor[11]*2 | |
soma = soma - (11*(soma/11)) | |
resultado1 = (soma==0 || soma==1) ? 0 : 11 - soma | |
if resultado1 == valor[12] |