Skip to content

Instantly share code, notes, and snippets.

View arturhoo's full-sized avatar

Artur Rodrigues arturhoo

View GitHub Profile
@arturhoo
arturhoo / progarchiver.py
Created July 25, 2015 15:57
Scraping Prog Archives for top albums
import dataset
import requests
import sys
import re
from lxml import html
db = dataset.connect('sqlite:///prog.db')
albums_table = db['albums']
@arturhoo
arturhoo / gist:4380525
Last active December 10, 2015 04:18
How to get PostgreSQL working on a Ubuntu 12.04 Server (Precise Pangolin) Vagrant box

Set some locale configs:

sudo locale-gen en_US en_US.UTF-8 
sudo dpkg-reconfigure locales
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LANGUAGE=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8

Login and logout from the VM and recreate the cluster:

@arturhoo
arturhoo / 4hb.md
Created February 4, 2014 12:39
Resumão 4 Hour Body - Slow Carb Diet
@arturhoo
arturhoo / Easily Start and Stop EC2 Instances.md
Last active April 7, 2017 22:44
Ruby script to start and stop instances

How to use the script below

Requirements:

Two files are required: ~/.aws/config and a file containing instances ids, one per line, eg:

~/.aws/config

21st Amendment Brewery;Blood Orange Brew Free or Die IPA;IPA;7.0%;-;95;95;3.68/5
21st Amendment Brewery;Blah Blah Blah IPA;IPA - Imperial / Double;7.8%;68;94;74;3.64/5
21st Amendment Brewery;Down to Earth;IPA - Session;4.4%;42;85;88;3.48/5
21st Amendment Brewery;El Sully;Pale Lager;4.8%;19;39;99;3.07/5
21st Amendment Brewery;A Terrible Idea IPA;IPA - Imperial / Double;7.8%;68;94;74;3.64/5
21st Amendment Brewery;Hell or High Watermelon Wheat;Fruit Beer;4.9%;17;24;42;2.88/5
Affinity Brew Co;Breeze;Saison;3.8%;-;44;20;3.14/5
Affinity Brew Co;Cajolery;Amber Ale;5.4%;-;-;-;3.09/5
Affinity Brew Co;For The Many;Pale Ale - American;3.7%;-;48;43;3.20/5
Affinity Brew Co;March;Bock - Dunkler / Urbock;7.2%;-;-;-;2.86/5

Keybase proof

I hereby claim:

  • I am arturhoo on github.
  • I am arturhoo (https://keybase.io/arturhoo) on keybase.
  • I have a public key ASB4hrgqIRrQacGswII0T2bXUJ8-hhNS1Q5IV30owwNxkAo

To claim this, I am signing this object: