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/sh | |
alias dm='docker-machine' | |
alias dmx='docker-machine ssh' | |
alias dk='docker' | |
alias dki='docker images' | |
alias dks='docker service' | |
alias dkrm='docker rm' | |
alias dkl='docker logs' | |
alias dklf='docker logs -f' |
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
openssl s_client -connect ${1:-google.com}:${2:-443} </dev/null | openssl x509 -in /dev/stdin -noout -text |
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 | |
# Useful for, for example, versioning docker images built from subdirectories in a mono-repo. | |
cd ${1:-.} || exit | |
git ls-tree -r --name-only $(git rev-parse --symbolic-full-name --abbrev-ref HEAD) \ | |
| while read f; do [[ -d "${f}" ]] || [[ -f "${f}" ]] && echo ${f}; done \ | |
| sort -fd \ | |
| tr '\n' '\0' \ | |
| xargs -0 openssl sha1 \ | |
| openssl sha1 |
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 | |
sourced() { [ 'bash' = "${0:-i}" ] || [ "${BASH_SOURCE[0]}" != "${0:-i}" ]; } | |
sourced && { | |
SELF=$( | |
[ "${ZSH_VERSION}" ] && echo "${(%):-%N}" \ | |
|| [ "${BASH_VERSION}" ] && echo "${BASH_SOURCE[0]}" \ | |
|| echo "${0}" | |
) | |
export SCRIPT_HOME=$(cd $(dirname ${SELF})/..; pwd) |
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
secrets/ |
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 | |
STARTD=${PWD} | |
SELFD=$(cd $(dirname ${0}) >/dev/null 2>&1; pwd) | |
SELF=$(basename ${0}) | |
SELFN=$(basename ${SELFD}) | |
SELFU=${SELF%.*} | |
SELFZ=${SELFD}/${SELF} | |
NOW=$(date +%Y%m%dt%H%M%S) | |
UNQ=${NOW}.${RANDOM} | |
LOGD=${SELFD}/${SELFU}.${UNQ} |
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 | |
tgzx() { | |
(( ${#} >= 2 )) || { echo 'usage: tgzx archive-file [files | directories]'; return 1; } | |
printf '#!/usr/bin/env bash\ntail -n+3 ${0} | openssl enc -aes-256-cbc -d -a | tar ${1:-xv}z; exit\n' >${1} | |
tar zc "${@:2}" | openssl enc -aes-256-cbc -a -salt >>${1} && chmod +x ${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
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
service: ambassador | |
name: ambassador | |
spec: | |
type: LoadBalancer | |
ports: |