Created
January 16, 2020 09:42
-
-
Save hajlaoui-nader/c9f586de5d535d465f07ef81a3210974 to your computer and use it in GitHub Desktop.
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
| # Path to your oh-my-zsh installation. | |
| export ZSH=/Users/parnaderhajlaoui/.oh-my-zsh | |
| ZSH_THEME="robbyrussell" | |
| HYPHEN_INSENSITIVE="true" | |
| plugins=(copybuffer command-not-found mvn cp brew colorize sudo git docker docker-compose git-remote-branch man osx postgres sudo yarn gitignore copydir z zsh-autosuggestions) | |
| alias to='cd ~/Projects/' | |
| ## JAVA | |
| export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/ | |
| ## GIT | |
| alias gs='git status' | |
| alias gfp='git fetch --prune' | |
| alias gpr='git pull --rebase' | |
| alias gco='git checkout' | |
| alias gpron='git config --global pull.rebase true' | |
| alias gproff='git config --global pull.rebase false' | |
| alias gconf='git config --global -l' | |
| alias dev='git checkout develop' | |
| alias blog="\git log --color --all --date-order --decorate --dirstat=lines,cumulative --stat | sed 's/\([0-9] file[s]\? .*)$\)/\1\n_______\n-------/g' | \less -R" | |
| alias gclr='git checkout -- .' | |
| ## COMMON | |
| alias cp='cp -i' | |
| alias mv='mv -i' | |
| alias rm='rm -i' | |
| #alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' | |
| alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" | |
| alias cc='clear' | |
| ### MVN | |
| alias mcist='mvn clean install -DskipTests' | |
| alias mci='mvn clean install' | |
| ### ZSH | |
| alias zshreload="source ~/.zshrc && echo zsh config reloaded" | |
| alias zshrc="subl ~/.zshrc" | |
| # prezto activation | |
| #source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" | |
| #Docker | |
| # Get latest container ID | |
| alias dl="docker ps -l -q" | |
| # Get container process | |
| alias dps="docker ps -a" | |
| # Get images | |
| alias di="docker images" | |
| # Get container IP | |
| alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'" | |
| # Run deamonized container, e.g., $dkd base /bin/echo hello | |
| alias dkd="docker run -d -P" | |
| # Run interactive container, e.g., $dki base /bin/bash | |
| alias dki="docker run -i -t -P" | |
| # Execute interactive container, e.g., $dex base /bin/bash | |
| alias dex="docker exec -i -t" | |
| # Stop all containers | |
| dstop() { docker stop $(docker ps -a -q)\n } | |
| # Remove all containers | |
| drm() { docker rm $(docker ps -a -q)\n } | |
| # Stop and Remove all containers | |
| alias stopAndDelete='docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)' | |
| # Remove all images | |
| dri() { docker rmi $(docker images -q)\n } | |
| # Dockerfile build, e.g., $dbu tcnksm/test | |
| dbu() { docker build -t=$1 .\n } | |
| # Show all alias related docker | |
| dalias() { alias | grep 'docker' | sed "s/^\([^=]*\)=\(.*\)/\1 => \2/"| sed "s/['|\']//g" | sort\n } | |
| # Bash into running container | |
| dbash() { docker exec -it $(docker ps -aqf "name=$1") bash\n } | |
| #curl | |
| alias curl="curl -ksv" | |
| eval $(thefuck --alias fuck) | |
| #SPARK | |
| export PATH=$PATH:/usr/local/spark/bin | |
| ### PG | |
| alias startPG="docker run --name=pg-docker -e POSTGRES_PASSWORD=passw0rd -p 5432:5432 postgres" | |
| ##### SBT | |
| alias sbt='sbt -Dsbt.override.build.repos=true' | |
| alias sbtr='sbt compile && sbt scalafmtCheck && sbt scalastyle && sbt test && sbt test:scalafmtCheck' | |
| ######## GO | |
| export GO_HOME=/Users/parnaderhajlaoui/go | |
| export PATH=$PATH:$GO_HOME/bin:~/.local/bin | |
| #### MISC | |
| alias ll='ll -a' | |
| alias wholisten='_wholisten() { sudo lsof -iTCP:"$1" -sTCP:LISTEN\n}\n _wholisten' | |
| local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
| PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
| #### HASKELL | |
| source /Users/parnaderhajlaoui/.ghcup/env | |
| source $ZSH/oh-my-zsh.sh | |
| ### ZNT's installer added snippet ### | |
| fpath=( "$fpath[@]" "$HOME/.config/znt/zsh-navigation-tools" ) | |
| autoload n-aliases n-cd n-env n-functions n-history n-kill n-list n-list-draw n-list-input n-options n-panelize n-help | |
| autoload znt-usetty-wrapper znt-history-widget znt-cd-widget znt-kill-widget | |
| alias naliases=n-aliases ncd=n-cd nenv=n-env nfunctions=n-functions nhistory=n-history | |
| alias nkill=n-kill noptions=n-options npanelize=n-panelize nhelp=n-help | |
| zle -N znt-history-widget | |
| bindkey '^R' znt-history-widget | |
| setopt AUTO_PUSHD HIST_IGNORE_DUPS PUSHD_IGNORE_DUPS | |
| zstyle ':completion::complete:n-kill::bits' matcher 'r:|=** l:|=*' | |
| ### END ### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment