Home Setting up MacOS
Post
Cancel

Setting up MacOS

Basic Setup

1
2
3
4
5
6
7
8
9
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew update

brew install git vim go python

curl https://bootstrap.pypa.io/get-pip.py > get-pip.py

sudo python get-pip.py

Installing node

1
2
3
4
5
brew install nvm

nvm install node

npm i yarn -g

To use legacy versions of node

  • For a session
1
2
nvm install v1X.XX.X
nvm use v1X.XX.X
  • Changing the default node version
1
nvm default alias v1X.XX.X

Installing postgres

1
2
3
4
5
brew install postgres

brew services enable postgresql

brew services start postgresql

Installing mysql

1
2
3
4
5
brew install mysql

brew services enable mysql

brew services start mysql

Configuring git

1
2
3
4
5
ssh-keygen -t ed25519 -C "ahampriyanshu@gmail.com"

eval "$(ssh-agent -s)"

vim ~/.ssh/config

Paste the following

1
2
3
4
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519
1
2
3
ssh-add -K ~/.ssh/id_ed25519

pbcopy < ~/.ssh/id_ed25519.pub

Add the new shh key

1
2
3
git config --global user.name "ahampriyanshu"

git config --global user.email "ahampriyanshu@gmail.com"

Switching to zsh

1
2
3
4
5
6
7
8
9
10
11
12
13
brew install zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

chsh -s `which zsh`

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

source ~/.zshrc

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install

Utilities

1
2
3
4
5
brew install --cask visual-studio-code

npm i -g nodemon

pip3 install youtube-dl orange3
This post is licensed under CC BY 4.0 by the author.

Vim Cheat Sheet

August | 2022 | POTD GFG