Skip to content

Instantly share code, notes, and snippets.

View wbotelhos's full-sized avatar
💭
I'm not my code.

Washington Botelho wbotelhos

💭
I'm not my code.
View GitHub Profile
@wbotelhos
wbotelhos / postgres-commands.md
Created January 31, 2018 14:53
Postgres Commands

Lib

apt-get -y install postgresql postgresql-contrib

List all Databases

\list
@wbotelhos
wbotelhos / how-to-build-a-debian-package.md
Created January 11, 2018 18:26
How to Build a Debian Package
cd /tmp
mkdir nginx-pagespeed

mkdir -p ./etc
cp -rp    /etc/nginx ./etc

mkdir -p ./var/lib
cp -rp    /var/lib/nginx ./var/lib
@wbotelhos
wbotelhos / fprint_for_mac.md
Created December 15, 2017 21:49
How install fprint on Mac OSX
brew install libusb
brew install libusb-compat
brew install openssl
brew install libcrypto
brew install glib

wget https://downloads.sourceforge.net/project/fprint/libfprint/v0.0.6/libfprint-0.0.6.tar.bz2
tar -xjf libfprint-0.0.6.tar.bz2
cd libfprint-0.0.6
@wbotelhos
wbotelhos / sass_parser_debug.md
Last active December 8, 2017 13:19
SASS Parser Debug

Open the gem:

gem open sass

Add the following code at lib/sass/scss/parser.rb:1277:

puts '-' * 50
@wbotelhos
wbotelhos / vaga-ap-fradique.md
Last active January 7, 2018 16:18
Vaga Apartamento em Pinheiros (Fradique Coutinho)

Apartamento em Pinheiros ao lado do metrô Fradique Coutinho

Moramos nesse apartamento há 3 anos e estamos procurando uma pessoa para compartilhar a moradia. A terceira pessoa que morava com a gente precisará se mudar para um bairro onde estará mais perto de seus afazeres. O apartamento tem 3 quartos, sendo que um deles tem suíte, logo o banheiro social fica sendo dividido entre duas pessoas. A localização é a melhor possível dentro de São Paulo com o seguinte endereço:

Rua Fradique Coutinho, 465, Ap. 48, Edifício Copaiba, Pinheiros, São Paulo - SP, 05416-010

Estamos entre a Cardeal Arcoverde e a Teodoro Sampaio, o que nos dá um silêncio maior no apartamento e uma facilidade imensa de acesso a várias coisas, veja o mapa:

@wbotelhos
wbotelhos / codeship-fix-ntp.sh
Created September 1, 2017 20:40
Codeship fix NTP
#!/bin/bash
apt-get -f -qq -y install ntp
sed -i -E 's|ubuntu.pool.ntp.org|amazon.pool.ntp.org iburst|' '/etc/ntp.conf'
@wbotelhos
wbotelhos / reset_sequence.sql
Created August 10, 2017 17:02
Postgre - Reset Sequence
ALTER SEQUENCE role_permissions_id_seq RESTART WITH 1
@wbotelhos
wbotelhos / rmagick_mac.sh
Last active October 16, 2017 21:37
Can't install RMagick. Can't find MagickWand.h.
export C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/7.0.7-7/include/ImageMagick-7
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/7.0.7-7/lib/pkgconfig
gem install rmagick
# if it fails, use imagemagick 6
brew uninstall imagemagick # all of them
brew install imagemagick@6
@wbotelhos
wbotelhos / git-chef.json
Created July 13, 2017 17:41
git-chef.json
"git": {
"checksum": "8fa13ba8434ff83d24f57f831d55dbb9046434c266641180a37744facfce72ac",
"current": "/usr/local/git/current",
"prefix": "/usr/local/git/2.5.0",
"url": "https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.gz",
"use_pcre": true,
"version": "2.5.0"
}
@wbotelhos
wbotelhos / rails_i18n_paths.md
Created June 14, 2017 23:49
Rails I18n paths
activerecord.errors.models.[model_name].attributes.[attribute_name]
activerecord.errors.models.[model_name]
activerecord.errors.messages