Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
@dcai
dcai / cvs-moodle.bash
Last active September 10, 2023 03:51
cvs helper for moodle repository
ct (){
if [ $# -eq 0 ]; then
echo "CVS TAG: No arguments entered.";
return 1
else
echo "Tagging [MOODLE_$1_MERGED]";
echo "File(s) ${@:2}";
echo "Tagging ...";
cvs tag -RF MOODLE_$1_MERGED ${@:2}
@dcai
dcai / gitolite.sh
Created July 4, 2011 08:56 — forked from masnick/gitolite_hn.bash
Setting up gitolite for archlinux
# First, get you id_rsa.pub onto the server as /tmp/YourName.pub
scp ~/ssh/id_rsa.pub [email protected]:/tmp/dongsheng.pub
# Then, as root:
cd $HOME
yaourt -S gitolite-git
su git
@dcai
dcai / index.md
Last active May 6, 2025 07:58
gist index