Skip to content

Instantly share code, notes, and snippets.

@evild70
Created July 15, 2019 19:26
Show Gist options
  • Save evild70/d3782dc92c3f045bf9d2e5e4589824d7 to your computer and use it in GitHub Desktop.
Save evild70/d3782dc92c3f045bf9d2e5e4589824d7 to your computer and use it in GitHub Desktop.
.bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#source ~/.profile
# Set Paths
# ------------------------------------------------------------
#export PATH="$PATH:/usr/local/bin/"
#export PATH="/usr/local/git/bin:/sw/bin/:/usr/local/bin:/usr/local/:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
#export PATH=$PATH:/Users/dlahay/drush
#export PATH=$HOME/local/bin:$PATH
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
# cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd'
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
alias .4='cd ../../../../' # Go back 4 directory levels
alias .5='cd ../../../../../' # Go back 5 directory levels
alias .6='cd ../../../../../../' # Go back 6 directory levels
alias edit='subl' # edit: Opens any file in sublime editor
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder
alias ~="cd ~" # ~: Go Home
alias c='clear' # c: Clear terminal display
alias which='type -all' # which: Find executables
alias path='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
alias show_options='shopt' # Show_options: display bash options settings
alias fix_stty='stty sane' # fix_stty: Restore terminal settings when screwed up
alias cic='set completion-ignore-case On' # cic: Make tab-completion case-insensitive
mcd () { mkdir -p "$1" && cd "$1"; } # mcd: Makes new Dir and jumps inside
trash () { command mv "$@" ~/.Trash ; } # trash: Moves a file to the MacOS trash
ql () { qlmanage -p "$*" >& /dev/null; } # ql: Opens any file in MacOS Quicklook Preview
alias DT='tee ~/Desktop/terminalOut.txt' # DT: Pipe content to file on MacOS Desktop
alias vi='vim'
alias vpnstop='sudo launchctl stop com.apple.racoon'
alias vpnstart='sudo launchctl start com.apple.racoon'
alias rsync='rsync -P'
# ----------------------
# Maven Aliases
# ----------------------
alias mi='mvn -PautoInstallPackage install'
alias mci='mvn -PautoInstallPackage clean install'
alias mib='cd brand.core && mvn clean install -PautoInstallBundle && ..' # from LPM root
# ----------------------
# Git Aliases
# ----------------------
alias ga='git add -A'
alias gcm='git commit -m '
alias gp='git push'
alias go='git checkout '
alias gob='git checkout -b '
alias gdb='git branch -D '
alias gs='git status'
alias gst='git stash'
alias gb='git branch'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias nom='rm -rf node_modules && npm install'
#alias bom='rm -rf bower_components && bower cache clean && bower install'
#alias nombom='nom && bom'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment