Skip to content

Instantly share code, notes, and snippets.

View fzmaster's full-sized avatar

Fernando Zanardo fzmaster

View GitHub Profile
@deniscsz
deniscsz / gist:8361704
Created January 10, 2014 20:11
Código para Validação com Nono Dígito
$j('input[name*="telephone"]').keypress( function(e){
if (e.keyCode >= 9){
length = this.value.length;
if (length == 0)
this.value += "(";
if (length == 3)
this.value += ")";
/*
Testa para ver se o ddd começa com 11 e coloca maxlength para 14. Para outros DDDs, alterar Regex.
@FiloSottile
FiloSottile / dump-imap.py
Created March 12, 2012 13:52
Simple script to dump an IMAP folder into eml files
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import imaplib
import getpass
import argparse
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like imap.gmail.com", required=True)
argparser.add_argument('-u', dest='username', help="IMAP username", required=True)