1

Merge branch 'master' of git.ewpratten.com:evan/ewconfig

This commit is contained in:
Evan Pratten 2025-01-06 10:48:18 -05:00
commit 7b0b402a76
7 changed files with 68 additions and 2 deletions

View File

@ -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"

View File

@ -0,0 +1,24 @@
{
"Created": "proxmark3",
"FileType": "settings",
"show.emoji": "emoji",
"show.hints": true,
"output.dense": false,
"os.supports.colors": true,
"file.default.savepath": "/Users/ewpratten/Documents/proxmark",
"file.default.dumppath": "/Users/ewpratten/Documents/proxmark",
"file.default.tracepath": "/Users/ewpratten/Documents/proxmark",
"window.plot.xpos": 10,
"window.plot.ypos": 30,
"window.plot.hsize": 400,
"window.plot.wsize": 800,
"window.overlay.xpos": 10,
"window.overlay.ypos": 490,
"window.overlay.hsize": 200,
"window.overlay.wsize": 800,
"window.overlay.sliders": true,
"client.debug.level": "off",
"show.bar.mode": "value",
"client.exe.delay": 0,
"client.timeout": 0
}

View File

@ -79,6 +79,7 @@ if !exists('g:vscode')
autocmd FileType usda setlocal nospell
endif
" Configure Diff rendering
hi DiffText ctermfg=White ctermbg=none
hi DiffFile ctermfg=White ctermbg=none cterm=bold

View File

@ -38,6 +38,8 @@ mkdir -p ~/.config/gqrx
mkdir -p ~/.config/pip
mkdir -p ~/.cargo
mkdir -p ~/.ssh
mkdir -p ~/.proxmark3
mkdir -p ~/.vim
# Mac-specific dirs
if [ "$(uname)" == "Darwin" ]; then
@ -67,8 +69,12 @@ touch ~/.ssh/config.local
chmod 644 "$HOME/.ssh/config"
if type -p chown > /dev/null; then chown $(id -u) "$HOME/.ssh/config"; fi
# Configure (neo)Vim
# Configure vim
mkdir -p $EWCONFIG_ROOT/configs/vim/pack
ln -sf $EWCONFIG_ROOT/configs/vim/.vimrc ~/.vimrc
ln -snf $EWCONFIG_ROOT/configs/vim/pack ~/.vim/pack
# Configure neovim
ln -sf $EWCONFIG_ROOT/configs/nvim/init.vim ~/.config/nvim/init.vim
ln -snf $EWCONFIG_ROOT/configs/nvim/pack ~/.config/nvim/pack
ln -snf $EWCONFIG_ROOT/configs/nvim/third_party ~/.config/nvim/third_party
@ -91,6 +97,9 @@ ln -sf $EWCONFIG_ROOT/configs/cargo/config.toml ~/.cargo/config.toml
# Termux
ln -sf $EWCONFIG_ROOT/configs/termux/termux.properties ~/.config/termux/termux.properties
# Proxmark3
ln -sf $EWCONFIG_ROOT/configs/proxmark3/preferences.json ~/.proxmark3/preferences.json
# Set up user-tempfiles configs
ln -sf $EWCONFIG_ROOT/configs/user-tmpfiles.d/* ~/.config/user-tmpfiles.d/

18
scripts/age-open Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
set -e
# Require an AGE-encrypted file
if [ $# != 1 ]; then
echo "Usage: $(basename $0) <file>"
exit 1
fi
# Decrypt the file to temp
age -d "$1" > /tmp/$(echo "$1" | sed 's/\.age$//')
# Open the decrypted file
open /tmp/$(echo "$1" | sed 's/\.age$//') &
# Remove the decrypted file
sleep 10
rm /tmp/$(echo "$1" | sed 's/\.age$//')

10
scripts/dlcrypt Executable file
View File

@ -0,0 +1,10 @@
#! /bin/bash
set -e
# Require an output path and a URL
if [ $# != 2 ]; then
echo "Usage: $(basename $0) <output> <url>"
exit 1
fi
age -p <(curl -sSL "$2") > "$1"

4
scripts/get-mac-serial Executable file
View File

@ -0,0 +1,4 @@
#! /bin/bash
set -e
ioreg -l | grep IOPlatformSerialNumber | grep -oE '"([^"]+)"$' | tr -d '"'