Add zshrc

This commit is contained in:
Laura Hausmann 2023-02-18 02:08:11 +01:00
parent 755ed0e8f1
commit 745e881e66
Signed by untrusted user: zotan
GPG key ID: D044E84C5BE01605

32
macx-resources/zshrc Normal file
View file

@ -0,0 +1,32 @@
export EDITOR=nano
export PATH="$PATH:/Users/$USER/Documents/scripts:/Users/$USER/.dotnet/tools"
export HOMEBREW_CASK_OPTS="--no-quarantine"
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
checkin () {
curl -H 'Authorization: Bearer replaceme_with_secret' -d '{"reason": "ping", "status": {"checkedIn": true, "train": {"type": "'$1'", "no": "'$2'"}, "toStation": {"name": "'$3'"}}}' https://zotan.pw/travelynx.php
}
# system tool aliases
alias mtr="sudo mtr -z"
# dotnet project aliases
alias 'nat64decode'='/Users/zotan/Projects/nat64decode/bin/Release/net7.0/osx-arm64/publish/nat64decode'
alias 'tgcli'='dotnet run -v q --project ~/Projects/tgcli/tgcli/ -- -s -l'
# wireguard tunnel management aliases
alias 'wg-up'='sudo wg-quick up uplink'
alias 'wg-down'='sudo wg-quick down uplink'
alias 'wg-reconnect'='sudo wg-quick down uplink && sudo wg-quick up uplink'
# dotnet autocompile aliases
## compression for macos-arm64 disabled because it builds broken binaries
alias dotnet-autocompile='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r linux-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r win-x64'
alias dotnet-autocompile-maconly='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64'