Last active
April 8, 2020 00:14
-
-
Save sbehrends/b84ebab44c8c47e22f2a6ef62cea6cbb to your computer and use it in GitHub Desktop.
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
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python | |
# Frok from https://github.com/Aerolab/setup/blob/master/setup.py | |
# -*- coding: utf-8 -*- | |
import os | |
import json | |
import urllib2 | |
name = '' | |
email = '' | |
# Basic Info | |
while name == '': | |
name = raw_input("What's your name?\n").strip() | |
while email == '' or '@' not in email: | |
email = raw_input("What's your email?\n").strip() | |
print "Hi %s!" % name | |
print "You'll be asked for your password at a few points in the process" | |
print "*************************************" | |
print "Setting up your Mac..." | |
print "*************************************" | |
# Create a Private Key | |
if not os.path.isfile(os.path.expanduser("~") + '/.ssh/id_rsa.pub'): | |
print "Creating your Private Key" | |
os.system('ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" -C "%s"' % email) | |
# Check if Xcode Command Line Tools are installed | |
if os.system('xcode-select -p') != 0: | |
print "Installing XCode Tools" | |
os.system('xcode-select --install') | |
print "*************************************" | |
print "Restart your Mac to continue" | |
print "*************************************" | |
exit() | |
# Install Brew & Brew Cask | |
print "Installing Brew & Brew Cask" | |
os.system('/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"') | |
os.system('brew tap homebrew/services') | |
os.system('brew update && brew upgrade && brew cleanup') | |
os.system('brew cask install iterm2 spectacle the-unarchiver') | |
os.system('brew cask install firefox sublime-text visual-studio-code spotify slack typora postman keybase itsycal') | |
os.system('brew cask install sequel-pro cyberduck docker appgate-sdp-client tableplus') | |
# Ignore Docker files in Spotlight Index | |
os.system('touch ~/Library/Containers/com.docker.docker/Data/.metadata_never_index') | |
# Disable auto-correct | |
#os.system('defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false') | |
# Require password immediately after sleep or screen saver begins | |
os.system('defaults write com.apple.screensaver askForPassword -int 1') | |
os.system('defaults write com.apple.screensaver askForPasswordDelay -int 0') | |
# Show the ~/Library folder | |
os.system('chflags nohidden ~/Library') | |
# Prevent Time Machine from prompting to use new hard drives as backup volume | |
os.system('defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true') | |
# Mute startup sound | |
os.system('sudo nvram SystemAudioVolume=", "') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment