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
""""""""""""""""""""""""""""""""""""""" | |
" __ _ " | |
" ____/ /________ _(_) " | |
" / __ / ___/ __ `/ / " | |
" / /_/ / /__/ /_/ / / " | |
" \__,_/\___/\__,_/_/ " | |
" " | |
" Dongsheng Cai <d@tux.im> " | |
" " | |
""""""""""""""""""""""""""""""""""""""" |
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
root = true | |
[*] | |
indent_style = tab |
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
# Author: Dongsheng Cai | |
# | |
# Gist: https://gist.github.com/dcai/3824286 | |
# | |
# c-d to close shell | |
# <prefix> s to switch to another session | |
# <prefix> f to find a window | |
# <prefix> o to switch to another panel | |
# <prefix> ! to close other panes except current one | |
# <prefix> x Kill the current pane |
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/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 |
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
#!/bin/bash | |
# http://blog.strictly-software.com/2013/07/apache-performance-tuning-bash-script.html | |
echo "Calculate MaxClients by dividing biggest Apache thread by free memory" | |
if [ -e /etc/debian_version ]; then | |
APACHE="apache2" | |
elif [ -e /etc/redhat-release ]; then | |
APACHE="httpd" | |
fi | |
APACHEMEM=$(ps -aylC $APACHE |grep "$APACHE" |awk '{print $8'} |sort -n |tail -n 1) | |
APACHEMEM=$(expr $APACHEMEM / 1024) |
📇 @dcai's gist index
- 📜 index.md
gist:907013
gist index
- 📜 gitolite.sh
gist:1063097
Setting up gitolite for archlinux
- 📜 cvs-moodle.bash
gist:1071173
cvs helper for moodle repository
- 📜 daemon.py
- 📜 .gitolite.pl
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
{ | |
"name": "libra mini", | |
"vendorProductId": 1280134179, | |
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], | |
"layers": [ | |
[ | |
"LT(3,KC_TAB)", | |
"KC_Q", | |
"KC_W", | |
"KC_E", |
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
;Ballistic | |
player.additem 0001f66b 1000 ;.308 round | |
player.additem 0004ce87 1000 ;.38 round | |
player.additem 0009221c 1000 ;.44 round | |
player.additem 0001f66a 1000 ;.45 round | |
player.additem 0001f279 1000 ;.50 caliber round | |
player.additem 0001f276 1000 ;.10mm | |
player.additem 0001f66c 1000 ;.5mm | |
player.additem 0001f278 1000 ;5.56mm | |
player.additem 0001f673 1000 ;Shotgun shell |
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
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} |
NewerOlder