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/bash | |
| [[ ! $( which jq ) ]] && exit 1 | |
| dropboxDir="$(jq -r '.personal.path' <"${HOME}/.dropbox/info.json")" | |
| usern=${LOGNAME} | |
| group="$(gid -ng)" | |
| echo "Find files in Dropbox that are not my username or group:" | |
| find "${dropboxDir}" -type f -not \( \( -user $usern \) -o \( -group $group \) \) -print |
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/bash | |
| checkServer=myserver.local | |
| NS1=10.2.10.1 | |
| NS2=10.2.10.2 | |
| ntimes=60 | |
| for ns in ${NS1} ${NS2}; do | |
| for ((i=0 ; $ntimes - $i ; i++)); do | |
| dig +short ${checkServer} @${ns} |
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/bash | |
| checkServer=10.2.1.5 | |
| checkPort=8101 | |
| [ "$1" = "FAST" ] && optSleep="0" && ntimes=120 | |
| [ "$1" = "" ] && optSleep="1" && ntimes=60 | |
| echo "Starting at $(date "+%Y-%m-%dT%H:%M:%S%z")" | |
| for ((i=0 ; $ntimes - $i ; i++)); do |
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/bash | |
| usage() | |
| { | |
| echo -e "\n * Usage: $(basename $0) values-from-curl.txt" | |
| exit 1 | |
| } | |
| [ "$1" = "" ] && usage |
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/bash | |
| softURL=http://www.observium.org/observium-community-latest.tar.gz | |
| tempPATH=/tmp | |
| archiveNAME="${tempPATH}/observium-community-latest.tar.gz" | |
| sourceLOCATION=/opt/observium | |
| backupSTAMP="$(date +%Y-%m-%d)_$$" | |
| # tar -czvf observium_ORIGINAL_working-backup.tar.gz "${sourceLOCATION}"" |
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/bash | |
| pgrep geckodriver > /dev/null 2>&1 | |
| if [[ $? = 0 ]]; then | |
| echo "Sorry but geckodriver is already running..." | |
| exit 1 | |
| fi | |
| geckodriver "$@" > /dev/null 2>&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/bash | |
| [[ $(uname) == *"Darwin"* ]] && echo "Nope." && exit 1 | |
| echo "Get current swap usage for all running processes" | |
| FILE=/tmp/swap_$$.txt | |
| SUM=0 | |
| OVERALL=0 | |
| for DIR in $(find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]") ; do |
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/bash | |
| set -e | |
| [[ $1 -eq "" ]] && printf "Which env?\n" && exit 1 | |
| # Services Director: | |
| endpoint="https://10.0.1.250:8100/api/tmcm/2.2/monitoring/instance" | |
| user="admin" | |
| password="MY_SECURED_PASSWORD_" |
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/bash | |
| ## This tool is only for macOS and require Mac Ports and python27/python37. | |
| ## It will help to switch from Python v2 to Python v3... | |
| ## | |
| ## Copyleft (C) 2019 dzogrim | |
| NAME="$(basename "${0}")" | |
| # Customized colors |
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/bash | |
| rsyslog_serv="env-log-storeroom-001.tld.priv" | |
| rsyslog_port="514" | |
| stamp="$(date +"%A, %b %d, %Y %H:%M:%S")" | |
| if [[ $(uname) == *"Darwin"* ]]; then | |
| OPT="-c" | |
| else | |
| OPT="-q0" |