Skip to content

Instantly share code, notes, and snippets.

@rafaelhdr
rafaelhdr / get_brcep.py
Last active August 29, 2015 14:08
Get Brazilizian Postal Code (CEP)
# Added on http://www.rafaelhdr.com.br/blog/python/pegar-cep-do-site-dos-correios-em-python at 25/10/2014
#
# This is a simple function to get data at brazilian correios
# It searches at http://www.buscacep.correios.com.br/ and return as a dict the
# information retrieved.
#
# Before use it, you need install the following libs:
# pip install beautifulsoup4
# pip install requests
@rafaelhdr
rafaelhdr / gist:6058469
Created July 22, 2013 23:00
ZF2 Mail Service It is possible to embed a layout and template for the e-mail
<?php
/*
* Original: https://gist.github.com/devmatheus/38cd250c3bb46f0ad2c8
*
* Changes:
* - It is not necessary define page on __construct
* - Set layout for embed template
*
* Problem:
@rafaelhdr
rafaelhdr / removeItem.js
Created February 23, 2013 18:30
jQuery remove item function
function removeItem(item, lista) {
lista = jQuery.grep(lista, function(value) {
return value != item;
});
return lista;
}