Skip to content

Instantly share code, notes, and snippets.

@bencooling
Last active October 12, 2015 17:58
Show Gist options
  • Save bencooling/4065342 to your computer and use it in GitHub Desktop.
Save bencooling/4065342 to your computer and use it in GitHub Desktop.
Bash: mac osx configuration files
# Ben Cooling's mac osx bash profile
#---------------------------------
# Environment Variables
#---------------------------------
export PS1="\h \w:"
export NOW=$(date +"%Y-%m-%d")
export EDITOR="subl -w"
export PATH="$PATH:$HOME/bin"
export SHARE="/usr/share/php/var"
# Aliases
#---------------------------------
# Includes:
# - Changing to common nginx & local webserver directories,
# - manually start | stopping php-fpm,
# - opening deep, obsecure paths in Finder
alias open-packages="open $HOME/Library/Application\ Support/Sublime\ Text\ 2/Packages"
alias sandbox.dev="cd $HOME/Sites/sandbox/"
alias wordpress.dev="cd $HOME/Sites/wordpress/current"
alias wordpress.plugins="cd $HOME/Sites/wordpress/plugins"
alias nginx-log="cd $SHARE/log"
alias nginx-session="cd $SHARE/session"
alias nginx-run="cd $SHARE/run/"
alias nginx-webroot="cd $HOME/Sites/nginx-web-root"
alias phpfpm-start="sudo $(brew --prefix josegonzalez/php/php55)/sbin/php-fpm"
alias phpfpm-stop="sudo kill $(cat $SHARE/run/php-fpm.pid)"
# Homebrew-related
#---------------------------------
#php
#export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH" #apache (PHP 5.4)
export PATH="$(brew --prefix josegonzalez/php/php53)/bin:$PATH" #nginx (PHP 5.5)
#ruby
export PATH="$(brew --prefix ruby)/bin:$PATH"
#npm
export PATH="$(brew --prefix npm)/bin:$PATH"
export NODE_PATH="/usr/local/lib/node"
#brew
export PATH="$(brew --prefix)/bin:$PATH"
# Supress Warning: Homebrew's sbin was not found in your path. Consider amending your PATH variable so it contains
export PATH="/usr/local/sbin:$PATH"
# Common Variables
# -------------------------
DIR="$( cd "$( dirname "$0" )" && pwd )" # Full path where script has been executed in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment