Last active
August 29, 2015 14:06
-
-
Save jphase/0c879a3263297006ed8e to your computer and use it in GitHub Desktop.
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
# Bash shortcuts | |
alias ll='ls -al -G $@' | |
alias ls='ls -G $@' | |
alias grep='grep --colour $@' | |
# Git shortcuts | |
alias gitclean='git diff --diff-filter=D --name-only -z | xargs -0 git rm' | |
# Application shortcuts (based on a mac install of Sublime Text) | |
alias sublime='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $1' | |
# Service shortcuts (based on a local mac nginx/mariadb/php-fpm setup) | |
alias nginxrestart='launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist' | |
alias nginxstart='launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist' | |
alias nginxstop='launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist' | |
alias phprestart='launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist' | |
alias phpstart='launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist' | |
alias phpstop='launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist' | |
alias mysqlrestart='mysql.server restart' | |
alias mysqlstart='mysql.server start' | |
alias mysqlstop='mysql.server stop' | |
# WordPress CLI (requires .wp-completions.bash to be in home dir) | |
source ~/.wp-completions.bash | |
# Show git branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# Colors and path stuffs | |
export PS1="\[\033[00m\]\u@\h\[\033[01;33m\] \w \[\033[31m\]\$(parse_git_branch)\[\033[00m\]$\[\033[00m\] " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
export PATH=$PATH:/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment