As configured in my dotfiles.
start new:
tmux
start new with session name:
*.pyc | |
bin/ | |
include/ | |
lib/ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
import urllib | |
import urlparse | |
import collections | |
import httplib | |
def TestPayment(): | |
#Set our headers | |
headers = { | |
'X-PAYPAL-SECURITY-USERID': 'jb-us-seller_api1.paypal.com', | |
'X-PAYPAL-SECURITY-PASSWORD': 'WX4WTU3S8MY44S7F', |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
from django.contrib.admin import FieldListFilter | |
from django.utils.translation import ugettext as _ | |
class ActiveValueFilter(FieldListFilter): | |
"""list_filter which displays only the values for a field which are in use | |
This is handy when a large range has been filtered in some way which means | |
most of the potential values aren't currently in use. This requires a | |
queryset field or annotation named "item_count" to be present so it can |
# Orignal version taken from http://www.djangosnippets.org/snippets/186/ | |
# Original author: udfalkso | |
# Modified by: Shwagroo Team and Gun.io | |
import sys | |
import os | |
import re | |
import hotshot, hotshot.stats | |
import tempfile | |
import StringIO |