Skip to content

pgpx/mac-setup

Repository files navigation

Mac Setup

First: install macOS

Other setup notes:

System Preferences

  • Bluetooth
    • Add devices
  • Dock
    • Automatically hide and show the Dock - check
  • General
    • Use dark menu bar and Dock - check
  • Internet Accounts
    • Configure Google, etc.
  • Keyboard
    • Keyboard
      • Show keyboard and emoji viewers in the menu bar
      • Use F1, F2, etc. keys as standard function keys on external keyboards
      • Customise control strip... - Mute, Lock, Volume, Dashboard
    • Text
      • Correct spelling automatically - uncheck
      • Capitalize words automatically - uncheck
      • Add period with double-space - uncheck
    • Shortcuts
      • Mission Control
        • Mission Control - uncheck (conflicts with Sublime Text)
        • Application windows - uncheck (conflicts with Sublime Text)
        • Move left a space (conflicts with a lot!)
        • Move right a space (conflicts with a lot!)
      • Function Keys - add IntelliJ Idea and Microsoft Remote Desktop
    • Dictation
      • Shortcut - off
  • Security & Privacy
    • FileVault -> Turn On
    • Firewall -> Turn On Firewall
  • Trackpad
    • Point & Click
      • Tap to click - check
  • Users & Groups
    • Disable Guest User
    • Change user icon (by clicking on it)

O/S Basic Setup

  1. Install O/S Updated from App Store
  2. Install purchased apps from App Store
  3. Run Xcode and accept the license (either manually or automatically using sudo xcodebuild -license (SO))
  4. Install device drivers

Install specific versions of Java

If we want multiple (old) versions of the same major version of Java, then we have to download them manually:

Could consider using sdkman in future.

Enable JCE for JDK >= 8u1

Install applications using Brew

After installing at least one JDK, because that is a pre-requisite

  1. Install packages using brew.sh:
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew update
    brew bundle

This uses to control the programs to install. Update this file using (SO):

./brew-bundle-dump.sh

# Which runs
# brew bundle dump --describe --force

Shell setup

cp .bash_profile ~

Application setup notes

Alfred

  • Powerpack -> Activate Your Powerpack and enter license code
  • Clipboard -> change shortcut key to Option-Command-V and expire values:
  • Alfred Preferences → Appearance → Options (lower left corner) → Show Alfred on → Mouse screen. (ref)

Chrome

  • Chrome -> Warn before quitting - check

LastPass plugin

Log out automatically:

Dropbox

Settings->Sync->Selective Sync: don't sync Comics, Lightroom Backup, Music, Nina

Firefox

For old versions, turn off automatic updates in Firefox -> Preferences:

Git

Global config

git config --global user.email '<email address>'
git config --global user.name '<name>'

# https://stackoverflow.com/a/13974638/125246
git config --global pull.rebase true

git config --global --list

Install git-lfs (after brew has installed it):

git lfs install

IntelliJ

  • Sync settings from JetBrains account

  • Git config - use native ssh executable:

  • Project structure -> SDKs - add all JDKs (in directories similar to /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home)

Sublime Text

Run, and Help->Enter License.

Moom

  • Enable Settings -> Security & Privacy -> Accessibility

Moom settings:

  1. Open a new terminal (to ensure that the init script is run, defined in <.bash_profile>).

  2. Add each JDK (hiding JAVA_TOOL_OPTIONS and JAVA_OPTIONS which would break jenv's parsing - bug report and SO unset tip).

    Note only overwrite versions if they are newer (e.g. so that 1.8 points to 1.8.0_162 instead of 1.8.0_92).

    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
           /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
        /Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
           /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk/Contents/Home/
    env -u JAVA_TOOL_OPTIONS -u _JAVA_OPTIONS jenv add \
       /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
  3. Enable plugins

    jenv enable-plugin export   # To export JAVA_HOME
    jenv enable-plugin ant      # So that ant, etc. use the configured JDK
    jenv enable-plugin maven
    jenv enable-plugin gradle
    jenv enable-plugin sbt
    jenv enable-plugin springboot

Python

Don't install Python directly with brew, but instead use pyenv, pyenv-virtualenv, and pyenv-virtualenvwrapper

Then add to .bash_profile:

# For pyenv
eval "$(pyenv init -)"
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi

Then install the required Python versions:

pyenv install 2.7.10
pyenv install 3.2.6
pyenv install 3.3.6
pyenv install 3.4.3
pyenv install 3.5.0

Terminal

Terminal -> Preferences

  • General
    • On startup, open: New window with profile: Ocean
    • New windows open with: Same profile

tinyproxy

Copy config file to /usr/local/etc/tinyproxy.conf

About

Mac setup instructions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published