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
#!/usr/bin/env bash | |
RED='\033[0;31m' | |
YELLOW='\033[1;93m' | |
PURPLE='\033[0;35m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;94m' | |
NC='\033[0m' # No Color | |
APP_FNAME=$(basename -- "$0") |
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
git remote -v | grep http | grep push | awk -F// ' { print $2 } ' | awk ' { print "git@"$1 } ' | sed 's/\//:/' | xargs git remote set-url origin |
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
#!/usr/bin/env bash | |
RED='\033[0;31m' | |
YELLOW='\033[0;33m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
installer=`which brew || which yum || which apt-get` | |
which jq >/dev/null || $installer install jq |
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 | |
function aprint() { awk "{print \$${1:-1}}"; } | |
alias dockerstart='docker ps -a --format="{{.ID}}" |xargs -ir docker start {}' | |
alias dockerrmi="docker images | grep none | aprint 3 | xargs -I[] -r docker rmi []" | |
alias dockerrm="docker ps | grep Exited | aprint 1 | xargs -I[] -r docker rm []" | |
alias dockerrmall="docker ps -a | tail -n -1 | grep -v Up | aprint 1 | xargs -I[] -r docker rm []" | |
function ___date() { echo -n "[`date --rfc-3339=seconds `] "; } | |
function dockerkill() { docker ps | grep $1 | aprint 1 | xargs -I[] -r docker stop []; } | |
function dockerdel() { docker images | grep $1 | aprint 3 | xargs -I[] -r docker rmi []; } | |
function untilfail() { while $@; do :; done } |