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
## USAGE: | |
## do_until true "ls -l /var/run/dockerd.sock" | |
## do_until true "ls -l /var/run/dockerd.sock 10 1" | |
## a=5; do_until 'a=$((a+1))' 'echo "a=${a}"; [ ${a} -ge 10 ]' 7 1 | |
do_until() { | |
local task=${1:?Task missing}; | |
local condition=${2:?Condition missing}; | |
local timeout=${3:-60}; | |
local pause=${4:-5}; |
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
#!/usr/bin/python | |
import random | |
lower ="absdefghijklmnopqrstuvwxyz" | |
upper ="ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
numbers="0123456789" | |
symbols= "[]{}()*;/,_-" | |
all = lower + upper + numbers+ symbols |
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
#!/usr/bin/awk -f | |
# # | |
# | |
# Inspired by http://www.percona.com/doc/percona-toolkit/2.1/pt-tcp-model.html | |
# | |
# Example usage: | |
# $ tcpdump -i any -s 0 -nnq -tt 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | |
# 1349692787.492311 IP X.X.X.X.XXXX > X.X.X.X.XXXX: tcp 1448 | |
# $ ./requestor.awk dump.file |