Last active
February 10, 2025 04:11
-
-
Save Haksell/c4c7aaffc8ba8b404b3f64d81030ca7a to your computer and use it in GitHub Desktop.
.zshrc 42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="robbyrussell" | |
plugins=(git you-should-use) | |
export ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST | |
source $ZSH/oh-my-zsh.sh | |
alias c='clear;' | |
alias cw='cc -Wall -Wextra -Werror' | |
alias d='dart' | |
alias h='runghc -Wall' | |
alias hg='history | grep' | |
alias jl='jupyter lab' | |
alias kk='kill -kill' | |
alias l='ls -lhvFA --color=auto --group-directories-first' | |
alias lg='l | grep -i' | |
alias mj='make -j' | |
alias p='python' | |
alias pat='echo "$PATH" | tr ":" "\n" | sort | uniq' | |
alias piu='pip install --upgrade' | |
alias rf='rm -rf' | |
alias rms='rm -rf ~/.config/google-chrome/Singleton*' | |
alias up='/usr/bin/python3' | |
alias v='valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -q' | |
alias xsc='xclip -selection c' | |
alias zrc='source ~/.zshrc' | |
alias pbcopy='xclip -selection clipboard' | |
alias teecopy='tee >(xclip -selection clipboard)' | |
alias pbpaste='xclip -selection clipboard -o' | |
alias clipsize='pbpaste | wc -c' | |
alias dc='docker compose' | |
alias dpsa='docker ps -a' | |
alias dsdf='docker system df' | |
alias glsf='git ls-files' | |
alias gst='git status --untracked-files=all' | |
alias gapo='grset --add --push origin' | |
alias cr='cargo run' | |
alias crq='cargo run --quiet' | |
alias crr='cargo run --release' | |
alias crrq='cargo run --release --quiet' | |
alias ctt='cargo test' | |
alias cttl='cargo test --lib' | |
alias cttr='cargo test --release' | |
alias cttrl='cargo test --release --lib' | |
function ac { | |
local msg="${1:-.}" | |
git add . | |
git commit -m "$msg" | |
} | |
function acpl { | |
ac "$1" | |
git pull | |
} | |
function acph { | |
ac "$1" | |
git push | |
} | |
function rrun { | |
local name=$(basename $1 .rs) | |
shift | |
trap "rm -f $name" EXIT ERR INT TERM HUP | |
rustc "$name.rs" && ./$name "$@" | |
} | |
function randint { | |
local min=$1 | |
local max=$2 | |
if [[ -z "$min" || -z "$max" ]]; then | |
echo "Usage: randint <min> <max>" | |
return 1 | |
fi | |
echo $((RANDOM % (max - min + 1) + min)) | |
} | |
function pin { | |
local filename="in$1" | |
pbpaste >"$filename" && echo "Clipboard content saved to $filename" | |
} | |
export PATH=$HOME/tools:$PATH | |
export PATH=$HOME/.local/bin:$PATH | |
[ -f "/media/axbrisse/ugreen/.cargo/env" ] && . "/media/axbrisse/ugreen/.cargo/env" | |
export CARGO_HOME=/media/axbrisse/ugreen/.cargo | |
export RUSTUP_HOME=/media/axbrisse/ugreen/.rustup | |
export PYENV_ROOT=/media/axbrisse/ugreen/.pyenv | |
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
export VAGRANT_HOME=/media/axbrisse/ugreen/.vagrant.d | |
[[ -s /mnt/nfs/homes/axbrisse/.autojump/etc/profile.d/autojump.sh ]] && source /mnt/nfs/homes/axbrisse/.autojump/etc/profile.d/autojump.sh | |
autoload -U compinit && compinit -u | |
export TF_CPP_MIN_LOG_LEVEL=2 | |
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH | |
export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH | |
export LD_LIBRARY_PATH=$HOME/.local/lib64:$LD_LIBRARY_PATH | |
export HOMEBREW_PREFIX="/media/axbrisse/ugreen/homebrew" | |
export HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar" | |
export HOMEBREW_REPOSITORY="$HOMEBREW_PREFIX" | |
export PATH="$HOMEBREW_PREFIX/bin:$PATH" | |
eval "$(brew shellenv)" | |
if ((RANDOM % 100 == 0)); then | |
echo "Performing brew update..." | |
brew update --force --quiet | |
fi | |
chmod -R go-w "$(brew --prefix)/share/zsh" | |
export NVM_DIR="/media/axbrisse/ugreen/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
export MOBILE_DIR=/media/axbrisse/ugreen/mobile | |
export ANDROID_HOME=$MOBILE_DIR/Android/Sdk | |
export ANDROID_SDK_ROOT=$ANDROID_HOME | |
export JAVA_HOME=$MOBILE_DIR/jdk | |
export GRADLE_USER_HOME=/tmp/.gradle | |
export ANDROID_BUILD_CACHE_DIR=/tmp/.android_cache | |
export ANDROID_USER_HOME=/tmp/.android | |
export ANDROID_EMULATOR_HOME=/tmp/.android | |
export ANDROID_AVD_HOME=/tmp/.android/avd | |
export PATH=$MOBILE_DIR/flutter/bin:$PATH | |
export PATH=$JAVA_HOME/bin:$PATH | |
export PATH=$PATH:$ANDROID_HOME/emulator | |
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin | |
export PATH=$PATH:$ANDROID_HOME/platform-tools | |
mkdir -p $ANDROID_SDK_ROOT | |
mkdir -p $ANDROID_AVD_HOME | |
export PATH=.:$PATH | |
typeset -aU path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment