Skip to content

Instantly share code, notes, and snippets.

@colinhoernig
Forked from stkrzysiak/mac-configure.sh
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinhoernig/f9d5780f1cbb88899de6 to your computer and use it in GitHub Desktop.
Save colinhoernig/f9d5780f1cbb88899de6 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Source http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# Worth looking at for dotfile stuff: http://dotfiles.github.io/
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Zshell
brew install zsh
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
brew install homebrew/dupes/awk
brew install homebrew/dupes/rsync
brew install homebrew/dupes/gdb
#update path to use homebrew binaries over mac ones
$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
binaries=(
python
node
ack
git
vim
the_silver_searcher
)
echo "installing binaries..."
brew install ${binaries[@]}
brew cleanup
brew install caskroom/cask/brew-cask
# Apps
apps=(
alfred
dropbox
electric-sheep
firefox
flash
google-chrome
iterm2
jumpcut
vagrant
sublime-text3
virtualbox
flux
tower
vlc
skype
transmission
macvim
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps..."
brew cask install --appdir="/Applications" ${apps[@]}
#access beta versions when needed
brew tap caskroom/versions
#use cask apps over the mac apps
brew cask alfred link
#install oh my zshell
curl -L http://install.ohmyz.sh | sh
#install janus dot files for vim and variants
curl -Lo- https://bit.ly/janus-bootstrap | bash
git config --global core.editor /usr/bin/vim
#add some stuff to .bash_profile
cat <<EOT >> ~/.bash_profile
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
HISTTIMEFORMAT='%F %T '
HISTSIZE=1000000000
alias gco='git co'
alias gci='git ci'
alias grb='git rb'
EOT
# Pull in aliases from alias.sh
curl -s https://alias.sh/user/293/alias >> ~/.bash_aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment