Skip to content

Instantly share code, notes, and snippets.

@dkarchmer
Last active November 14, 2019 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkarchmer/d8124f3ae1aa498eea8f0d658be214a5 to your computer and use it in GitHub Desktop.
Save dkarchmer/d8124f3ae1aa498eea8f0d658be214a5 to your computer and use it in GitHub Desktop.
Setting up a new Mac for Django and Docker development

before

  • Enable Firewall
  • Enable FileVault
  • Disable all sharing

Installation script

0.- Install XCode Compiler

xcode-select --install

1.- Install brew packages

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install bash-completion ssh-copy-id wget
brew install python@2
pip install --upgrade pip setuptools
# Option 1: Install Python 3.6
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
# Option 2: Install latest Python
brew install python3
pip3 install --upgrade pip setuptools wheel
brew install postgresql (needed to be able to install `pip install psycopg2`)
brew install vips (needed for image resizing)

# In one of the installs updated python 3 to python 3.7+, switch back to 3.6
brew switch python 3.6.5_1

3.- Emacs (optional)

brew install emacs --with-cocoa
# ln -s /usr/local/Cellar/emacs/24.5/Emacs.app /Applications
brew linkapps emacs

3.- Setup Python with Virtual Environment

pip install virtualenv virtualenvwrapper
pip3 install virtualenv virtualenvwrapper

4a.- Option a: Installing NodeJS with n (Prefered)

brew install n
sudo n 10.7.0

4b.- Option b: Installing NodeJS with NVM

See http://dev.topheman.com/install-nvm-with-homebrew-to-use-multiple-versions-of-node-and-iojs-easily/
brew install nvm
mkdir ~/.nvm
export NVM_DIR=~/.nvm
. /usr/local/opt/nvm/nvm.sh
nvm install 6
nvm install 8
nvm install 10

5.- Create a bash profile

See mine: https://gist.github.com/dkarchmer/4f9d9060d82748b1707e78677f224ff6

6.- Install global Node packages

npm install -g gulp
npm install -g bower
npm install -g yo

7.- Install Docker for Mac: https://docs.docker.com/docker-for-mac/

8.- Other Useful Apps

Other Stuff

1.- Installing Android Development Tools

brew cask install java
brew install https://raw.githubusercontent.com/entrypass/jenv/homebrew/homebrew/jenv.rb
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
jenv rehash
jenv global oracle64-1.8.0.102
brew cask install android-studio
brew install android-sdk
android sdk   # To update/install packages

2.- Installing ARM Toolchain:

# https://github.com/SomaticLabs/homebrew-gnu-arm-toolchain
$ brew install gcc-arm-none-eabi
$ arm-none-eabi-gcc --version

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment