sudo add-apt-repository ppa:nilarimogard/webupd8 && \
sudo apt-get update && \
sudo apt-get install albert
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
brazil = Spree::Country.find_by(name: "Brasil") | |
Spree::State.create!( | |
[{name: "Acre", abbr: "AC", country: brazil}, | |
{name: "Alagoas", abbr: "AL", country: brazil}, | |
{name: "Amapá", abbr: "AP", country: brazil}, | |
{name: "Amazonas", abbr: "AM", country: brazil}, | |
{name: "Bahia", abbr: "BA", country: brazil}, | |
{name: "Ceará", abbr: "CE", country: brazil}, | |
{name: "Espírito Santo", abbr: "ES", country: brazil}, |
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
# METHOD 1: using output stream | |
def generate_kit_banco_zip(kit_banco) | |
s3 = Aws::S3::Resource.new | |
bucket = s3.bucket(ENV['FOG_DIRECTORY']) | |
compressed_filestream = Zip::OutputStream.write_buffer do |zos| | |
file = kit_banco.social_contract_file.file | |
file_obj = bucket.object(file.path) | |
zos.put_next_entry("ContratoSocial.#{file.extension}") | |
zos.print(file_obj.get.body.read) |
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
"Use Vim settings, rather then Vi settings (much better!). | |
"This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" ================ General Config ==================== | |
"load pathogen managed plugins | |
call pathogen#infect() | |
set number "Line numbers are good | |
set backspace=indent,eol,start "Allow backspace in insert mode |
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 "openssl" | |
require "base64" | |
C14N = Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 | |
SHA_MAP = { | |
1 => OpenSSL::Digest::SHA1, | |
256 => OpenSSL::Digest::SHA256, | |
384 => OpenSSL::Digest::SHA384, | |
512 => OpenSSL::Digest::SHA512 |
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 add-apt-repository ppa:nilarimogard/webupd8 | |
sudo apt-get update | |
sudo apt-get install albert | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
sudo add-apt-repository ppa:jonathonf/vim |
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
#!/usr/bin/ruby | |
class ArrayFlattener | |
def initialize(array) | |
@array = array | |
end | |
def call | |
raise unless array.is_a? Array |
I hereby claim:
- I am guilpejon on github.
- I am guilpejon (https://keybase.io/guilpejon) on keybase.
- I have a public key ASCYXdmV4uqEH2nOGLRhG4rUIUAfpjR-LSik-DgZ9w2GBgo
To claim this, I am signing this object: