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
# Steps for turning on squid monitoring (until I have an rpm) | |
cat > /etc/collectd.d/squid << EOF | |
LoadPlugin exec | |
<Plugin exec> | |
Exec deploy "/var/lib/releng/monitoring/squid" | |
</Plugin> | |
EOF | |
mkdir -p /var/lib/releng/monitoring |
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
#http://upstart.ubuntu.com/cookbook/#introduction | |
author "Zach Cox <zcox@pongr.com>" | |
description "Titan+Cassandra+Rexster" | |
version "0.3.1" | |
#2=regular running mode, 3,4,5 are aliases for 2 | |
start on runlevel [2345] | |
#0=shutdown, 1=single-user mode, 6=reboot |
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
# Sort a list of dictionary objects by a key - case sensitive | |
from operator import itemgetter | |
mylist = sorted(mylist, key=itemgetter('name')) | |
# Sort a list of dictionary objects by a key - case insensitive | |
mylist = sorted(mylist, key=lambda k: k['name'].lower()) |