Last active
November 12, 2024 04:44
-
-
Save notch1p/1cfb1fec234c721ea5d2b78c36ac158d to your computer and use it in GitHub Desktop.
I cant afford to lose this shit ever again. Learn to backup. Double check for api keys.
This file contains hidden or 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 LC_CTYPE=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 #set default unix locale. | |
| export EDITOR='/opt/homebrew/bin/nvim' | |
| export RUSTUP_DIST_SERVER="https://rsproxy.cn" | |
| export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" | |
| export CC="/opt/homebrew/opt/llvm/bin/clang" | |
| export CXX="/opt/homebrew/opt/llvm/bin/clang++" | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| #if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| # source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| #fi | |
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Put alias here. | |
| alias cat="bat" | |
| alias cd="z" | |
| function setproxy() { | |
| export HTTP_PROXY="${1:-http://127.0.0.1:8889}" | |
| export HTTPS_PROXY="$HTTP_PROXY" | |
| export http_proxy="$HTTP_PROXY" | |
| export https_proxy="$HTTP_PROXY" | |
| } | |
| function setGlobalProxy { | |
| setproxy "http://127.0.0.1:9889" | |
| } | |
| function unsetproxy { | |
| for i in {HTTP_PROXY,HTTPS_PROXY,http_proxy,https_proxy} | |
| do | |
| unset $i | |
| done | |
| } | |
| alias typora='open -a typora' | |
| alias cl-repl='env sbcl --noinform --eval "(ql:quickload :cl-repl :silent t)" --eval "(cl-repl:main)"' | |
| alias sbcl='rlwrap sbcl --noinform' | |
| alias ocaml='rlwrap ocaml' | |
| alias fortune='fortune -a | pokemonsay' | |
| alias 'gdog'='git log --all --decorate --oneline --graph' | |
| alias vim="/opt/homebrew/bin/nvim" | |
| alias nw="/Applications/nwjs.app/Contents/MacOS/nwjs" | |
| alias cls="clear" | |
| alias taskmgr='open -a /System/Applications/Utilities/Activity\ Monitor.app' | |
| alias ntrace='nexttrace-enhanced' | |
| alias idea="eureka" | |
| alias plz="sudo" | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=$HOME/.oh-my-zsh | |
| export RPS1="%{$reset_color%}" | |
| # Do not change above. | |
| # env here. | |
| export CXXFLAGS=-isystem\ /usr/local/include | |
| export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib | |
| export V2RAYA_V2RAY_BIN="/opt/homebrew/bin/v2ray" | |
| export V2RAY_LOCATION_ASSET="/Users/notch1p/Desktop/v2ray" | |
| export HOMEBREW_NO_AUTO_UPDATE=1 | |
| export HOMEBREW_INSTALL_FROM_API=1 | |
| export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" | |
| export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api" | |
| export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" | |
| #!!Do Not Share!! | |
| # | |
| export SBCLI="$HOME/Downloads/sbcl-interpreted/bin/sbcl" | |
| export RPG2K_RTP_PATH="/Volumes/990Pro/.Butter/RTP2k" | |
| export RPG2K3_RTP_PATH="/Volumes/990Pro/.Butter/RTP2k3" | |
| export CPATH="$HOMEBREW_PREFIX/include:$CPATH" | |
| export LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" | |
| export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" | |
| export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" | |
| export PATH="/opt/local/sbin:/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/ncurses/bin:/opt/homebrew/opt/openssl@3/bin:/Users/notch1p/.local/bin:/opt/homebrew/opt/llvm/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/usr/local/sbin" | |
| export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH" | |
| export GOPATH=$HOME/GO | |
| export PATH="$PATH:$GOPATH/bin:/Users/notch1p/.emacs.d/bin:/opt/homebrew/opt/imagemagick/bin" | |
| # export PKG_CONFIG_PATH="/opt/homebrew/opt/curl/lib/pkgconfig" | |
| export MAGICK_HOME="/opt/homebrew/opt/imagemagick/" | |
| # env for zsh-vi-mode | |
| export ZVM_VI_ESCAPE_BINDKEY=jk | |
| export ZVM_VI_EDITOR=nvim | |
| # pnpm | |
| export PNPM_HOME="/Users/notch1p/Library/pnpm" | |
| export PATH="$PNPM_HOME:$PATH" | |
| # pnpm end | |
| # built-in zsh plugins here. | |
| # Anaconda initialization function. Do not change. | |
| # >>> conda initialize >>> | |
| # !! Contents within this block are managed by 'conda init' !! | |
| __conda_setup="$('/Users/notch1p/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2>/dev/null)" | |
| if [ $? -eq 0 ]; then | |
| eval "$__conda_setup" | |
| else | |
| if [ -f "/Users/notch1p/opt/anaconda3/etc/profile.d/conda.sh" ]; then | |
| . "/Users/notch1p/opt/anaconda3/etc/profile.d/conda.sh" | |
| else | |
| export PATH="/Users/notch1p/opt/anaconda3/bin:$PATH" | |
| fi | |
| fi | |
| unset __conda_setup | |
| # <<< conda initialize <<< | |
| # custom function here. | |
| manp() { #read postscript with Skim.app. | |
| man -t "${1}" | open -f -a Skim | |
| } | |
| unzip_here() { # unzip to a new folder in the current pwd with the same name | |
| filename=$(basename -- "${1}") | |
| destdir="${filename%%.*}" | |
| RED='\033[0;31m' | |
| NC='\033[0m' # No Color | |
| echo -e "Extract to ${RED}$destdir${NC}" | |
| mkdir "$destdir" | |
| bsdtar -C "$destdir" -xf "${1}" | |
| if [ $? -eq 0 ]; then | |
| echo -e '\033[1;32mEXTRACTION COMPLETED\033[0m' | |
| ls -l "$destdir"/ | |
| else | |
| echo -e -n '\033[1;91mEXTRACTION FAILED: \033[0m' | |
| echo created empty folder "${RED}$destdir${NC}" | |
| fi | |
| } | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | |
| #ZSH_THEME="spaceship" | |
| eval "$(starship init zsh)" | |
| # Do not change above. | |
| # Set list of themes to pick from when loading at random | |
| # Setting this variable when ZSH_THEME=random will cause zsh to load | |
| # a theme from this variable instead of looking in $ZSH/themes/ | |
| # If set to an empty array, this variable will have no effect. | |
| # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
| # Uncomment the following line to use case-sensitive completion. | |
| # CASE_SENSITIVE="true" | |
| # Uncomment the following line to use hyphen-insensitive completion. | |
| # Case-sensitive completion must be off. _ and - will be interchangeable. | |
| # HYPHEN_INSENSITIVE="true" | |
| # Uncomment one of the following lines to change the auto-update behavior | |
| # zstyle ':omz:update' mode disabled # disable automatic updates | |
| # zstyle ':omz:update' mode auto # update automatically without asking | |
| # zstyle ':omz:update' mode reminder # just remind me to update when it's time | |
| # Uncomment the following line to change how often to auto-update (in days). | |
| # zstyle ':omz:update' frequency 13 | |
| # Uncomment the following line if pasting URLs and other text is messed up. | |
| # DISABLE_MAGIC_FUNCTIONS="true" | |
| # Uncomment the following line to disable colors in ls. | |
| # DISABLE_LS_COLORS="true" | |
| # Uncomment the following line to disable auto-setting terminal title. | |
| # DISABLE_AUTO_TITLE="true" | |
| # Uncomment the following line to enable command auto-correction. | |
| # ENABLE_CORRECTION="true" | |
| # Uncomment the following line to display red dots whilst waiting for completion. | |
| # You can also set it to another string to have that shown instead of the default red dots. | |
| # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" | |
| # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) | |
| # COMPLETION_WAITING_DOTS="true" | |
| # Uncomment the following line if you want to disable marking untracked files | |
| # under VCS as dirty. This makes repository status check for large repositories | |
| # much, much faster. | |
| # DISABLE_UNTRACKED_FILES_DIRTY="true" | |
| # Uncomment the following line if you want to change the command execution time | |
| # stamp shown in the history command output. | |
| # You can set one of the optional three formats: | |
| # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
| # or set a custom format using the strftime function format specifications, | |
| # see 'man strftime' for details. | |
| # HIST_STAMPS="mm/dd/yyyy" | |
| # Would you like to use another custom folder than $ZSH/custom? | |
| # ZSH_CUSTOM=/path/to/new-custom-folder | |
| # Which plugins would you like to load? | |
| # Standard plugins can be found in $ZSH/plugins/ | |
| # Custom plugins may be added to $ZSH_CUSTOM/plugins/ | |
| # Example format: plugins=(rails git textmate ruby lighthouse) | |
| # Add wisely, as too many plugins slow down shell startup. | |
| #eval "$(sheldon source)" # sheldon init for plugins management | |
| plugins=( | |
| gradle-completion | |
| git | |
| nvm | |
| zsh-autosuggestions | |
| F-Sy-H | |
| git-open | |
| zsh-autocomplete | |
| autoupdate | |
| ) | |
| #zoxide init | |
| if command -v zoxide >/dev/null 2>&1; then | |
| eval "$(zoxide init --no-cmd zsh)" | |
| # Fixes https://github.com/ajeetdsouza/zoxide/issues/565 | |
| function z() { | |
| __zoxide_z "$@" | |
| } | |
| alias cd='z' | |
| fi | |
| #### | |
| zmodload zsh/computil | |
| zstyle ':autocomplete:*' delay 0.4 # seconds (float) | |
| # custom zsh plugins here. | |
| # !! Place before 'source $ZSH/oh-my-zsh.sh' !! | |
| fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src | |
| fpath+=${ZSH}/completions | |
| FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" | |
| # omz init | |
| source $ZSH/oh-my-zsh.sh | |
| # User configuration | |
| # export MANPATH="/usr/local/man:$MANPATH" | |
| # You may need to manually set your language environment | |
| # export LANG=en_US.UTF-8 | |
| # Preferred editor for local and remote sessions | |
| # if [[ -n $SSH_CONNECTION ]]; then | |
| # export EDITOR='vim' | |
| # else | |
| # export EDITOR='mvim' | |
| # fi | |
| # Compilation flags | |
| # export ARCHFLAGS="-arch x86_64" | |
| # Set personal aliases, overriding those provided by oh-my-zsh libs, | |
| # plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
| # users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
| # For a full list of active aliases, run `alias`. | |
| # | |
| # Example aliases | |
| # alias zshconfig="mate ~/.zshrc" | |
| # alias ohmyzsh="mate ~/.oh-my-zsh" | |
| # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
| # startup loaded scripts. | |
| [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
| [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
| test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" # load iterm2 shell intergration | |
| #cd $HOME | |
| eval $(thefuck --alias) | |
| alias ll="eza -alh" | |
| alias ls="eza" | |
| #eval "$(mcfly init zsh)" | |
| source $ZSH/alias/_copilot | |
| source <(fzf --zsh) | |
| # moonbit | |
| export PATH="$HOME/.moon/bin:$PATH" | |
| # BEGIN opam configuration | |
| # This is useful if you're using opam as it adds: | |
| # - the correct directories to the PATH | |
| # - auto-completion for the opam binary | |
| # This section can be safely removed at any time if needed. | |
| [[ ! -r '/Users/notch1p/.opam/opam-init/init.zsh' ]] || source '/Users/notch1p/.opam/opam-init/init.zsh' > /dev/null 2> /dev/null | |
| # END opam configuration | |
| #jenv | |
| export PATH="$HOME/.jenv/bin:$PATH" | |
| export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" | |
| eval "$(jenv init -)" | |
| # bun completions | |
| [ -s "/Users/notch1p/.oh-my-zsh/completions/_bun" ] && source "/Users/notch1p/.oh-my-zsh/completions/_bun" | |
| # bun | |
| export BUN_INSTALL="$HOME/.bun" | |
| export PATH="$BUN_INSTALL/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment