Setup your machine

Code Editor

Choose your code editor

Time to configure it

  • If you chose Sublime

    1. Create subl command

      sudo mkdir -p /usr/local/bin/ && sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
      
    2. Install package manager as shown here

    3. Configure user settings (Sublime Text -> Preferences -> Settings)

      {
        "ensure_newline_at_eof_on_save": true,
        "font_size": 14,
        "show_encoding": true,
        "tab_size": 2,
        "translate_tabs_to_spaces": true,
        "trim_trailing_white_space_on_save": true
      }
      
  • If you chose VS Code

    1. Create code command

    2. Open the Command Palette (⇧⌘P) and type shell command to find the Shell Command: Install 'code' command in PATH command. Restart the terminal for the new $PATH value to take effect. You'll be able to type code . in any folder to start editing files in that folder.

    3. Configure user settings (⇧⌘P) and type user settings and select Preferences: Open User Settings Depending on your VSCode version you will see a JSON view of the settings by default or not. If it doesn't show at first you can click a {} button on the top right that will show you the settings JSON view.

      {
         "explorer.confirmDelete": false,
         "editor.scrollBeyondLastLine": false,
         "editor.wordWrap": "on",
         "files.trimTrailingWhitespace": true,
         "editor.tabSize": 2,
         "markdown.preview.scrollPreviewWithEditor": false,
         "[python]": {
             "editor.tabSize": 4,
         },
         "files.insertFinalNewline": true,
         "markdown.preview.scrollEditorWithPreview": false,
         "html.suggest.html5": false,
         "editor.quickSuggestions": {
             "other": true,
             "comments": false,
             "strings": true
         },
         "window.zoomLevel": 0,
         "python.venvPath": "~/.virtualenvs",
      }
      `
      

General MAC OS config

  • Enable "Show Path" bar in Finder

    defaults write com.apple.finder ShowPathbar -bool true
    
  • Enable "Show Status" bar in Finder

    defaults write com.apple.finder ShowStatusBar -bool true
    

Xcode

Xcode is an IDE for macOS developed by Apple for developing software for macOS, iOS, iPadOS, watchOS, and tvOS.

  1. Install Xcode from the App Store
  2. Open Xcode and accept the licence
  3. Install command line tools with this command:
    xcode-select --install
    

Android Studio (optional)

Android Studio is the official IDE for Google's Android operating system, designed specifically for Android development.

Installation

You can download it from Android Studio page


Homebrew

Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's macOS operating system and Linux.

Installation

  • To install it, run in Terminal the following command:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  • Run brew doctor and update homebrew with brew update


Git

Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.

Installation

Xcode developer tools already installs GIT for us.

Configuration

  • If migrating from another computer, import previous configuration following this guide

  • If no configuration was created, execute these commands in your terminal:

    ssh-keygen -t rsa -C "YOUR GENERATED EMAIL"
    git config --global user.email "YOUR EMAIL"
    git config --global user.name "YOUR NAME"
    git config --global color.ui true
    

Useful tips


GitHub

GitHub is a web-based collaborative software platform for software development version control using Git. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.

If you are new to GitHub, create an account.

When you finished, give your account username to somebody in the team


RVM - Ruby Version Manager

RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.

Installation

Run the following command:

curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

Ruby

Ruby is an interpreted, high-level, general-purpose programming language.

Installation

Run this command in Terminal:

rvm use ruby --install --default

Configuration

Configure no doc

nano ~/.gemrc

Paste this:

gem: --no-rdoc --no-ri

Install rails and bundler

gem install rails bundler

wget

GNU Wget is a computer program that retrieves content from web servers. It supports downloading via HTTP, HTTPS, and FTP.

Installation

Run the following command:

brew install wget

nvm

nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.

Installation

Run the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Verification

Check that everything went well running the following command:

command -v nvm

Node.js

Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a web browser.

npm

npm (originally short for Node Package Manager) is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js.

Installation

To install both nodejs and npm, run the following command:

nvm install node

MySQL

MySQL is an open-source relational database management system. MySQL is used by many popular websites, including Facebook, Flickr, MediaWiki, Twitter, and YouTube.

Installation

Run the following command:

brew install mysql
brew services start mysql

Postgres / PostgreSQL

Postgres is a free and open-source relational database management system emphasizing extensibility and SQL compliance.

Installation

You can install it from Postgres app page

Configuration

Configure PATHs

  1. Open zshrc:

    nano ~/.zshrc
    
  2. Paste the following:

    export PATH=$PATH:/usr/local/bin
    export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
    
  3. Save those changes and exit.

  4. Apply those changes:

    source ~/.zshrc
    
  5. Finally, type psql in your terminal to open Postgres console and run:

    CREATE USER postgres SUPERUSER;
    

Python3 (optional)

Python is an interpreted, high-level, general-purpose programming language. Python3 is a version of this programming language.

Installation

Run the following command:

brew install python3

Configuration

  • Setup Python's environment management

    1. Install virtualenv
      pip3 install virtualenv
      
    2. Install virtualenvwrapper
      pip3 install virtualenvwrapper
      
    3. Use the following command to find the location of Python3 on your system
      which python3
      
    4. Add the following lines to ~/.zshrc (or your own shell's initialisation file)
      VIRTUALENVWRAPPER_PYTHON='<Python3 location>'
      source /usr/local/bin/virtualenvwrapper.sh
      export WORKON_HOME=$HOME/.virtualenvs
      
    5. Run the following commands
      mkdir ~/.virtualenvs
      source ~/.zshrc
      
    6. All the virtual environments created using virtualenvwrapper will now be stored in
      ~/.virtualenvs
      
  • To create new Python3 virtual environment

    mkvirtualenv <project name>
    

    The virtualenv will automatically activate after creation

  • To exit the virtualenv

    deactivate
    
  • To access the virtualenv

    workon <project name>
    


Troubleshooting

If you experienced errors while bundling, run this commands in Terminal:

gem uninstall libv8
brew install v8
gem install therubyracer
gem install libv8 -v '3.16.14.3' -- --with-system-v8


Extra (optional)

libxslt

libxslt is the XSLT C library developed for the GNOME project. It is used for XML parsing, tree manipulation and XPath support.

Installation

To install it, run in the Terminal:

brew install libxslt

Docker (optional)

Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages called containers.

Installation

You can install Docker Desktop app from docker page.