Skip to content

Instantly share code, notes, and snippets.

@michaelrkn
Last active April 6, 2019 16:29
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 michaelrkn/5863251 to your computer and use it in GitHub Desktop.
Save michaelrkn/5863251 to your computer and use it in GitHub Desktop.
to do: figure out how to clear databases and files nightly; make everybody save their code in a code folder or something, and don't let them write to other folders (except .gem, homebrew, etc)
# run this block as root to avoid typing password
sudo rm -rf /Applications/GarageBand.app/ /Applications/iMovie.app/ /Applications/iPhoto.app/ /User\ Information
mkdir /usr/local
curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
sudo chown -R epicodus /usr/local
xcode-select --install
# manually click to start command line tools install, then run everything else as current user
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
brew install git
echo ".DS_Store" > ~/.gitignore_global
git config --global color.ui true
git config --global user.email student@epicodus.com
git config --global core.excludesfile ~/.gitignore_global
chflags uchg ~/.gitconfig
chflags uchg ~/Library/Keychains/login.keychain
mkdir ~/.git
chflags uchg ~/.git
git clone https://github.com/epicodus/pre-commit /usr/local/share/git-core/templates/hooks/
chmod 755 /usr/local/share/git-core/templates/hooks/pre-commit
brew install heroku-toolbelt
brew install postgres
echo "export PGDATA=/usr/local/var/postgres" >> ~/.bash_profile
source ~/.bash_profile
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
createdb $USER
brew install chruby
echo 'source /usr/local/opt/chruby/share/chruby/chruby.sh' >> ~/.bash_profile
echo 'source /usr/local/opt/chruby/share/chruby/auto.sh' >> ~/.bash_profile
brew install ruby-install
ruby-install ruby 2.1
rm -rf ~/src/
echo "ruby-2.1" > ~/.ruby-version
source ~/.bash_profile
chruby 2.1
echo "gem: --no-rdoc --no-ri" > ~/.gemrc
echo "-d postgresql -T" > ~/.railsrc
echo "--color" > ~/.rspec
gem install rubygems-bundler
gem regenerate_binstubs
gem install simple-git-pair
git pair init
curl -L https://atom.io/download/mac > ~/Downloads/atom-mac.zip
unzip ~/Downloads/atom-mac.zip -d ~/Downloads/
mv ~/Downloads/Atom.app/ /Applications/Atom.app/
rm ~/Downloads/atom-mac.zip
echo "export EDITOR='atom -nw'" >> ~/.bash_profile
curl https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg > ~/Downloads/googlechrome.dmg
hdiutil attach ~/Downloads/googlechrome.dmg
cp -r /Volumes/Google\ Chrome/Google\ Chrome.app/ /Applications/Google\ Chrome.app
hdiutil detach /Volumes/Google\ Chrome
rm ~/Downloads/googlechrome.dmg
mkdir ~/Code
defaults delete com.apple.dock persistent-apps
defaults delete com.apple.dock persistent-others
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Utilities/Terminal.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Atom.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Google Chrome.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
defaults write com.apple.dock persistent-others -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Users/$USR/Downloads</string><key>_CFURLStringType</key><integer>0</integer></dict><key>file-label</key><string>Downloads</string><key>file-type</key><integer>18</integer></dict><key>tile-type</key><string>directory-tile</string></dict>"
defaults delete com.apple.dock mod-count
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain AppleKeybaordUIMode -int 2
defaults write NSGlobalDomain com.apple.sound.beep.feedback -int 0
defaults write com.apple.systemsound com.apple.sound.beep.volume -int 0
defaults write com.apple.systemsound com.apple.sound.uiaudio.enabled -int 0
defaults write com.apple.driver.AppleHIDMouse.plist Button2 -int 2
defaults write com.apple.finder FXArrangeGroupViewBy -string Name
defaults write com.apple.finder NewWindowTargetPath -string file:///Users/epicodus/
defaults write com.apple.finder ShowRemovableMediaOnDesktop -boolean false
defaults write com.apple.finder ShowRecentTags -boolean false
defaults write com.apple.finder NewWindowTarget -string PfHm
defaults write com.apple.finder ShowHardDrivesOnDesktop -boolean false
# system preferences:
# security: disable password protection, disable disable automatic login, allow applications from anywhere, enable firewall
# sound: set output and alert volume to 0, disable sound effects and feedback
# sharing: change machine name
# lock system preferences so people can't change it
# add Terminal, Chrome, Atom to Dock
# set Chrome default zoom 150% - figure out how to do with ~/Library/Application\ Support/Google/Chrome/Default/Preferences
# set Terminal font size 18px - figure out how to do with com.apple.Terminal.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment