Last active
December 10, 2015 19:18
-
-
Save hubertperron/4480399 to your computer and use it in GitHub Desktop.
OS X Symfony2 developer tools install script
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
#!/bin/bash | |
# Ask for the administrator password upfront | |
sudo -v | |
### System preferences ### | |
# source: | |
# ~/.osx — http://mths.be/osx | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Enable access for assistive devices (required by HyperDock) | |
echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1 | |
sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled | |
# Enable full keyboard access for all controls | |
# (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Disable “natural” (Lion-style) scrolling | |
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
# Use scroll gesture with the Ctrl (^) modifier key to zoom | |
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true | |
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 | |
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true | |
# Disable press-and-hold for keys in favor of key repeat | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# Disable auto-correct | |
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
# Set language and text formats | |
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with | |
# `Inches`, and `true` with `false`. | |
defaults write NSGlobalDomain AppleLanguages -array "en" "fr" | |
defaults write NSGlobalDomain AppleLocale -string "en_CA@currency=CAD" | |
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" | |
defaults write NSGlobalDomain AppleMetricUnits -bool true | |
# Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
# Finder: show all filename extensions | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# Finder: show status bar | |
defaults write com.apple.finder ShowStatusBar -bool true | |
# Finder: allow text selection in Quick Look | |
defaults write com.apple.finder QLEnableTextSelection -bool true | |
# Display full POSIX path as Finder window title | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
# When performing a search, search the current folder by default | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
# Safari: allow hitting the Backspace key to go to the previous page in history | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true | |
# Enable the Develop menu and the Web Inspector in Safari | |
defaults write com.apple.Safari IncludeDevelopMenu -bool true | |
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true | |
# Add a context menu item for showing the Web Inspector in web views | |
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true | |
# Use a modified version of the Pro theme by default in Terminal.app | |
open "$HOME/init/Hubert.terminal" | |
sleep 1 # Wait a bit to make sure the theme is loaded | |
defaults write com.apple.terminal "Default Window Settings" -string "Hubert" | |
defaults write com.apple.terminal "Startup Window Settings" -string "Hubert" | |
### Applications ### | |
# Installing PhpStorm | |
curl -L -o PhpStorm.dmg 'http://download.jetbrains.com/webide/PhpStorm-5.0.4.dmg' | |
MOUNT_PATH=$(hdiutil mount PhpStorm.dmg | tail -1 | sed 's/.*Apple_HFS//g' | xargs) | |
cp -R "$MOUNT_PATH/PhpStorm.app" ~/Applications | |
hdiutil unmount $MOUNT_PATH | |
# Installing SequelPro | |
curl -L -o SequelPro.dmg 'http://sequel-pro.googlecode.com/files/Sequel_Pro_0.9.9.1.dmg' | |
MOUNT_PATH=$(hdiutil mount SequelPro.dmg | tail -1 | sed 's/.*Apple_HFS//g' | xargs) | |
echo $MOUNT_PATH | |
cp -Rf "$MOUNT_PATH/Sequel Pro.app" ~/Applications | |
hdiutil unmount $MOUNT_PATH | |
# Install Git | |
curl -L -o git.dmg 'https://git-osx-installer.googlecode.com/files/git-1.8.1-intel-universal-snow-leopard.dmg' | |
MOUNT_PATH=$(hdiutil mount git.dmg | tail -1 | sed 's/.*Apple_HFS//g' | xargs) | |
sudo installer -package "$MOUNT_PATH/git-1.8.1-intel-universal-snow-leopard.pkg" -target / | |
hdiutil unmount $MOUNT_PATH | |
# Install TotalTerminal | |
curl -L -o TotalTerminal.dmg 'http://downloads.binaryage.com/TotalTerminal-1.3.dmg' | |
MOUNT_PATH=$(hdiutil mount TotalTerminal.dmg | tail -1 | sed 's/.*Apple_HFS//g' | xargs) | |
open "$MOUNT_PATH/TotalTerminal.pkg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment