Skip to content

Latest commit

 

History

History
227 lines (154 loc) · 6.26 KB

File metadata and controls

227 lines (154 loc) · 6.26 KB

Computer Setup

Mac

New to programming on mac, don't worry we got you covered 🥳

  • Install xcode-select

    To install xcode-select follow the following steps :-

    1. Open the terminal, use shortcut command + space and type terminal in the search

    2. Run the Command

      $ xcode-select --install
    3. When prompted, enter the login password

    4. To check for successful, type xcode-select. You should see something like:-

      $ xcode-select
      
      xcode-select: error: no command option given
      Usage: xcode-select [options]
      
      Print or change the path to the active developer directory. This directory
      controls which tools are used for the Xcode command line tools (for example, 
      xcodebuild) as well as the BSD development commands (such as cc and make).
      
      Options:
        -h, --help                  print this help message and exit
      .
      .
  • Install Homebrew

    1. Open Terminal

    2. Paste this line and hit enter

      $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    3. Type brew doctor to confirm successful install type:-

      $ brew doctor
      Your system is ready to brew
  • Install Git

    1. Open Terminal and type :-

      $ brew install git
    2. Type git to confirm success, you see this on output :-

      $ git
      
      usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
                 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
                 [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
                 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
                 [--super-prefix=<path>] [--config-env=<name>=<envvar>]
                 <command> [<args>]
      
      These are common Git commands used in various situations:
      
      start a working area (see also: git help tutorial)
         clone             Clone a repository into a new directory
         init              Create an empty Git repository or reinitialize an existing one
         .
         .
      
  • Configure Git

    1. Open Terminal

    2. Type the following to set up your git configuration: - ( Replace with your name and email )

      git config --global user.name "<your name>"
      git config --global user.email <your email>
      git config --global init.defaultBranch main
      git config --global pull.rebase false
    3. Type git config --list to verify. Checkout for this output :-

      $ git config --list
      core.repositoryformatversion=0
      core.filemode=true
      core.bare=false
      credential.helper=osxkeychain
      user.name=<your name>
      user.email=<your email>
      init.defaultbranch=main
      pull.rebase=false
  • Add Github SSH

    We are assuming that you already have a github account.

    1. Generate a New Key

      Open termianak and enter the following command :-

      $ ssh-keygen -t rsa -C "<your email"
      • Press Enter when prompted to enter a file, this will save the keys to the default location i.e. ~/ssh/id_rsa

      • When prompted to enter a password, when you hit enter without typing anything that means no password. Which is okay.

      • The output in the Terminal should look like this :-

        Your identification has been saved in id_rsa.
        Your public key has been saved in id_rsa.pub.
        The key fingerprint is:
        SHA256:C3AB8FF13720E8AD9047DD39466B3C8974E592C your@email_address.com
        The key's randomart image is:
        +---[RSA 2048]----+
        | .       =   ..  |
        |o . . o + = ..   |
        | =.o o o o o  .  |
        |+ +o. .  ..  . . |
        |.+E  .  S   o o..|
        |..     .  .o . .+|
        |        o  oo .o+|
        |       . o  ==o.=|
        |        . .+=B=o |
        +----[SHA256]-----+

        Awesome! You have your private and public keys saved 🎉

    2. Add the new key to your system

      In your Terminal, run :-

      $ ssh-add ~/.ssh/id_rsa
    3. Copy public key

      In your terminal run :-

      Note: Never display show your private key to the public 🛑

      $ pbcopy < ~/.ssh/id_rsa.pub
    4. Add key to Github

      • Visit Github Key Settings
      • Click on New SSH key
      • Paste the key copied in part 3 above (command + v) in the key section
      • You can choose to add a title or not, based on your preference.
      • Click on Add SSH key to save your key to Github
    5. Verify if the configuration worked.

      • In your terminal run :-

      • You will get this prompt,

        The authenticity of host 'github.com (192.30.252.153)'... can't be established.
        RSA key fingerprint is 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff.
        Are you sure you want to continue connecting (yes/no)?

        Type yes

      • If successfull, yoy will see :-

        Hi <your_github_username>! You've successfully authenticated, but GitHub does not provide shell access.
  • Install rbenv

    To install rbenv on your computer click this link and follow the prompts Here

    Note:

    • Newer MacBooks uses zsh not bash for shell.
    • In the link they use .bash_profile replace that with .zshrc
  • Install NVM

    To install nvm on your mac, click the link and follow from step 1 - 3 Here

    Note:

    • Newer MacBooks uses zsh not bash for shell.
    • In the link they use .bash_profile replace that with .zshrc
  • Install PostgreSQL

    To install postgresql with home brew use click on the link Here

Installations For Productivity

  • Rectangle -> Screen Management
  • Caffeine (free) can also download Caffeinated on AppStore for a charge. -> Keeps your system running.