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 | |
profiles="$@" | |
if [ -z "$profiles" ]; then | |
profiles="$(aws configure list-profiles)" | |
else | |
echo "Restricting run to these profiles $profiles" | |
fi | |
results_folder=results | |
mkdir -p $results_folder | |
regions="us-east-1" |
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 | |
echo "Type the new password slowly. Ensure that there are no mistakes." | |
read -s -p "Please enter the new password> " p; | |
echo " $(printf "$p" | wc -c) characters long" | |
g=3 | |
while [ $g -ne 0 ]; do | |
read -s -p "Verify by typing slowly> " c | |
if [ "$c" == "$p" ]; then | |
echo " MATCH" | |
break |
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 | |
my_uid=$(id -u) | |
if [ $my_uid -ne 0 ]; then | |
echo "WARNING: running as non-root. May not be able to install packages." | |
fi | |
HAS_APT=$(command -v apt) | |
HAS_DNF=$(command -v dnf) | |
HAS_YUM=$(command -v yum) | |
missing_packages_file=${MISSING_PACKAGES_FILE:-/tmp/list_of_missing_packages.txt} |
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 | |
gitgrep () | |
{ | |
ref_max=300; | |
if [ -z "$1" ]; then | |
echo "Usage: gitgrep [-y num] <search_options> pattern"; | |
echo " -y num is max number of back refs to reverse-order search."; | |
return 1; | |
fi; | |
if [ "$1" == "-y" ]; then |