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 file configures various client-side behaviors. | |
### | |
### The commented-out examples below are intended to demonstrate | |
### how to use this file. | |
### Section for authentication and authorization customizations. | |
[auth] | |
### Set store-passwords to 'no' to avoid storing passwords in the | |
### auth/ area of your config directory. It defaults to 'yes'. | |
### Note that this option only prevents saving of *new* passwords; |
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
#*-- coding: utf-8 -*- | |
"""Given an url extract all external links and return a list of tuples (title, url)""" | |
from mechanize import Browser | |
from urlparse import urlparse | |
import sys | |
if __name__ == "__main__": | |
url_list = sys.argv[1:] | |
br = Browser() |
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
In [88]: from xl import collection, xdg | |
In [89]: c = collection.Collection("Collection", location=os.path.join(xdg.get_data_dirs()[0], 'music.db')) | |
In [90]: from xl.trax.track import Track | |
In [91]: albums = set() | |
In [92]: artists = set() |
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
"""Build an .xls file with all background colors vs patterns possibilities""" | |
import xlwt | |
wb = xlwt.Workbook() | |
ws = wb.add_sheet("Colors") | |
ws.write(0, 0, "Colors/Patterns") | |
for pat_index in range(0, 16): | |
ws.write(0, pat_index + 1, str(pat_index)) |
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 named colors from http://cloford.com/resources/colours/namedcol.htm""" | |
colors = [u'#FFB6C1', u'#FFC0CB', u'#DC143C', u'#FFF0F5', u'#DB7093', u'#FF69B4', u'#FF1493', u'#C71585', | |
u'#DA70D6', u'#D8BFD8', u'#DDA0DD', u'#EE82EE', u'#FF00FF', u'#FF00FF', u'#8B008B', u'#800080', | |
u'#BA55D3', u'#9400D3', u'#9932CC', u'#4B0082', u'#8A2BE2', u'#9370DB', u'#7B68EE', u'#6A5ACD', | |
u'#483D8B', u'#F8F8FF', u'#E6E6FA', u'#0000FF', u'#0000CD', u'#00008B', u'#000080', u'#191970', | |
u'#4169E1', u'#6495ED', u'#B0C4DE', u'#778899', u'#708090', u'#1E90FF', u'#F0F8FF', u'#4682B4', | |
u'#87CEFA', u'#87CEEB', u'#00BFFF', u'#ADD8E6', u'#B0E0E6', u'#5F9EA0', u'#00CED1', u'#F0FFFF', | |
u'#E0FFFF', u'#AFEEEE', u'#00FFFF', u'#00FFFF', u'#008B8B', u'#008080', u'#2F4F4F', u'#48D1CC', | |
u'#20B2AA', u'#40E0D0', u'#7FFFD4', u'#66CDAA', u'#00FA9A', u'#F5FFFA', u'#00FF7F', u'#3CB371', |
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
[extensions] | |
# enable color extension | |
color = | |
# enable extdiff extension (Extended Diff) | |
hgext.extdiff = | |
[extdiff] | |
# configure extended diff to use colordiff (requires colordiff installed in your system) | |
cmd.cdiff = colordiff | |
opts.cdiff = -uprN |
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
#!/usr/bin/python | |
from mercurial import util | |
import re | |
def check_references(*args, **kwargs): | |
""" | |
Checks that commit message contains a reference to or closes an issue. | |
Useful when using Redmine. | |
Usage in .hgrc: |
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
MYCOLOR1="\[\033[1;32m\]" | |
MYCOLOR2="\[\033[1;34m\]" | |
MYCOLOR3="\[\033[1;37m\]" | |
MYCOLOR4="\[\033[1;32m\]" | |
export PS1="$MYCOLOR1\u$MYCOLOR2|$MYCOLOR3\h $MYCOLOR2\w $MYCOLOR4> \[\033[00m\]" | |
esto en /root/.bashrc: |
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
# -*- coding: utf-8 -*- | |
from django.utils.translation import ugettext_lazy as _ | |
from django.conf import settings as django_settings | |
class SettingsProxy(object): | |
def __init__(self, settings, defaults): | |
self.settings = settings | |
self.defaults = defaults |
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
# -*- coding: utf-8 -*- | |
import os | |
from logbook import Logger, TimedRotatingFileHandler | |
from logbook.queues import ThreadedWrapperHandler | |
from django.conf import settings | |
from django.core.serializers.json import simplejson | |
OlderNewer