[
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 Aerolab\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Aerolab Setup\n\nThis will install the most popular tools and tweaks we use at Aerolab\n\nOpen Terminal, type this and press enter:\n\n```shell\n/usr/bin/python -c \"$(curl -fsSL https://raw.githubusercontent.com/Aerolab/setup/master/setup.py)\"\n```\n\nFollow the instructions and that's it :D\n\n### Software:\n\n* Brew & Brew Cask with AutoUpdate\n* Node.js, Ruby, Python, Bower, Gulp, Grunt and Git\n* Atom, Sublime Text 3 & Package Control and VIM\n* A bunch of Fonts, including our beloved Dosis\n* Essential Quicklook plugins (so you can view code, zip contents and other things)\n* Essential Software, including Chrome, iTerm2, Dropbox, Slack, Sublime, and a few more.\n* A lot of OSX tweaks, like disabling the annoying Mac startup sound\n\n### Options\n\n* *Developer Tools*: Docker Toolbox, Sequel Pro, Cyberduck, ngrok\n* *Android Tools*: Java, Android Studio\n* *iOS Tools*: Cocoapods\n* *Web Developer Tools*: Imageoptim\n* *Designer Tools*: Invision Sync, Scala Preview\n* *Sublime Text 3*: Emmet, Markdown, SASS, Linters, Git, Material Theme and other packages.\n* *Oh My Zsh*: Zsh, but better. Also includes an iTerm2 Theme and Powerline Fonts.\n* *Animations*: Makes all the Finder animations (Spaces, Exposé, Resizing) much faster.\n\n### Mac App Store Tools\n\n* You can install mas by typing **brew install mas**, which lets you install App Store apps via the command line.\n* *The Basics*: [Keynote](https://itunes.apple.com/en/app/keynote/id409183694), [Numbers](https://itunes.apple.com/en/app/numbers/id409203825), [Pages](https://itunes.apple.com/en/app/pages/id409201541)\n"
  },
  {
    "path": "setup.py",
    "content": "#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python\n# -*- coding: utf-8 -*-\n\nimport os\nimport json\nimport urllib2\nimport subprocess\n\nname = ''\nemail = ''\noptions = { 'developer': '', 'android': '', 'ios': '', 'designer': '',\n            'vim': '', 'zsh': '',\n            'animations': '', 'showhiddenfiles': '', 'autoupdate': '', }\n\n\n# Check if Xcode Command Line Tools are installed\nif os.system('xcode-select -p') != 0:\n  print \"Installing XCode Tools\"\n  os.system('xcode-select --install')\n  os.system('softwareupdate --install-rosetta --agree-to-license')\n  print \"**************************************************************\"\n  print \"Install the XCode Command Line Tools and run this script again\"\n  print \"**************************************************************\"\n  exit()\n\n# Accept XCode License\n# os.system('sudo xcodebuild -license accept')\n\n# Sudo: Spectacle, ZSH, OSX Settings\nprint \"\\n\\nWelcome... TO THE WORLD OF TOMORROW\\n\"\n\n# Basic Info\nwhile name == '':\n  name = raw_input(\"What's your name?\\n\").strip()\n\nwhile email == '' or '@' not in email:\n  email = raw_input(\"What's your work email?\\n\").strip()\n\n\n# Setup Options\nwhile options['designer'] not in ['y', 'n']:\n  options['designer'] = raw_input(\"Do you want to install Designer Tools? (y|n) [y]  \") or \"y\"\n\nwhile options['developer'] not in ['y', 'n']:\n  options['developer'] = raw_input(\"Do you want to install Developer Tools? (y|n) [y]  \") or \"y\"\n\nif options['developer'] == 'y':\n  while options['android'] not in ['y', 'n']:\n    options['android'] = raw_input(\"Do you want to install Android Tools? (y|n) [n]  \") or \"n\"\n\n  while options['ios'] not in ['y', 'n']:\n    options['ios'] = raw_input(\"Do you want to install iOS Tools? (y|n) [n]  \") or \"n\"\n\n\n# Other Options\nwhile options['vim'] not in ['y', 'n']:\n  options['vim'] = raw_input(\"Do you want to install VIM with Awesome VIM? (y|n) [y]  \") or \"y\"\n\nwhile options['zsh'] not in ['y', 'n']:\n  options['zsh'] = raw_input(\"Do you want to install Oh My Zsh? (y|n) [y]  \") or \"y\"\n\nwhile options['animations'] not in ['y', 'n']:\n  options['animations'] = raw_input(\"Do you want to accelerate OSX animations? (y|n) [y]  \") or \"y\"\n\nwhile options['showhiddenfiles'] not in ['y', 'n']:\n  options['showhiddenfiles'] = raw_input(\"Do you want to show hidden files? (y|n) [y]  \") or \"y\"\n\nwhile options['autoupdate'] not in ['y', 'n']:\n  options['autoupdate'] = raw_input(\"Do you want to update your computer automatically? (y|n) [y]  \") or \"y\"\n\n\ndef show_notification(text):\n  os.system('osascript -e \\'display notification \"'+ text +'\" with title \"Mac Setup\"\\' > /dev/null')\n\n\nprint \"Hi %s!\" % name\nprint \"You'll be asked for your password at a few points in the process\"\nprint \"*************************************\"\nprint \"Setting up your Mac...\"\nprint \"*************************************\"\n\n\n# Create a Private Key\nif not os.path.isfile(os.path.expanduser(\"~\") + '/.ssh/id_rsa.pub') :\n  print \"Creating your Private Key\"\n  os.system('ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N \"\" -C \"%s\"' % email)\n\n\n# Set computer name & git info (as done via System Preferences → Sharing)\nos.system('sudo scutil --set ComputerName \"%s\"' % name)\nos.system('sudo scutil --set HostName \"%s\"' % name)\nos.system('sudo scutil --set LocalHostName \"%s\"' % name.replace(' ', '-')) # Doesn't support spaces\nos.system('sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string \"%s\"' % name)\nos.system('git config --global user.name \"%s\"' % name)\nos.system('git config --global user.email \"%s\"' % email)\n\n# Install Brew & Brew Cask\nprint \"Installing Brew & Brew Cask\"\nos.system('touch ~/.bash_profile')\nos.system('/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"')\nos.system('brew tap homebrew/cask-versions')\nos.system('brew tap homebrew/cask-fonts')\nos.system('brew update && brew upgrade && brew cleanup')\n\n\n# Install Languages\nprint \"Installing Git+NodeJS\"\nos.system('brew install git node')\nos.system('brew link --overwrite git node')\nos.system('brew install git-flow git-lfs svn') # For some reason most fonts require SVN\nos.system('git lfs install')\n\nprint \"Installing Useful Stuff\"\nos.system('brew install graphicsmagick curl wget sqlite libpng libxml2 openssl')\n\nprint \"Installing Command Line Tools\"\nos.system('npm install -g node-gyp serve yarn')\n\n# OSX Tweaks & Essentials\nprint \"Installing Quicklook Helpers\"\nos.system('brew install qlcolorcode qlstephen qlmarkdown quicklook-csv quicklook-json qlimagesize webpquicklook suspicious-package qlprettypatch quicklookase qlvideo')\n# Permissions Fix for macOS Catalina\nos.system('xattr -d -r com.apple.quarantine ~/Library/QuickLook')\n\nprint \"Installing Essential Apps\"\nos.system('brew install iterm2 the-unarchiver rectangle google-chrome visual-studio-code spotify slack discord')\n\nprint \"Installing Fonts\"\nos.system('brew install font-dosis font-droid-sans-mono-for-powerline font-open-sans font-roboto font-roboto-mono font-roboto-slab font-consolas-for-powerline font-inconsolata font-inconsolata-for-powerline font-lato font-menlo-for-powerline font-meslo-lg font-meslo-for-powerline font-noto-sans font-noto-serif font-source-sans-pro font-source-serif-pro font-ubuntu font-pt-mono font-pt-sans font-pt-serif font-fira-mono font-fira-mono-for-powerline font-fira-code font-fira-sans font-source-code-pro font-hack font-anka-coder font-jetbrains-mono')\n\n# Appropriate Software\nif options['developer'] == 'y':\n  print \"Installing Developer Tools\"\n  os.system('brew install --cask docker')\n  os.system('brew install sequel-pro postman imageoptim imagealpha xnconvert')\n  os.system('curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash')\n            \nif options['android'] == 'y':\n  print \"Installing Android Tools\"\n  os.system('brew fetch java')\n  show_notification(\"We need your password\")\n  os.system('brew install java')\n  os.system('brew install android-studio')\n  os.system('brew install android-platform-tools')\n\nif options['ios'] == 'y':\n  print \"Installing iOS Tools\"\n  show_notification(\"We need your password\")\n  os.system('sudo gem install cocoapods')\n  show_notification(\"We need your password\")\n  os.system('sudo gem install fastlane --verbose')\n  \nif options['designer'] == 'y':\n  print \"Installing Designer Tools\"\n  os.system('brew install figma')\n\nif options['vim'] == 'y':\n  print \"Installing VIM + Awesome VIM\"\n\n  os.system('brew install vim')\n  os.system('git clone https://github.com/amix/vimrc.git ~/.vim_runtime')\n  os.system('sh ~/.vim_runtime/install_awesome_vimrc.sh')\n\n# Oh-My-ZSH. Dracula Theme for iTerm2 needs to be installed manually\nif options['zsh'] == 'y':\n  print \"Installing Oh-My-Zsh with Dracula Theme\"\n  show_notification(\"We need your password\")\n\n  # Setup Adapted from https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh\n  if os.system('test -d ~/.oh-my-zsh') != 0:\n    os.system('umask g-w,o-w && git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh')\n  if os.system('test -f ~/.zshrc') != 0:\n    os.system('cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc')\n\n  # If the user has the default .zshrc tune it a bit\n  if (subprocess.call(['bash', '-c', 'diff <(tail -n +6 ~/.zshrc) <(tail -n +6  ~/.oh-my-zsh/templates/zshrc.zsh-template) > /dev/null']) == 0):\n            \n    # Plugins\n    os.system('brew install zsh-autosuggestions zsh-syntax-highlighting bat tldr tree')\n    os.system('echo \"source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh\" >> ~/.zshrc');\n    os.system('echo \"source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh\" >> ~/.zshrc');\n    os.system('sed -i -e \\'s/plugins=(git)/plugins=(git brew node npm docker colored-man-pages copypath copyfile extract)/g\\' ~/.zshrc &> /dev/null')\n\n    # Agnoster Theme\n    os.system('sed -i -e \\'s/robbyrussell/agnoster/g\\' ~/.zshrc &> /dev/null')\n\n    # Customizations\n    os.system('echo \"alias dog=\\'bat\\'\" >> ~/.zshrc')\n    # Don't show the user in the prompt\n    os.system('echo \"DEFAULT_USER=\\`whoami\\`\" >> ~/.zshrc')\n\n    os.system('echo \"export NVM_DIR=\\\"\\$HOME/.nvm\\\"\\n[ -s \\\"\\$NVM_DIR/nvm.sh\\\" ] && . \\\"\\$NVM_DIR/nvm.sh\\\" # This loads nvm\" >> ~/.zshrc')\n\n  # Remove the 'last login' message\n  os.system('touch ~/.hushlogin')\n\n  os.system('git clone https://github.com/dracula/iterm.git ~/Desktop/dracula-theme/')\n\n\n# Random OSX Settings\nprint \"Tweaking OSX Settings\"\n\nif options['showhiddenfiles'] == 'y':\n  # Finder: show hidden files by default\n  os.system('defaults write com.apple.finder AppleShowAllFiles -bool true')\n  # Finder: show all filename extensions\n  os.system('defaults write NSGlobalDomain AppleShowAllExtensions -bool true')\n\n\n# Finder: allow text selection in Quick Look\nos.system('defaults write com.apple.finder QLEnableTextSelection -bool true')\n# Check for software updates daily\nos.system('defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1')\n# Disable auto-correct\n#os.system('defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false')\n# Require password immediately after sleep or screen saver begins\nos.system('defaults write com.apple.screensaver askForPassword -int 1')\nos.system('defaults write com.apple.screensaver askForPasswordDelay -int 0')\n# Show the ~/Library folder\nos.system('chflags nohidden ~/Library')\n# Don’t automatically rearrange Spaces based on most recent use\nos.system('defaults write com.apple.dock mru-spaces -bool false')\n# Prevent Time Machine from prompting to use new hard drives as backup volume\nos.system('defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true')\n\n\nif options['animations'] == 'y':\n  print \"Tweaking System Animations\"\n  os.system('defaults write NSGlobalDomain NSWindowResizeTime -float 0.1')\n  os.system('defaults write com.apple.dock expose-animation-duration -float 0.15')\n  os.system('defaults write com.apple.dock autohide-delay -float 0')\n  os.system('defaults write com.apple.dock autohide-time-modifier -float 0.3')\n  os.system('defaults write NSGlobalDomain com.apple.springing.delay -float 0.5')\n  os.system('killall Dock')\n\n\nif options['autoupdate'] == 'y':\n  print \"Enabling Automatic Brew Updates & Upgrades\"\n  os.system('brew tap homebrew/autoupdate')\n  os.system('brew autoupdate start --upgrade')\n\n\n# Make Google Chrome the default browser\nos.system('open -a \"Google Chrome\" --args --make-default-browser')\n\n# Open Rectangle (Needs to be enabled manually)\nos.system('open -a \"Rectangle\"')\n\n# Clean Up\nos.system('brew cleanup')\n\n\n# Mute startup sound\nshow_notification(\"We need your password\")\nos.system('sudo nvram SystemAudioVolume=%00')\n\n\nprint \"\"\nprint \"\"\nprint \"*************************************\"\nprint \"Enabling FileVault\"\nos.system('sudo fdesetup enable')\nprint \"\"\n\nprint \"*************************************\"\nprint \"Your SSH Public Key Is:\"\nwith open(os.path.expanduser(\"~\") + '/.ssh/id_rsa.pub', 'r') as f:\n  print f.read()\nprint \"\"\n\nif options['zsh'] == 'y':\n  print \"*************************************\"\n  print \"Remember to set up iTerm2:\"\n  print \"* Go to iTerm2 > Preferences > Profiles > Colors Tab\"\n  print \"  * Load Presets...\"\n  print \"  * Import...\"\n  print \"  * Pick Desktop > dracula-theme > iterm > Dracula.itermcolors\"\n  print \"* Go to iTerm2 > Preferences > Profiles > Text Tab\"\n  print \"  * Regular Font\"\n  print \"  * 12pt Menlo for Powerline Font\"\n  print \"\"\n\nprint \"*************************************\"\nprint \"Remember to restart your Mac\"\nprint \"*************************************\"\n\nshow_notification(\"All done! Enjoy your new macOS!\")\n\n  \n# Change the shell if necessary\nif options['zsh'] == 'y':\n  os.system('chsh -s /bin/zsh &> /dev/null')\n"
  }
]