Skip to content

Instantly share code, notes, and snippets.

@grandadmiral-thrawn
Created August 1, 2017 10:10
Show Gist options
  • Save grandadmiral-thrawn/93f848ff3951b1aab3a6f9e897c72cc1 to your computer and use it in GitHub Desktop.
Save grandadmiral-thrawn/93f848ff3951b1aab3a6f9e897c72cc1 to your computer and use it in GitHub Desktop.
install tools for a new mac
#!/usr/bin/sh
# scripts here are from http://blog.coldflake.com/posts/Minimal-Development-Setup-for-Mac-OS/#useful-apps. Find this to be a good setup for all.
# install brew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install cask (makes apps of some brew)
brew install caskroom/cask/brew-cask
# install dropbox for shared setting and files. create directory struct to help
brew cask install --appdir="/Applications" dropbox;
mkdir Dropbox;
cd Dropbox;
mkdir dotfiles;
cd dotfiles;
touch .bashrc_commons;
cd ~;
# app launcher
brew cask install --appdir="/Applications" quicksilver;
# text editior
brew install vim --with-luajit;
# enable sharing of configurations, here as .bashrc_common, create if not exist
if [ -f ~/.bashrc_commons ]; then
. ~/.bashrc_commons
fi
# configuration settings to share across dropbox with other apps
cd Dropbox/dotfiles;
> ~/.bashrc_commons->.bashrc_common;
cd ~;
# install command line util
utilities=( git astyle cmake colordiff ctags htop luajit luarocks mercurial \
node p7zip picocom the_silver_searcher tig tree unrar watch wget z fzf tmux )
brew install ${utilities[@]}
brew cleanup;
# install apps
apps=( wireshark hex-fiend google-chrome qlcolorcode qlmarkdown qlstephen \
quicklook-json boot2docker virtualbox omnidisksweeper vlc )
brew cask install ${apps[@]}
brew cask cleanup;
# set up your node env
brew install node;
brew install npm;
brew install nvm;
# set up dbs
brew install sqllite3;
brew install postgres;
brew install mongod;
# apple likes ruby -- may want to use a newer version
brew install rbenv ruby-build;
eval "$(rbenv init -)";
rbenv rehash;
rbenv install 2.2.0
rbenv rehash
rbenv global 2.2.0
# keep it fast
tmp > echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
# may need to chmod + x on some
# develop good config files for editor
source ~/.vim/_vimrc_universal
source ~/.vim/_vimrc_mac
# turn off caps for input
touch ~/.inputrc
cat "set completion-ignore-case on">.inputrc;
# git config -- change name and email as youlike
git config --global push.default current
git config --global core.excludesfile ~/.gitignore
git config --global user.name "myname"
git config --global user.email myname@gmail.com
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
git config --global core.editor "vim"
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# may consider to use this to complete configuration of git from pre-existing
# https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment