Skip to content

Instantly share code, notes, and snippets.

@deadcoder0904
Last active April 3, 2021 11:39
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deadcoder0904/3326ec4b4237b47f4eb14a032b88f3f7 to your computer and use it in GitHub Desktop.
Save deadcoder0904/3326ec4b4237b47f4eb14a032b88f3f7 to your computer and use it in GitHub Desktop.
My Aliases for Oh My Zsh & .zshrc File
# Path to your oh-my-zsh installation.
export ZSH=/home/deadcoder0904/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="agnoster"
#ZSH_THEME="cobalt2"
#CUTE _THEME
ZSH_THEME="cute-theme"
# 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 the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# 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.
# 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.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# 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? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(colorize git git-open hacker-quotes jsontools sudo zsh-256color rand-quote)
# User configuration
# export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# 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"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# 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"
# Tree
alias tree='ls -R | grep ":$" | sed -e '"'"'s/:$//'"'"' -e '"'"'s/[^-][^\/]*\//--/g'"'"' -e '"'"'s/^/ /'"'"' -e '"'"'s/-/|/'"'"
# Awesome NPM Package Name
npm_name() { wn $1 -syns{n,v,a,r} ;}
# EXPOSE
alias expose=/media/deadcoder0904/DEAD/Coding/General/Expose/expose.sh
# -------------------------------------------------------------------
# NPM aliases
# -------------------------------------------------------------------
alias ni='npm install'
alias nis='npm install --save'
alias nid='npm install --save-dev'
alias nig='npm install --global'
alias nt='npm test'
alias nit='npm install && npm test'
alias nk='npm link'
alias nr='npm run'
alias nf='npm cache clean && rm -rf node_modules && npm install'
alias nlg='npm list --global --depth=0'
# -------------------------------------------------------------------
# Git aliases
# -------------------------------------------------------------------
alias ga='git add -A'
alias gp='git push'
alias gpom='git push origin master'
alias gpog='git push origin gh-pages'
alias gl='git log'
alias gs='git status'
alias gd='git diff'
alias gm='git commit -m'
alias gma='git commit -am'
alias gb='git branch'
alias gc='git checkout'
alias gra='git remote add'
alias grr='git remote rm'
alias gpu='git pull'
alias gcl='git clone'
alias gta='git tag -a -m'
alias gf='git reflog'
alias git_username='git config --global user.username'
alias git_name='git config --global user.name'
alias git_email='git config --global user.email'
#SCRIPT ALIASES
alias updateVSCode="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/updateVSCode.sh'"
alias runEmulator="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runEmulator.sh'"
alias runHexoAndPush2Github="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runHexoAndPush2Github.sh'"
alias runHugoAndPush2Github="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runHugoAndPush2Github.sh'"
alias runGithubTrending="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runGithubTrending.sh'"
alias runJekyllAndPush2Github="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runJekyllAndPush2Github.sh'"
alias runJekyllAndServe="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runJekyllAndServe.sh'"
alias push2Github="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/push2Github.sh'"
alias push2GithubPages="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/push2GithubPages.sh'"
alias createGhpagesAndMergeWithMaster="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/createGhpagesAndMergeWithMaster.sh'"
alias runC="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runC.sh'"
alias runC++="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runC++.sh'"
alias writePythonToFileAndRunFile="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/writePythonToFileAndRunFile.sh'"
alias runUglifyAndpush2gh-pages="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/runUglifyAndpush2gh-pages.sh'"
alias makeSimpleReactTemplate="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeSimpleReactTemplate.sh'"
alias makeNodeTemplate="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeNodeTemplate.sh'"
alias makeHTMLCSSJSTemplate="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeHTMLCSSJSTemplate.sh'"
alias makeHTMLCSSJSES7Template="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeHTMLCSSJSES7Template.sh'"
alias makeHTMLCSSJSTACHYONSES7Template="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeHTMLCSSJSTACHYONSES7Template.sh'"
alias makeHTMLCSSJQUERYTACHYONSTemplate="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeHTMLCSSJQUERYTACHYONSTemplate.sh'"
alias makeHTMLCSSJQUERYTACHYONSES7Template="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/makeHTMLCSSJQUERYTACHYONSES7Template.sh'"
alias takeScreenshots="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/takeScreenshots.sh'"
alias checkoutGhpagesAndMergeWithMaster="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/checkoutGhpagesAndMergeWithMaster.sh'"
alias checkoutMasterAndMergeWithGhpages="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/checkoutMasterAndMergeWithGhpages.sh'"
alias recordScreen="source '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/recordScreen.sh'"
alias findAndReplace="python '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/findAndReplace.py'"
alias sortAndOrderFiles="python '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/sortAndOrderFiles.py'"
alias compressImage="python '/media/deadcoder0904/DEAD/Coding/General/personal-bash-scripts/compressImage.py'"
alias eggheadDownload="python '/media/deadcoder0904/DEAD/Coding/100dayz/egghead-videos-download/index.py'"
alias browserSync="browser-sync start --server --files '*.html' 'css/*.css' 'js/*.js'"
# HISTORY
alias his="history"
alias clr="echo '' > ~/.zsh_history & exec $SHELL -l"
# EXIT
alias q='exit'
alias quit=q
# KILL
alias kill_port="fuser -n tcp -k $1"
# LIST GLOBALLY INSTALL npm MODULES
alias npm_global="ls \`npm root -g\`"
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
DEFAULT_USER=`whoami`
###-begin-npm-completion-###
#
# npm command completion script
#
# Installation: npm completion >> ~/.bashrc (or ~/.zshrc)
# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm
#
if type complete &>/dev/null; then
_npm_completion () {
local words cword
if type _get_comp_words_by_ref &>/dev/null; then
_get_comp_words_by_ref -n = -n @ -w words -i cword
else
cword="$COMP_CWORD"
words=("${COMP_WORDS[@]}")
fi
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -o default -F _npm_completion npm
elif type compdef &>/dev/null; then
_npm_completion() {
local si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
}
compdef _npm_completion npm
elif type compctl &>/dev/null; then
_npm_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K _npm_completion npm
fi
###-end-npm-completion-###
### ONLY SHOW 2 TOP LEVEL DIRECTORIES
#prompt_dir() {
# prompt_segment blue white '%2/'
#}
# added by travis gem
[ -f /home/deadcoder0904/.travis/travis.sh ] && source /home/deadcoder0904/.travis/travis.sh
export NVM_DIR="/home/deadcoder0904/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
GOPATH=/home/deadcoder0904/.go
export GOPATH
PATH=$PATH:$GOPATH/bin # Add GOPATH/bin to PATH for scripting
export PATH=$HOME/bin:$PATH
# tabtab source for yarn package
# uninstall by removing these lines or running `tabtab uninstall yarn`
[[ -f /home/deadcoder0904/.yarn-config/global/node_modules/yarn-completions/node_modules/tabtab/.completions/yarn.zsh ]] && . /home/deadcoder0904/.yarn-config/global/node_modules/yarn-completions/node_modules/tabtab/.completions/yarn.zsh
export PATH=$PATH:$HOME/bin
export REACT_EDITOR='code'
export EDITOR='code'
export ANDROID_HOME=${HOME}/Android/Sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH="/home/deadcoder0904/.npm-global/bin/:$PATH"
@ggteixeira
Copy link

Just borrowed your "q" alias. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment