-
Notifications
You must be signed in to change notification settings - Fork 13
MacOS: New Machine
Roy Segall edited this page Jan 10, 2017
·
2 revisions
MacOS comes with PHP version 5.5 installed. So, first you need to use PHP version 5.6. We'll use MAMP version:
sudo ln -s /Applications/MAMP/bin/php/php5.6.10/bin/php /usr/local/bin/php
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
https://drive.google.com/file/d/0B_6QRgJK078kVjZpU1d3YTIwZzg/view?usp=sharing
# Easier navigation: .., ..., ~ and -.
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# mv, rm, cp.
alias mv='mv -v'
alias rm='rm -i -v'
alias cp='cp -v'
###
# GIT STUFF
###
# git root.
alias master="git checkout master"
# Recursively delete `.DS_Store` files.
alias cleanup_dsstore="find . -name '*.DS_Store' -type f -ls -delete"
alias wget="curl -O"
# Shortcuts.
alias g="git"
# Implement git up.
alias git up="git config --global alias.up 'pull --rebase --autostash'"
###
# DEV TOOLS
###
# Update Ruby gems, Homebrew, and npm.
alias update_dev_tools="brew -v update;brew cleanup;brew prune;npm install npm -g;npm update -g;sudo gem update --system;sudo gem update --no-document;"
###
# PYTHON
###
# Python3 should be the default by now.
alias python="python3"
##.bash_profile
###
# Completion…
###
if [[ -n "$ZSH_VERSION" ]]; then # quit now if in zsh
return 1 2> /dev/null || exit 1;
fi;
# bash completion.
if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
source "$(brew --prefix)/share/bash-completion/bash_completion";
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion;
fi;
# homebrew completion
if which brew > /dev/null; then
source "$(brew --prefix)/etc/bash_completion.d/brew"
fi;
# Enable tab completion for `g` by marking it as an alias for `git`
if type __git_complete &> /dev/null; then
__git_complete g __git_main
fi;
# Essential..
xcode-select --install
# First install brew - we can't do anything in this world without a package manager.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Now, let's save you some serious time.
# install latest git.
brew install git
# Install the latest Ruby.
brew install ruby
# Install the latest rubygems.
# Install latest Jekyll.
sudo gem install jekyll
# Install latest SASS.
sudo gem install sass
# Install Tree - you need it, I know..
brew install tree
# Install ZSH and zsh completions.
brew install zsh zsh-completions
# Install thefuck.
brew install thefuck
# Update git to the latest version.
brew install git
# Install `gulp` command.
npm install -g gulp