Skip to content

Instantly share code, notes, and snippets.

@SameerMakhija
SameerMakhija / .md
Last active November 22, 2021 08:30
Visual studio code editor setting

Visual studio code editor

Install Prettier - code formatter

Set code editor forfatting default to Prettier

Setting > Search > default format > Editor: Default Formatter > Select "Prettier - Code formatter" OR "esbenp.prettier-vscode"

format on save

app.METHOD vs app.use

app.METHOD(PATH, ROUTE_HANDLER)

  • Apply this for route handlers.
  • METHOD here represents the available node methods HTTP verbs eg. get, post, put, delete ...etc

Syntax:

app.get('/', function(req, res){
@SameerMakhija
SameerMakhija / handling_multiple_github_accounts.md
Created February 2, 2021 17:22 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes