From 50a23cf3b7bf469f9e82823c19a679a567ea5aed Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Sun, 22 Dec 2024 12:05:58 -0500 Subject: [PATCH] fix keys alias --- configs/.zshrc | 2 +- scripts/get-mac-serial | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 scripts/get-mac-serial diff --git a/configs/.zshrc b/configs/.zshrc index 061d2d0..6833fac 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -111,9 +111,9 @@ alias snvim="sudoedit" alias genuuid="python -c 'import uuid; print(uuid.uuid4())'" alias nvim-tmp="$EDITOR $(mktemp)" alias vim-tmp="$EDITOR $(mktemp)" +alias wg-easykeys="wg genkey | tee >(wg pubkey)" # Some aliases only make sense if their parent command exists -[[ -x "$(command -v wg)" ]] && alias wg-easykeys="wg genkey | tee >(wg pubkey)" [[ -x "$(command -v systemd-resolve)" ]] && alias flush-dns="sudo systemd-resolve --flush-caches" [[ -x "$(command -v ykman)" ]] && alias yk-totp="ykman oath accounts code" [[ -x "$(command -v ufw)" ]] && alias ufw-status="sudo ufw status numbered" diff --git a/scripts/get-mac-serial b/scripts/get-mac-serial new file mode 100755 index 0000000..d7833d0 --- /dev/null +++ b/scripts/get-mac-serial @@ -0,0 +1,4 @@ +#! /bin/bash +set -e + +ioreg -l | grep IOPlatformSerialNumber | grep -oE '"([^"]+)"$' | tr -d '"'