Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save balduran/446b9f1c1de7601fe9eb to your computer and use it in GitHub Desktop.

Select an option

Save balduran/446b9f1c1de7601fe9eb to your computer and use it in GitHub Desktop.

Revisions

  1. @kimmobrunfeldt kimmobrunfeldt revised this gist Dec 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -182,7 +182,7 @@ these settings did not have effect when using `defaults write`
    * [Opera](http://www.opera.com)
    * [Atom](http://atom.io)

    Atom is a new text editor by GitHub. It has a huge community, which I think will lead to death of Sublime Text
    Atom is a new text editor by GitHub. It has a huge community, which I think will lead to death of Sublime Text. **Update:** Except it is currently painfully slow compared to Sublime Text :(

    * [Alfred](www.alfredapp.com)

  2. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 12, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -231,6 +231,10 @@ these settings did not have effect when using `defaults write`
    git clone https://github.com/rupa/z.git
    echo "source ~/.bin/z/z.sh" >> ~/.zshrc

    * [scm_breeze](https://github.com/ndbroadbent/scm_breeze)

    Useful helper commands/aliases for git and others

    * [Vagrant](http://www.vagrantup.com/downloads.html)

    When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box. Sometimes you just want to `sudo apt-get install python-opencv python-numpy`.
  3. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 12, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -276,4 +276,5 @@ I stole many of the information from these sources:
    * https://gist.github.com/g3d/2709563
    * https://gist.github.com/1623487/88bb6766048133d2a68403d02531ce62c46ad404
    * https://gist.github.com/kevinelliott/3135044
    * https://gist.github.com/jimmynotjim/7617722
    * https://gist.github.com/jimmynotjim/7617722
    * https://gist.github.com/benfrain/7434600
  4. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 12, 2014. 1 changed file with 2 additions and 7 deletions.
    9 changes: 2 additions & 7 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -139,18 +139,13 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightC
    echo "Disable three finger drag"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool false


    ###############################################################################
    # Screen #
    ###############################################################################
    echo "Disable automatic rearrangement of spaces based on most recent usage"
    defaults write com.apple.dock mru-spaces -bool false

    # For reference
    # echo "Save screenshots to the desktop"
    # defaults write com.apple.screencapture location -string "$HOME/Desktop"

    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2

    ###############################################################################
    # Activity monitor #
    ###############################################################################
  5. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -144,8 +144,9 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeF
    # Screen #
    ###############################################################################

    echo "Save screenshots to the desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"
    # For reference
    # echo "Save screenshots to the desktop"
    # defaults write com.apple.screencapture location -string "$HOME/Desktop"

    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2
  6. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -207,6 +207,8 @@ these settings did not have effect when using `defaults write`
    * [BetterTouchTool](http://www.boastr.de/)

    Productivity app for creating gesture/mouse/keyboard shortcuts to about any action you can imagine. For example I have binded 3 finger tap to middle click, 3 finger left/right swipes to changing browser/text editor tabs and more.

    I tested moom as an alternative, but BetterTouchTool has more features and is free. BetterTouchTool also ships with a **killer** feature that I've missed most from Ubuntu(Gnome), check it out: https://www.youtube.com/watch?v=wUeKjkpBdCo

    #### Not that trivial installs

  7. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -204,9 +204,9 @@ these settings did not have effect when using `defaults write`

    Much better than default Terminal.app

    * [Moom](http://manytricks.com/moom/)
    * [BetterTouchTool](http://www.boastr.de/)

    Productivity app for moving & resizing windows. You might want to check [troubleshooting](http://manytricks.com/blog/?p=2896).
    Productivity app for creating gesture/mouse/keyboard shortcuts to about any action you can imagine. For example I have binded 3 finger tap to middle click, 3 finger left/right swipes to changing browser/text editor tabs and more.

    #### Not that trivial installs

  8. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -206,7 +206,7 @@ these settings did not have effect when using `defaults write`

    * [Moom](http://manytricks.com/moom/)

    Productivity app for moving & resizing windows
    Productivity app for moving & resizing windows. You might want to check [troubleshooting](http://manytricks.com/blog/?p=2896).

    #### Not that trivial installs

  9. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -204,6 +204,9 @@ these settings did not have effect when using `defaults write`

    Much better than default Terminal.app

    * [Moom](http://manytricks.com/moom/)

    Productivity app for moving & resizing windows

    #### Not that trivial installs

  10. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -108,6 +108,9 @@ defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " "
    echo "Disable sound effect when changing volume"
    defaults write -g com.apple.sound.beep.feedback -integer 0

    echo "Disable user interface sound effects"
    defaults write com.apple.systemsound 'com.apple.sound.uiaudio.enabled' -int 0

    echo "Set system sounds volume to 0"
    defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0

  11. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 1 addition and 6 deletions.
    7 changes: 1 addition & 6 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -75,12 +75,10 @@ defaults write com.apple.dock orientation -string left
    echo "Hide dock automatically"
    defaults write com.apple.dock autohide -boolean true

    # I actually didn't get this working.. ideas?
    echo "Set Dock auto-hide delay"
    defaults write com.apple.dock autohide-delay 0

    echo "Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons"
    defaults write com.apple.finder QuitMenuItem -bool true

    echo "Show all filename extensions in Finder"
    defaults write NSGlobalDomain AppleShowAllExtensions -bool true

    @@ -146,9 +144,6 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeF
    echo "Save screenshots to the desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"

    echo "Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)"
    defaults write com.apple.screencapture type -string "png"

    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2

  12. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. No changes.
  13. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,10 @@
    # Install web development tools to Mavericks (OS X 10.9)

    Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.
    Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

    I don't want: **any** sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

    **These are my opinions. Read this document through and pick up the good parts to your preferences.**

    ## System preferences

  14. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -177,7 +177,7 @@ these settings did not have effect when using `defaults write`

    ## Install apps

    ##### Drag and drop installs
    ### Drag and drop installs

    * [Chrome](http://www.google.fi/intl/en/chrome/browser/)

    @@ -206,7 +206,7 @@ these settings did not have effect when using `defaults write`
    Much better than default Terminal.app


    ###### Not that trivial installs
    #### Not that trivial installs

    * [Oh-my-zsh](http://www.ohmyz.sh)

  15. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -177,7 +177,7 @@ these settings did not have effect when using `defaults write`

    ## Install apps

    Drag and drop installs
    ##### Drag and drop installs

    * [Chrome](http://www.google.fi/intl/en/chrome/browser/)

    @@ -206,7 +206,7 @@ Drag and drop installs
    Much better than default Terminal.app


    Not that trivial installs
    ###### Not that trivial installs

    * [Oh-my-zsh](http://www.ohmyz.sh)

  16. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 11, 2014. 1 changed file with 45 additions and 5 deletions.
    50 changes: 45 additions & 5 deletions 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -180,44 +180,80 @@ these settings did not have effect when using `defaults write`
    Drag and drop installs

    * [Chrome](http://www.google.fi/intl/en/chrome/browser/)

    I recommend using [profiles in Chrome](https://support.google.com/chrome/answer/2364824?hl=en)

    * [Firefox](http://firefox.com)
    * [Opera](http://www.opera.com)
    * [Atom](http://atom.io)

    Atom is a new text editor by GitHub. It has a huge community, which I think will lead to death of Sublime Text

    * [Alfred](www.alfredapp.com)

    Good replacement for spotlight

    * [XCode command line tools](https://developer.apple.com/xcode/downloads/)

    **Important:** Homebrew and many other tools need this installed

    * [Flowdock](https://www.flowdock.com/download)

    Very good group chat for teams, which has integrations to GitHub, Trello etc.

    * [iTerm2](www.iterm2.com)

    Much better than default Terminal.app


    Not that trivial installs

    * [Oh-my-zsh](http://www.ohmyz.sh)

    Replaces bash.

    * [Homebrew](http://brew.sh)

    Install some basic tools
    Brew is essential for installing libraries and developer stuff easily.

    Install some basic tools:

    brew install git wget

    * [z for autojump](https://github.com/rupa/z)

    Instead of `cd ~/code/personal/projects/secret/mysecretproject` you can just `z mysecretproject`. Fast.

    Install:

    mkdir ~/.bin
    cd ~/.bin
    git clone https://github.com/rupa/z.git
    echo "source ~/.bin/z/z.sh" >> ~/.zshrc

    * [Vagrant](http://www.vagrantup.com/downloads.html)

    When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box. Sometimes you just want to `sudo apt-get install python-opencv python-numpy`.

    If you don't want to pollute your OS X with tons of libraries and binaries(e.g. ruby gems/python packages), you can always spin up a vagrant box. For example you could have one vagrant box for running Python software and another for Ruby.
    * [Docker](http://www.docker.com/)

    "*Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.*"

    "*Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.*"

    * [Real Python with Virtualenv](http://docs.python-guide.org/en/latest/starting/install/osx/)

    OS X ships with its own Python but I recommend installing Python with brew. It makes setupping pip and other Python tools easier.

    Make sure that your brew installed Python is the one that you are running.
    If `which python` outputs `/usr/bin/python`. Then you need to add `/usr/local/bin` to your PATH before `/usr/bin`.

    After installing virtualenv with pip, [install also mkvirtualenv](http://virtualenvwrapper.readthedocs.org/en/latest/install.html)
    for your convenience.

    * [Ruby version manager](http://rvm.io/rvm/install)
    * [Vagrant](http://www.vagrantup.com/downloads.html)

    When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box

    * [Docker](http://www.docker.com/)
    * [NodeJS + NPM](http://nodejs.org/)

    Install with: pkg, brew or nvm. I prefer brew.
    @@ -230,8 +266,12 @@ Not that trivial installs

    * [Windows virtual machines with IE versions](http://modern.ie/en-us/virtualization-tools#downloads)

    Microsoft provides virtual machines for different Windows + IE version combinations for your testing convenience.

    ## Further reading

    I stole many of the information from these sources:

    * http://scouringmacbook.blogspot.fi/
    * https://gist.github.com/g3d/2709563
    * https://gist.github.com/1623487/88bb6766048133d2a68403d02531ce62c46ad404
  17. @kimmobrunfeldt kimmobrunfeldt renamed this gist Jun 11, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion 0-osx-for-web-dev.md → 0-osx-for-web-development.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    # Install web development tools to Mavericks (OS X 10.9)

    Set of guides to quickly setup OS X Mavericks for web development
    Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

    I don't want: **any** sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).


    ## System preferences

  18. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 10, 2014. 1 changed file with 108 additions and 106 deletions.
    214 changes: 108 additions & 106 deletions 0-osx-for-web-dev.md
    Original file line number Diff line number Diff line change
    @@ -6,158 +6,160 @@ Set of guides to quickly setup OS X Mavericks for web development

    Save the following commands as `system-preferences.sh` and run `bash system-preferences.sh`

    ###############################################################################
    # General #
    ###############################################################################
    ```bash
    ###############################################################################
    # General #
    ###############################################################################

    echo "Add some Finnish localization"
    defaults write NSGlobalDomain AppleLocale -string "fi_FI"
    defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
    defaults write NSGlobalDomain AppleMetricUnits -bool true
    echo "Add some Finnish localization"
    defaults write NSGlobalDomain AppleLocale -string "fi_FI"
    defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
    defaults write NSGlobalDomain AppleMetricUnits -bool true

    echo "Setup computer name"
    sudo scutil --set ComputerName "kimmo-macbook"
    sudo scutil --set HostName "kimmo-macbook"
    sudo scutil --set LocalHostName "kimmo-macbook"
    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "kimmo-macbook"
    echo "Setup computer name"
    sudo scutil --set ComputerName "kimmo-macbook"
    sudo scutil --set HostName "kimmo-macbook"
    sudo scutil --set LocalHostName "kimmo-macbook"
    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "kimmo-macbook"

    echo "Disable the 'Are you sure you want to open this application?' dialog"
    defaults write com.apple.LaunchServices LSQuarantine -bool false
    echo "Disable the 'Are you sure you want to open this application?' dialog"
    defaults write com.apple.LaunchServices LSQuarantine -bool false

    echo "Disable Notification Center and remove the menu bar icon"
    launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    echo "Disable Notification Center and remove the menu bar icon"
    launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    echo "Disable auto-correct"
    defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
    echo "Disable auto-correct"
    defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

    echo "Show percentage in battery status"
    defaults write com.apple.menuextra.battery ShowPercent -string "YES"
    defaults write com.apple.menuextra.battery ShowTime -string "NO"
    echo "Show percentage in battery status"
    defaults write com.apple.menuextra.battery ShowPercent -string "YES"
    defaults write com.apple.menuextra.battery ShowTime -string "NO"

    echo "Fix fonth smoothing"
    defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
    echo "Fix fonth smoothing"
    defaults -currentHost write -globalDomain AppleFontSmoothing -int 0

    echo "Enable repeat on keydown"
    defaults write -g ApplePressAndHoldEnabled -bool false
    echo "Enable repeat on keydown"
    defaults write -g ApplePressAndHoldEnabled -bool false

    echo "Use current directory as default search scope in Finder"
    defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
    echo "Use current directory as default search scope in Finder"
    defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

    echo "Show Path bar in Finder"
    defaults write com.apple.finder ShowPathbar -bool true
    echo "Show Path bar in Finder"
    defaults write com.apple.finder ShowPathbar -bool true

    echo "Show Status bar in Finder"
    defaults write com.apple.finder ShowStatusBar -bool true
    echo "Show Status bar in Finder"
    defaults write com.apple.finder ShowStatusBar -bool true

    echo "Set a blazingly fast keyboard repeat rate"
    defaults write NSGlobalDomain KeyRepeat -int 0.02
    echo "Set a blazingly fast keyboard repeat rate"
    defaults write NSGlobalDomain KeyRepeat -int 0.02

    echo "Set a shorter Delay until key repeat"
    defaults write NSGlobalDomain InitialKeyRepeat -int 12
    echo "Set a shorter Delay until key repeat"
    defaults write NSGlobalDomain InitialKeyRepeat -int 12

    echo "Show the ~/Library folder"
    chflags nohidden ~/Library
    echo "Show the ~/Library folder"
    chflags nohidden ~/Library

    echo "Disable rubberband scrolling"
    defaults write -g NSScrollViewRubberbanding -bool false
    echo "Disable rubberband scrolling"
    defaults write -g NSScrollViewRubberbanding -bool false

    echo "Disable dashboard"
    defaults write com.apple.dashboard mcx-disabled -boolean YES
    echo "Disable dashboard"
    defaults write com.apple.dashboard mcx-disabled -boolean YES

    echo "Move dock to left side of screen"
    defaults write com.apple.dock orientation -string left
    echo "Move dock to left side of screen"
    defaults write com.apple.dock orientation -string left

    echo "Hide dock automatically"
    defaults write com.apple.dock autohide -boolean true
    echo "Hide dock automatically"
    defaults write com.apple.dock autohide -boolean true

    echo "Set Dock auto-hide delay"
    defaults write com.apple.dock autohide-delay 0
    echo "Set Dock auto-hide delay"
    defaults write com.apple.dock autohide-delay 0

    echo "Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons"
    defaults write com.apple.finder QuitMenuItem -bool true
    echo "Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons"
    defaults write com.apple.finder QuitMenuItem -bool true

    echo "Show all filename extensions in Finder"
    defaults write NSGlobalDomain AppleShowAllExtensions -bool true
    echo "Show all filename extensions in Finder"
    defaults write NSGlobalDomain AppleShowAllExtensions -bool true

    echo "Expand save panel by default"
    defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
    echo "Expand save panel by default"
    defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

    echo "Expand print panel by default"
    defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
    echo "Expand print panel by default"
    defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true

    echo "Avoid creating .DS_Store files on network volumes"
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
    echo "Avoid creating .DS_Store files on network volumes"
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

    echo "Disable the warning when changing a file extension"
    defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
    echo "Disable the warning when changing a file extension"
    defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

    echo "Require password after a minute after sleep or screen saver begins"
    defaults write com.apple.screensaver askForPassword -int 1
    defaults write com.apple.screensaver askForPasswordDelay -int 60
    echo "Require password after a minute after sleep or screen saver begins"
    defaults write com.apple.screensaver askForPassword -int 1
    defaults write com.apple.screensaver askForPasswordDelay -int 60

    echo "Use list view in all Finder windows by default"
    echo "Four-letter codes for the other view modes: icnv, Nlmv, Flwv"
    defaults write com.apple.finder FXPreferredViewStyle -string "Nlmv"
    echo "Use list view in all Finder windows by default"
    echo "Four-letter codes for the other view modes: icnv, Nlmv, Flwv"
    defaults write com.apple.finder FXPreferredViewStyle -string "Nlmv"

    echo "Remove default text from basic screen saver"
    defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " "
    echo "Remove default text from basic screen saver"
    defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " "

    echo "Disable sound effect when changing volume"
    defaults write -g com.apple.sound.beep.feedback -integer 0
    echo "Disable sound effect when changing volume"
    defaults write -g com.apple.sound.beep.feedback -integer 0

    echo "Set system sounds volume to 0"
    defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0
    echo "Set system sounds volume to 0"
    defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0

    ###############################################################################
    # Trackpad, Mouse, Keyboard, Gestures #
    ###############################################################################
    ###############################################################################
    # Trackpad, Mouse, Keyboard, Gestures #
    ###############################################################################

    echo "Enable tap to click (Trackpad)"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
    defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
    defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
    echo "Enable tap to click (Trackpad)"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
    defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
    defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

    echo "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
    echo "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

    echo "Follow mouse when zoomed in"
    defaults write com.apple.universalaccess closeViewPanningMode -int 0
    echo "Follow mouse when zoomed in"
    defaults write com.apple.universalaccess closeViewPanningMode -int 0

    echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
    defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
    echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
    defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

    echo "Tap with two fingers to emulate right click"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
    echo "Tap with two fingers to emulate right click"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

    echo "Disable three finger drag"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool false
    echo "Disable three finger drag"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool false


    ###############################################################################
    # Screen #
    ###############################################################################
    ###############################################################################
    # Screen #
    ###############################################################################

    echo "Save screenshots to the desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"
    echo "Save screenshots to the desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"

    echo "Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)"
    defaults write com.apple.screencapture type -string "png"
    echo "Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)"
    defaults write com.apple.screencapture type -string "png"

    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2
    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2

    ###############################################################################
    # Activity monitor #
    ###############################################################################
    ###############################################################################
    # Activity monitor #
    ###############################################################################

    echo "Sort Activity Monitor results by CPU usage"
    defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
    defaults write com.apple.ActivityMonitor SortDirection -int 0
    echo "Sort Activity Monitor results by CPU usage"
    defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
    defaults write com.apple.ActivityMonitor SortDirection -int 0


    echo "Kill affected applications, so the changes apply"
    for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done
    echo "Kill affected applications, so the changes apply"
    for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done
    ```

    After that, you have to do some settings manually. At least on clean Mavericks,
    these settings did not have effect when using `defaults write`
  19. @kimmobrunfeldt kimmobrunfeldt revised this gist Jun 10, 2014. 1 changed file with 10 additions and 2 deletions.
    12 changes: 10 additions & 2 deletions 0-osx-for-web-dev.md
    Original file line number Diff line number Diff line change
    @@ -210,7 +210,7 @@ Not that trivial installs
    * [Ruby version manager](http://rvm.io/rvm/install)
    * [Vagrant](http://www.vagrantup.com/downloads.html)

    When you have difficult binaries to install like
    When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box

    * [Docker](http://www.docker.com/)
    * [NodeJS + NPM](http://nodejs.org/)
    @@ -223,4 +223,12 @@ Not that trivial installs

    I think using http://postgresapp.com is the preferred way. Using brew might be fine also, don't know.

    * [Windows virtual machines with IE versions](http://modern.ie/en-us/virtualization-tools#downloads)
    * [Windows virtual machines with IE versions](http://modern.ie/en-us/virtualization-tools#downloads)

    ## Further reading

    * http://scouringmacbook.blogspot.fi/
    * https://gist.github.com/g3d/2709563
    * https://gist.github.com/1623487/88bb6766048133d2a68403d02531ce62c46ad404
    * https://gist.github.com/kevinelliott/3135044
    * https://gist.github.com/jimmynotjim/7617722
  20. @kimmobrunfeldt kimmobrunfeldt created this gist Jun 10, 2014.
    226 changes: 226 additions & 0 deletions 0-osx-for-web-dev.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,226 @@
    # Install web development tools to Mavericks (OS X 10.9)

    Set of guides to quickly setup OS X Mavericks for web development

    ## System preferences

    Save the following commands as `system-preferences.sh` and run `bash system-preferences.sh`

    ###############################################################################
    # General #
    ###############################################################################

    echo "Add some Finnish localization"
    defaults write NSGlobalDomain AppleLocale -string "fi_FI"
    defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
    defaults write NSGlobalDomain AppleMetricUnits -bool true

    echo "Setup computer name"
    sudo scutil --set ComputerName "kimmo-macbook"
    sudo scutil --set HostName "kimmo-macbook"
    sudo scutil --set LocalHostName "kimmo-macbook"
    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "kimmo-macbook"

    echo "Disable the 'Are you sure you want to open this application?' dialog"
    defaults write com.apple.LaunchServices LSQuarantine -bool false

    echo "Disable Notification Center and remove the menu bar icon"
    launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    echo "Disable auto-correct"
    defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

    echo "Show percentage in battery status"
    defaults write com.apple.menuextra.battery ShowPercent -string "YES"
    defaults write com.apple.menuextra.battery ShowTime -string "NO"

    echo "Fix fonth smoothing"
    defaults -currentHost write -globalDomain AppleFontSmoothing -int 0

    echo "Enable repeat on keydown"
    defaults write -g ApplePressAndHoldEnabled -bool false

    echo "Use current directory as default search scope in Finder"
    defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

    echo "Show Path bar in Finder"
    defaults write com.apple.finder ShowPathbar -bool true

    echo "Show Status bar in Finder"
    defaults write com.apple.finder ShowStatusBar -bool true

    echo "Set a blazingly fast keyboard repeat rate"
    defaults write NSGlobalDomain KeyRepeat -int 0.02

    echo "Set a shorter Delay until key repeat"
    defaults write NSGlobalDomain InitialKeyRepeat -int 12

    echo "Show the ~/Library folder"
    chflags nohidden ~/Library

    echo "Disable rubberband scrolling"
    defaults write -g NSScrollViewRubberbanding -bool false

    echo "Disable dashboard"
    defaults write com.apple.dashboard mcx-disabled -boolean YES

    echo "Move dock to left side of screen"
    defaults write com.apple.dock orientation -string left

    echo "Hide dock automatically"
    defaults write com.apple.dock autohide -boolean true

    echo "Set Dock auto-hide delay"
    defaults write com.apple.dock autohide-delay 0

    echo "Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons"
    defaults write com.apple.finder QuitMenuItem -bool true

    echo "Show all filename extensions in Finder"
    defaults write NSGlobalDomain AppleShowAllExtensions -bool true

    echo "Expand save panel by default"
    defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

    echo "Expand print panel by default"
    defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true

    echo "Avoid creating .DS_Store files on network volumes"
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

    echo "Disable the warning when changing a file extension"
    defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

    echo "Require password after a minute after sleep or screen saver begins"
    defaults write com.apple.screensaver askForPassword -int 1
    defaults write com.apple.screensaver askForPasswordDelay -int 60

    echo "Use list view in all Finder windows by default"
    echo "Four-letter codes for the other view modes: icnv, Nlmv, Flwv"
    defaults write com.apple.finder FXPreferredViewStyle -string "Nlmv"

    echo "Remove default text from basic screen saver"
    defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " "

    echo "Disable sound effect when changing volume"
    defaults write -g com.apple.sound.beep.feedback -integer 0

    echo "Set system sounds volume to 0"
    defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0

    ###############################################################################
    # Trackpad, Mouse, Keyboard, Gestures #
    ###############################################################################

    echo "Enable tap to click (Trackpad)"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
    defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
    defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

    echo "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

    echo "Follow mouse when zoomed in"
    defaults write com.apple.universalaccess closeViewPanningMode -int 0

    echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
    defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

    echo "Tap with two fingers to emulate right click"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

    echo "Disable three finger drag"
    defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool false


    ###############################################################################
    # Screen #
    ###############################################################################

    echo "Save screenshots to the desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"

    echo "Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)"
    defaults write com.apple.screencapture type -string "png"

    echo "Enable subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2

    ###############################################################################
    # Activity monitor #
    ###############################################################################

    echo "Sort Activity Monitor results by CPU usage"
    defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
    defaults write com.apple.ActivityMonitor SortDirection -int 0


    echo "Kill affected applications, so the changes apply"
    for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done

    After that, you have to do some settings manually. At least on clean Mavericks,
    these settings did not have effect when using `defaults write`

    * `Keyboard > Shortcuts > Keyboard`: Move focus to next window shortcut to `⌘+§`
    * `Accessibility > Mouse & Trackpad > Trackpad`: enable dragging with drag lock
    * Trackpad

    ![](http://i.imgur.com/4N9BgGn.png)

    ![](http://i.imgur.com/m6afgND.png)

    ## Install apps

    Drag and drop installs

    * [Chrome](http://www.google.fi/intl/en/chrome/browser/)
    * [Firefox](http://firefox.com)
    * [Opera](http://www.opera.com)
    * [Atom](http://atom.io)
    * [Alfred](www.alfredapp.com)
    * [XCode command line tools](https://developer.apple.com/xcode/downloads/)
    * [Flowdock](https://www.flowdock.com/download)
    * [iTerm2](www.iterm2.com)

    Not that trivial installs

    * [Oh-my-zsh](http://www.ohmyz.sh)
    * [Homebrew](http://brew.sh)

    Install some basic tools

    brew install git wget

    * [z for autojump](https://github.com/rupa/z)

    mkdir ~/.bin
    cd ~/.bin
    git clone https://github.com/rupa/z.git
    echo "source ~/.bin/z/z.sh" >> ~/.zshrc

    * [Real Python with Virtualenv](http://docs.python-guide.org/en/latest/starting/install/osx/)

    Make sure that your brew installed Python is the one that you are running.
    If `which python` outputs `/usr/bin/python`. Then you need to add `/usr/local/bin` to your PATH before `/usr/bin`.

    After installing virtualenv with pip, [install also mkvirtualenv](http://virtualenvwrapper.readthedocs.org/en/latest/install.html)
    for your convenience.

    * [Ruby version manager](http://rvm.io/rvm/install)
    * [Vagrant](http://www.vagrantup.com/downloads.html)

    When you have difficult binaries to install like

    * [Docker](http://www.docker.com/)
    * [NodeJS + NPM](http://nodejs.org/)

    Install with: pkg, brew or nvm. I prefer brew.

    * Postgres

    Mavericks does not have Postgres installed by default anymore: http://stackoverflow.com/questions/19611505/does-postgresql-exist-on-os-x-mavericks

    I think using http://postgresapp.com is the preferred way. Using brew might be fine also, don't know.

    * [Windows virtual machines with IE versions](http://modern.ie/en-us/virtualization-tools#downloads)