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
#/usr/bin/env bash | |
BIN_PATH=${HOME}/.local/bin | |
OS_TYPE=$( uname | tr '[:upper:]' '[:lower:]' ) | |
function _download_kops_version() { | |
VER=$1 | |
BIN_FILE=kops | |
if [ ! -e "${BIN_PATH}/${BIN_FILE}-${VER}" ] ; then |
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 | |
set -e | |
FOLDER=$1 | |
LATEST_COMMIT=$(git rev-parse HEAD) | |
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff ${FOLDER}) | |
[[ ${FOLDER_COMMIT} = ${LATEST_COMMIT} ]] && exit 0 || exit 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
#!/usr/bin/env bash | |
# $ Script to check best Twitch server available. | |
# Needs hping / w3m | |
SERVERS="http://bashtech.net/twitch/ingest.php" | |
function _best_twlt | |
{ | |
for SERVER in $(w3m -dump ${SERVERS}|grep RTMP|grep -oE 'live-.*.twitch.tv'); do | |
LATENCY=$(sudo -i hping -q -c 2 -S -p 80 ${SERVER} 2>&1 | grep -oE '^round-trip.*' | awk '{print $4}' | cut -d '/' -f 2) |