Skip to content

Instantly share code, notes, and snippets.


Luiz Picolo ツ luizpicolo

Block or report user

Report or block luizpicolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


cribbed from

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.


# Namespace for classes and modules that handle serving documentation over HTTP
# install pyhton via brew
brew install python3
# Install pip
# install virtual env
pip install virtualenv
luizpicolo / model_extension.rb
Created Jan 4, 2017 — forked from brenes/model_extension.rb
Removing validation of a model declared on a gem
View model_extension.rb
# We have to remove validations on email, as it's no longer needed.
# Based on a solution found at
Model.class_eval do
_validators.reject!{ |key, _| key == :field }
_validate_callbacks.each do |callback|
callback.raw_filter.attributes.delete :field
View lambrete.rb
# Alterar sequencia
ALTER SEQUENCE content_builders_id_seq RESTART WITH 37178;
luizpicolo / sign-pdf.rb
Created Dec 20, 2016 — forked from matiaskorhonen/sign-pdf.rb
Quick and dirty PDF signing in Ruby (using Origami)
View sign-pdf.rb
#!/usr/bin/env ruby
require "openssl"
require "time"
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
luizpicolo /
Created Dec 6, 2016 — forked from blackjk3/
Creating a gem project with rspec

** Create the plugin without test-unit and specify the path for the dummy application:

rails plugin new $project_name --skip-test-unit --dummy-path=spec/dummy --mountable

** Add rspec-rails as a development dependency to the gemspec file (foobar.gemspec): do |s|
sudo ls -1d */ | sudo xargs -I{} du {} -sh && sudo du -sh
View gist:ee4ee73c41b1ae98e74911de0d471e5c
Estes dias fiquei pensando o motivo que levava uma árvore binária a ser um estrutura de dados perfeita para o armazenamento e
busca de dados. Isso me levou a criar um algoritmo simples para demostrar a quantidade de passos para a busca de um
elemento mediante a quantidade de dados. O(log(n)). Logo, como o crescimento é exponencial, ao dobrar a quantidade de dados o
passo so é acrescido de mais 1.
i = 16
n = 1
for j in (0..i)
puts j
puts n
luizpicolo /
Created Oct 13, 2016 — forked from wdullaer/
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
#!/usr/bin/env bash
cp config/database.example.yml config/database.yml &&
cp config/application.example.yml config/application.yml &&
cp config/secrets.example.yml config/secrets.yml &&
value=`cat .ruby-gemset` &&
sed -i "s/db/$value/g" config/database.yml &&
gem install bundle &&
bundle install &&
rake db:create &&
You can’t perform that action at this time.