Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# | |
# Now this lib is on her own full repository and pypi page: | |
# http://github.com/Christophe31/screenutils | |
# http://pypi.python.org/pypi/screenutils | |
# | |
# This may not work with bpython, use python 2.6 or upper | |
# | |
# This program is free software. It comes without any warranty, to |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/bin/bash | |
# License: Public Domain. | |
# Author: Joseph Wecker, 2012 | |
# | |
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? | |
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux? | |
# Are you tired of not having your ~/.bash* stuff work the way you expect? | |
# | |
# Symlink all of the following to this file: | |
# * ~/.bashrc |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
# Custom terminfo for better using tmux with urxvt, 256colors and italics | |
# Compile/install with `tic tmux.terminfo`, then set $TERM to "tmux" | |
# (it requires a program that uses `tgetent` to obtain terminal | |
# information) | |
tmux|tmux with rxvt-unicode-256color client, | |
use=rxvt-unicode-256color, | |
use=screen, |
#!/bin/bash | |
# The "tmuxifier" | |
# Execute parallel processes in an arbitrary number of tmux panes | |
# This script requires the path to an existing script to | |
# execute in parallel. Optionally, the number of threads to | |
# and the name of the tmux session can be input. If threads | |
# and session name are not entered, threads are determined | |
# automatically and session names is set to a default. |
#!/bin/bash | |
# Clean up Apt | |
apt-get autoremove | |
apt-get autoclean | |
apt-get clean | |
# Generate new SSH host keys | |
for T in dsa rsa ecdsa; do |