Skip to content

hdpuk86/mac_setup_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MacOS Setup - Getting Started

Table of Contents generated with DocToc

Install Homebrew

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

The ./getting-started.sh should contain all the applications and cli tools you'll need to get up and running quickly.
If you need anything else you can get it using Homebrew. brew install [formula] (for CLI tools) or brew cask install [cask] (for applications)
Search Homebrew for formulae and casks

Run Getting Started Scripts

Warning: You'll need Homebrew installed before running these script.

touch ~/getting-started.sh

Copy and paste the entire contents of the script file from this repo into the newly created file.

nano ~/getting-started.sh

Now run the following to make the shell files executable:

sudo chmod -R 755 ~/getting-started.sh

Now you can run the script:

~/getting-started.sh

Setup NPM

Update NPM to the latest version:

npm install -g npm

Setup NVM

Installing NVM
Troubleshooting NVM on MacOS

touch ~/.zshrc

The following curl will add some lines to your .zshrc for loading nvm so you need .zshrc to exist first:

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

See Troubleshooting for common issues.

Ruby, Bundle and Rails

The Mac should come with Ruby, Bundle and Rails pre-installed.

ruby -v

bundle -v

rails -v

Setup Rbenv

Rbenv should have been installed by running the getting-started.sh in the previous section.

Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production.

rbenv init

Close your Terminal window and open a new one so your changes take effect.
Run the rbenv doctor script to check rbenv is installed correctly:

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash

Setup Postgres

Postgres should be added by the getting-started.sh script.
Setup a root user: sudo -u YOUR_USERNAME createuser -s -w root

Setup Email

  • The setup script installs Front.

Setup VSCode

Recommended Extensions

Run the following block to install some recommended VS Code settings.

code --install-extension eamodio.gitlens
code --install-extension wmaurer.change-case
code --install-extension oderwat.indent-rainbow
code --install-extension pranaygp.vscode-css-peek
code --install-extension shardulm94.trailing-spaces
code --install-extension ms-azuretools.vscode-docker
code --install-extension Cardinal90.multi-cursor-case-preserve

If you already have VSCode setup on another laptop and would like to re-use your current extensions
follow these steps on the old laptop:

Extensions

  • Open the terminal
  • Run the command: code --list-extensions | xargs -L 1 echo code --install-extension
  • Copy/save the output (maybe email to yourself) and paste this output in the terminal on your new mac to install the same extensions.

Browser Extensions

1Password (password manager)

Database Management

  • The setup script will have installed Datagrip & Postico:

SSH Keys / Cloning from GitHub

Learn more about GitHub/SSH keys

Once generated you should have a folder at ~/.ssh which will contain your id_rsa.pub which you can use to generate a key on GitHub

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Confirm all the defaults

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

cat ~/.ssh/id_rsa.pub

Copy output to https://github.com/settings/keys

Communication

Slack and Zoom will have been install by the script.

Slack Screen Recording

You may notice that you cannot share your screen properly on Slack. To fix that:

System Preferences > Security & Privacy > Privacy > Screen Recording and then clicking the tick box next to slack

You might need to restart Slack for the changes to take affect.

Doctoc

Use doctoc to autogenerate table of contents in markdown files.

npm install -g doctoc

Usage Examples

Default:

doctoc .

Multiple files:

doctoc README.md

doctoc CONTRIBUTING.md LICENSE.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages