Skip to content

Instantly share code, notes, and snippets.

# Criar usuario para instalar
sudo adduser deployer
echo "deployer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
su deployer
cd
# Atualizar YUM e adicionar EPEL repo
sudo yum -y update
sudo yum install -y epel-release
@jayschab
jayschab / csv_to_ofx.rb
Created June 28, 2017 17:13
Convert Itaú CSV extrato to OFX
# Modified from https://github.com/fgrehm/itau_to_ofx
def write_transaction(txn)
type = txn[:amount] > 0 ? 'CREDIT' : 'DEBIT'
date = txn[:date].strftime('%Y%m%d100000[-03:EST]')
id = txn[:date].strftime("%Y%m%d#{txn[:inc].to_s.rjust(3, '0')}")
memo = txn[:description]
amount = '%.2f' % txn[:amount]
"<STMTTRN>