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 | |
# | |
# Converts LDIF data to CSV. | |
# Doesn't handle comments very well. Use -LLL with ldapsearch to remove them. | |
# | |
# 2010-03-07 | |
# [email protected] | |
# | |
# Show usage if we don't have the right params |
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 | |
# | |
# A bash script/template for adding multi-processing to "stuff". | |
# | |
# Designed to be used for syncing files though. Takes "strings of stuff" (eg. | |
# filenames) into a queue, flattens duplicates, then spawns a worker after a | |
# few seconds that calls the processing script with the "stuff" as params. | |
# | |
# [email protected] | |
# 2011-02-24 |
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
# | |
# "<cmd>" <retry times> <retry wait> | |
# | |
do_retry() | |
{ | |
cmd="$1" | |
retry_times=$2 | |
retry_wait=$3 | |
c=0 |
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 | |
# | |
# Display the realtime bandwidth usage for the specified interface. | |
# | |
# [email protected] | |
# 2011-08-03 | |
# | |
# Number of seconds to average data over | |
avgsecs=3 |
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 | |
mkdir $1 || exit | |
c=0; | |
while [ $c -lt $1 ]; do | |
cat <<EOF >"$1/Foo_$c.php" | |
<?php | |
Class Foo_$c | |
{ | |
function __construct() { |
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 | |
FILE=$1 | |
NUM=$2 | |
[ "$3" == "-v" ] && VERBOSE=1 | |
usage() { | |
echo "Usage: $0 <file of URLs> <number of requests to do per URL> [-v]" >&2 | |
} |
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 | |
# | |
# Daemoniser: starts a program as a daemon and relaunches it if it exits. Adds a pidfile and | |
# logfile capabilities. | |
# | |
# [email protected] | |
# 2011-10-28 | |
# | |
usage() |
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 | |
# | |
# Do a ping and output results as CSV. | |
# | |
# [email protected] | |
# 2011-12-23 | |
# | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 [--add-timestamp] <ping host>" |
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 | |
# | |
# pgpool-II replication manager | |
# | |
# Interfaces with pgpool's pcp command-line tools to provide access to common functions for managing | |
# load-balancing and failover. | |
# | |
# [email protected] | |
# 2011-08-28 |
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 | |
# | |
# Show replication lag for one or more postgresql slaves in streaming replication. | |
# | |
# [email protected] | |
# 2012-01-09 | |
# | |
psql="which psql" | |
psql_extra_opts="" |
OlderNewer