(use-package hydra)(use-package use-package-hydra)| next-output-file-name () { | |
| base="$1" | |
| for ((i=0; i<20; i++)); do | |
| filename="${base}.${i}" | |
| [[ ! -e "$filename" ]] && print "$filename" && return | |
| done | |
| print "ERROR" | |
| } | |
| append-tee-file-base () { |
| [Main] | |
| default: match | |
| confdir: $CFGDIR/groups.d | |
| autodir: | |
| [env] | |
| map: puppet query 'nodes[certname] { catalog_environment = "$GROUP" }' | jq -r '.[].certname' | |
| list: puppet query 'environments {}' | jq -r .[].name | |
| [cluster] |
| #! /usr/bin/env zsh | |
| if [[ $# != 1 ]]; then | |
| print Usage: kh-reset hostname | |
| exit 1 | |
| fi | |
| # Expand the different hostnames and IP | |
| if [ -x /usr/bin/dscl ]; then | |
| # macOS |
| 21Sep 14:10:47 ~ 0% which fssh | |
| fssh () { | |
| hosts="$1 $(getent hosts $1)" | |
| if [ -x /usr/bin/dscl ] | |
| then | |
| hosts="$hosts $(dscl . read /Hosts/$1 | awk '/^IPAddress/ { print $2 }')" | |
| fi | |
| for h in ${=hosts} | |
| do | |
| ssh-keygen -R $h >&/dev/null |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| function l { | |
| if [[ ! -t 0 ]]; then | |
| # stdin is not connected to a tty | |
| pager - | |
| elif [[ $# -eq 1 && -f "$1" ]]; then | |
| # single argument names a file | |
| pager "$1" | |
| else | |
| ls -CFL $* | |
| fi |
| %{remote_ip} says %{http_code} | |
| %{content_type} | |
| downloaded %{size_download} bytes at %{download_speed} bytes/s | |
| DNS lookup: %{time_namelookup} | |
| TCP connect: %{time_connect} | |
| SSL connect: %{time_appconnect} | |
| Time to FB: %{time_starttransfer} | |
| Total: %{time_total} |
| #! /usr/bin/env zsh | |
| echo \\a | |
| title=Ding | |
| message="${*:-DONE}" | |
| function is_available { | |
| command -v $* >& /dev/null | |
| } |
I hereby claim:
To claim this, I am signing this object: