This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Submittr v1.0 | |
* jQuery plugin for form validation | |
* by Arthur <arthur@corenzan.com.br> | |
* | |
* Usage: | |
* | |
* $(':submit').submittr(); | |
* | |
* Optional parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name flask.local; | |
root /Applications/MNPP/htdocs/flask; | |
#location = / { rewrite ^ /flask/; } | |
location / { | |
try_files $uri @flask; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.gitconfig | |
[branch] | |
autosetupmerge = true | |
[push] | |
default = current | |
[core] | |
excludesfile = .gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
# Create your models here. | |
class Contact(User): | |
twitter = models.CharField(max_length=200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replacer = lambda s: s.replace('Ã', 'Ã').replace('Õ', 'Õ').replace('Á','Á').replace('É', 'É').replace('Í','Í').replace('Ó', 'Ó').replace('Ú', 'Ú').replace('Ç', 'Ç').replace('Â','Â').replace('Ê','Ê').replace('Ô','Ô') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import codecs | |
import requests | |
locales = '/tmp/localidades_prodemg.csv' | |
with codecs.open(locales,'r','utf-8') as fp: | |
lines = fp.readlines() | |
def Lat_Lng(logradouro, cidade): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo modprobe -r psmouse # remove mouse settings | |
sudo modprobe psmouse # re-add mouse settings | |
xinput # List touchpad devices | |
sudo xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 0 # Deactivate mouse settings. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime as dt, time | |
from random import choice | |
from time import mktime | |
start = dt.combine(dt.now().date(), time(0, 0, 0)) | |
end = dt.combine(start, time(23, 59, 59)) | |
ts = lambda t: int(mktime(t.timetuple())) | |
today = range(ts(start), ts(end)) |
OlderNewer