diff --git a/configs/ssh/config b/configs/ssh/config index ed2ef05..b005789 100644 --- a/configs/ssh/config +++ b/configs/ssh/config @@ -1,8 +1,9 @@ +# vim: nospell # Global Rules Host * !*.github.com !github.com IdentityFile %d/.ssh/id_ed25519_sk_rk_yk20572395 IdentityFile %d/.ssh/id_ed25519 - IdentityFile %d/.ssh/id_rsa + # IdentityFile %d/.ssh/id_rsa VisualHostKey yes # Github SSH adapter for restricted networks @@ -12,7 +13,7 @@ Host github.com gist.github.com # This solves a VSCode bug IdentityFile %d/.ssh/id_ed25519 IdentityFile %d/.ssh/id_ed25519_sk_rk_yk20572395 - IdentityFile %d/.ssh/id_rsa + # IdentityFile %d/.ssh/id_rsa # Home network Host unifi diff --git a/configs/zsh/macros.sh b/configs/zsh/macros.sh index d523e58..654924d 100644 --- a/configs/zsh/macros.sh +++ b/configs/zsh/macros.sh @@ -13,6 +13,7 @@ alias lsgrep="ls | grep" alias sheridan-rdp='firefox --new-window "ext+container:name=College&url=https://client.wvd.microsoft.com/arm/webclient/index.html"' alias git-diff-nvim="git diff | nvim -R -d -c 'set filetype=diff' -" alias yk-totp="ykman oath accounts code" +alias flush-dns-cache="sudo systemd-resolve --flush-caches" # WHOIS macros alias whois-afrinic="whois -h whois.afrinic.net" @@ -125,7 +126,8 @@ wg-restart() { if [ $# != 1 ]; then echo "Usage: wg-restart " else - wg-quick down $1 && wg-quick up $1 + wg-quick down $1 || true; + wg-quick up $1 fi } @@ -137,3 +139,21 @@ wg-reload() { wg syncconf $1 <(wg-quick strip $1) fi } + +# Edit a wireguard config file +wg-edit() { + if [ $# != 1 ]; then + echo "Usage: wg-edit " + else + sudo nvim /etc/wireguard/$1.conf + fi +} + +# Print a wireguard config file +wg-cat() { + if [ $# != 1 ]; then + echo "Usage: wg-cat " + else + sudo cat /etc/wireguard/$1.conf + fi +}