Skip to content

Instantly share code, notes, and snippets.

View SerhoLiu's full-sized avatar
🤒
Out sick

Serho Liu SerhoLiu

🤒
Out sick
View GitHub Profile
@SerhoLiu
SerhoLiu / supervisord.sh
Created June 20, 2012 14:02 — forked from danmackinlay/supervisord.sh
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@SerhoLiu
SerhoLiu / tree.md
Created May 8, 2012 15:37 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!