This file contains hidden or 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
$ cat templatize.py | |
def templatize(*args): | |
"""A small utility function for printing values in columns of fixed width | |
* the width is hardcoded as 20 in this case""" | |
format_string = "" | |
i = 0 | |
for arg in args: | |
format_string += "{%d:>20}" % i | |
i += 1 |
This file contains hidden or 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/sh | |
# Startup script for a supervisor instance | |
# | |
# chkconfig: 2345 80 20 | |
# description: supervisord | |
supervisorctl="/usr/local/bin/supervisorctl" | |
supervisord="/usr/local/bin/supervisord" | |
pid="/var/run/supervisord.pid" | |
name="supervisord" |
This file contains hidden or 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
function connect_server() | |
for i = 1, #proxy.global.backends do | |
local s = proxy.global.backends[i] | |
if s.state ~= proxy.BACKEND_STATE_DOWN then | |
proxy.connection.backend_ndx = i | |
-- print ("connecting to " .. i) | |
return | |
end | |
end |
NewerOlder