Last active
March 2, 2022 13:35
-
-
Save MCardus/d6e74075c56d9ebf352b6cda47778981 to your computer and use it in GitHub Desktop.
zshrc profile
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
# ZSHRC # | |
## ZSH CONF ## | |
### Mac OS Home ### | |
export HOME="/Users/$(whoami)" | |
export ZSH=$HOME"/.oh-my-zsh" | |
ZSH_THEME="agnoster" | |
# Some sample plugins: git colorize pip python zsh-syntax-highlighting | |
plugins=( | |
git colorize pip python zsh-syntax-highlighting | |
) | |
## Imports ## | |
source $ZSH/oh-my-zsh.sh | |
source "$HOME/.sdkman/bin/sdkman-init.sh" | |
## Windows conf ## | |
#export WIN_PATH='/mnt/c/Users/Marc.CardusGarcia' | |
## SPARK ## | |
export SPARK_HOME=$HOME/Tools/spark-3.1.2-bin-hadoop2.7 | |
export PATH=$SPARK_HOME/bin:$PATH | |
export PYSPARK_DRIVER_PYTHON="jupyter" | |
export PYSPARK_DRIVER_PYTHON_OPTS="notebook" | |
export PYSPARK_PYTHON=python3 | |
export SPARK_LOCAL_IP=127.0.0.1 | |
## Python ## | |
export PATH=$HOME"/.local/bin:$PATH" | |
## Scala ## | |
alias toree='docker run -v $(pwd):/home/jovyan/work -p 8888:8888 -d jupyter/all-spark-notebook && sleep 2 && docker logs $(docker ps -lq)' | |
## Docker ## | |
alias dk='docker' | |
alias dkill='docker kill' | |
alias dps="docker ps" | |
alias di="docker images" | |
alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'" | |
alias dkc="docker-compose" | |
function dex() { docker exec -it $(docker ps -qf name=$1) bash } | |
function dstop() { docker stop $(docker ps -a -q); } | |
function dbu() { docker build -t=$1 .; } | |
function dri() { docker rmi $(docker images -q); } | |
alias drmf='docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)' | |
## Git ## | |
export VISUAL=vim | |
export EDITOR="$VISUAL" | |
alias g='git' | |
alias ga='git add' | |
alias gb='git branch' | |
alias gbD='git branch -D' | |
alias gdel='git branch -D' | |
alias gbr="git branch | grep -v "master" | xargs git branch -D" | |
alias gc='git commit' | |
alias gcam='git commit --amend' | |
alias gcm='git commit-m' | |
alias gcb='git checkout -b' | |
alias gco='git checkout' | |
alias gcl='git clone' | |
alias gd='git diff' | |
alias gdt='git difftool' | |
alias gft='gf fetch --all --prune --tags' | |
alias gp='git push' | |
alias gpf='git push --force' | |
alias gl='git pull' | |
alias gr='git remote' | |
alias gra='git remote add' | |
alias grv='git remote -v' | |
alias grm='git rm' | |
alias grb='git rebase -i' | |
alias gus='git reset HEAD' | |
alias gpristine='git reset --hard && git clean -dfx' | |
alias gs='git status' | |
alias gsh='git show' | |
alias gst='git stash' | |
alias gstb='git stash branch' | |
alias gstd='git stash drop' | |
alias gstl='git stash list' | |
alias gstp='git stash pop' # kept due to long-standing usage | |
alias gstpo='git stash pop' # recommended for it's symmetry with gstpu (push) | |
alias gt='git tag' | |
alias gta='git tag -a' | |
alias gtd='git tag -d' | |
alias gtl='git tag -l' | |
# Folders # | |
## Mac ONLY ## | |
alias dev='cd ~/Dev' | |
alias per='cd ~/Personal' | |
alias too='cd ~/Tools' | |
## Windows ONLY | |
#alias win='cd $WIN_PATH' | |
#alias dev='cd $WIN_PATH/dev' | |
#alias per='cd $WIN_PATH/personal' | |
#alias too='cd $WIN_PATH/tools' | |
# Terraform # | |
alias tf='terraform' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment