Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
options=':i:s:d:n:p:h:'
while getopts ${options} option
do
case ${option} in
i) interval=$OPTARG;;
s) site=$OPTARG;;
d) domain=$OPTARG;;
n) nameservers=$OPTARG;;
@jrh-spg
jrh-spg / sinkselector.sh
Last active December 22, 2019 18:50
Pulse Audio Sink Selector
#!/bin/bash
tempfile=$(tempfile 2>/dev/null) || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15
INPUT=$(mktemp)
function get_all_sinks() {
pacmd list-sinks | grep -e 'name:' | cut -d: -f2 | cut -d\< -f2 | cut -d\> -f1
}
@jrh-spg
jrh-spg / icywatch.sh
Last active June 4, 2021 15:03
Icecast connection watcher
#!/bin/bash
TERM=xterm-256color
bold=$(printf '\033[1m')
lred=$(printf '\033[91m')
lblue=$(printf '\033[94m')
white=$(printf '\033[97m')
green=$(printf '\033[92m')
lgreen=$(printf '\033[36m')
yellow=$(printf '\033[33m')