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
# | |
# This is an example for the global screenrc file. | |
# You may want to install this file as /usr/local/etc/screenrc. | |
# Check config.h for the exact location. | |
# | |
# Flaws of termcap and standard settings are done here. | |
# | |
#startup_message off |
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
" Reference: | |
" http://sontek.net/turning-vim-into-a-modern-python-ide | |
" https://github.com/amix/vimrc | |
" Enable filetype plugins | |
filetype on | |
filetype plugin on | |
filetype indent off | |
let g:pyflakes_use_quickfix = 0 |
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
# List of modules to import when celery starts. | |
CELERY_IMPORTS = ("app.tasks", ) | |
BROKER_HOST = "192.168.134.141" | |
BROKER_PORT = 5672 | |
BROKER_VHOST = "ubuntumq" | |
BROKER_USER = "ubuntu" | |
BROKER_PASSWORD = "ubuntu" | |
## Worker 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 fabric.contrib.files import append, contains, exists | |
@task | |
def config_insert_line(): | |
insert_this = """something""" | |
if exists('somefile.conf'): | |
if not contains('somefile.conf', insert_this): | |
append('somefile.conf', insert_this) | |
else: |
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
[client] | |
port=3306 | |
socket=/tmp/mysql.sock | |
[mysqld] | |
port=3306 | |
socket=/tmp/mysql.sock | |
tmp_table_size = 32M | |
max_heap_table_size = 32M |
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] | |
st = status | |
ci = commit | |
co = checkout | |
di = diff | |
dc = diff --cached | |
amend = commit --amend | |
aa = add --all | |
ff = merge --ff-only | |
pullff = pull --ff-only |
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
class BaseClean(object): | |
cleaned_data = [] | |
_errors = [] | |
def _clean_instance(self): | |
for item in dir(self): | |
if item.startswith('clean_'): | |
validated = getattr(self, item) | |
try: | |
if callable(validated): |
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
{ | |
// my favorite color | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// font size default | |
"font_size": 11, | |
// ignore lines with more than 80 caracters | |
"pep8_ignore": ["E501"], | |
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 random import shuffle | |
class Carta(object): | |
def __init__(self, valor, naipe): | |
self.valor = valor | |
self.naipe = naipe | |
def __repr__(self): | |
return '<%s de %s>' % (self.valor, self.naipe) |
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
THIS_DIR = os.path.dirname(__file__) | |
PROJECT_DIR = os.path.join(THIS_DIR, 'relative/path/to/your/project/') | |
sys.path.append(PROJECT_DIR) | |
import inspect | |
import settings | |
from django.core.management import setup_environ | |
from django.utils.html import strip_tags | |
from django.utils,encoding import force_unicode |
OlderNewer