Last active
August 29, 2015 14:21
-
-
Save jm66/82ca862ffe80323cf3ee to your computer and use it in GitHub Desktop.
OSX-Yosemite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# prefix for backups | |
_today=$(date +"%m-%d-%Y") | |
_computer_name="tatooine" | |
# Generate a ssh keypair | |
ssh-keygen -t rsa -b 4096 | |
# Requesting Sudo Access from Start | |
sudo -v | |
echo "Updating computer name to ${_computer_name}" | |
sudo scutil --set ComputerName ${_computer_name} | |
sudo scutil --set HostName ${_computer_name} | |
sudo scutil --set LocalHostName ${_computer_name} | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string | |
echo "Check for software updates daily, not just once per week" | |
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 | |
echo "Backing up SSH_config and appending client keepalive" | |
sudo cp /etc/ssh_config /etc/ssh_config_${_today} | |
sudo echo "ServerAliveInterval 60" >> /etc/ssh_config | |
echo "disable copy/pasting the formatting from Terminal" | |
sudo defaults write com.apple.Terminal CopyAttributesProfile com.apple.Terminal.no-attributes | |
echo "Requiring password immediately after sleep or screen saver begins" | |
defaults write com.apple.screensaver askForPassword -int 1 | |
defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
echo "Show hidden files in Finder by default" | |
defaults write com.apple.Finder AppleShowAllFiles -bool true | |
echo "Show dotfiles in Finder by default" | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
echo "Disable the warning when changing a file extension" | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
echo "Avoid creation of .DS_Store files on network volumes" | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
echo "Privacy: Don’t send search queries to Apple" | |
defaults write com.apple.Safari UniversalSearchEnabled -bool false | |
defaults write com.apple.Safari SuppressSearchSuggestions -bool true | |
echo "Setting email addresses to copy as '[email protected]' instead of 'Foo Bar <[email protected]>' in Mail.app" | |
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false | |
echo "Enabling UTF-8 ONLY in Terminal.app and setting the Pro theme by default" | |
defaults write com.apple.terminal StringEncodings -array 4 | |
defaults write com.apple.Terminal "Default Window Settings" -string "Homebrew" | |
defaults write com.apple.Terminal "Startup Window Settings" -string "Homebrew" | |
echo "Disable continuous spell checking in Messages.app" | |
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false | |
echo "Install xcode" | |
sudo xcode-select --install | |
echo "Accepting license" | |
sudo xcodebuild -license | |
echo "Install Home Brew" | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
brew cleanup | |
brew update | |
echo "install GNU packages" | |
gnu=( | |
coreutils | |
binutils | |
gawk | |
) | |
brew install ${gnu[@]} | |
echo "install additional packages" | |
additional=( | |
tree | |
webkit2png | |
graphicsmagick | |
git | |
python | |
python3 | |
watch | |
wget | |
automake | |
autoconf | |
htop | |
jpegoptim | |
imagemagick | |
) | |
brew install ${additional[@]} | |
echo "install additional packages with custom settings" | |
brew install vim --override-system-vi | |
brew install macvim --override-system-vim --custom-system-icons | |
brew install gnu-which --default-names | |
brew install gnutls --default-names | |
brew install grep --default-names | |
brew install wdiff --with-gettext | |
echo "Install Applications" | |
brew tap caskroom/versions | |
apps=( | |
xquartz | |
dropbox | |
google-chrome | |
qlcolorcode | |
firefox | |
spotify | |
vagrant | |
flash | |
iterm2 | |
shiori | |
sublime-text3 | |
virtualbox | |
flux | |
vlc | |
cloudup | |
quicklook-json | |
skype | |
osxfuse | |
) | |
brew cask install --appdir="/Applications" ${apps[@]} | |
# based on: | |
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac | |
# - https://gist.github.com/brandonb927/3195465 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment