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 | |
# Use this script to test if a given TCP host/port are available | |
cmdname=$(basename $0) | |
timeout=30 | |
if [[ $1 =~ ^[0-9]+$ ]]; then | |
timeout=$1 | |
shift 1 | |
fi | |
while [[ $# -gt 0 ]]; do |
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 | |
action=$1 #Backup or restore | |
volume_name=$2 #The name of the docker-compose volume to restore or backup. | |
output_dir=$3 #Where to read from (if restore) or to write to (if backup) the backup. | |
file_name=$4 #How the backup is (if restore) or will (if backup) be named. | |
function usage() { | |
echo "Usage: db (backup|restore) volume_name output_input_dir file_name" | |
exit |
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 | |
# System dependencies | |
sudo apt-get update -y | |
# System tools | |
sudo apt-get install terminator tree vim wget curl -y | |
sudo apt-get install --no-install-recommends gnome-panel -y | |
sudo apt-get install nautilus-open-terminal -y |
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 | |
HOST=$1 | |
PORT=$2 | |
TIMEOUT=$3 | |
INITIAL_WAIT=$4 | |
if [ -z "$TIMEOUT" ]; then TIMEOUT=15; fi | |
if [ ! -z "$INITIAL_WAIT" ]; then sleep $INITIAL_WAIT; fi | |
currentSeconds=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
run tcpdump on a POD and then (live) see that information through wireshark locally on my machine. the magic of ssh and fifo | |
Topology | |
-------- | |
[laptop with wireshark] ------> [AKS Node] ----> [POD (tcpdump is here)]. | |
1. create the fifo on your local machine (where wireshark will run) | |
mkfifo /tmp/remote-capture.fifo | |
2. execute the following command to send traffic from within a POD to the stdout. This will then be redirected to the fifo locally |