- Softwares I Use
- Setup a Quick Postgres DB with Docker
- Set SSH for Multiple Accounts
- For More Dev Notes
- Postman
- iTerm2 with ZSH
- Simplenote
- pgAdmin
- Docker
- VSCode
- Font - FiraCode
- Theme - Retreon Color Theme
- Prettier
- Rainbow Brackets
- Material Icon Theme
- Indent Rainbow
- ESLint
- Live share
- Git Lens
docker run --name <db-name> -e POSTGRES_PASSWORD=admin -p 5432:5432 -d postgres
$ ssh-keygen -t ed25519 -C "[email protected]"
$ ssh-keygen -t ed25519 -C "[email protected]"
You should check if ed25519 is still the most recommended algorithm.
Copy output from each key using:
$ cat ~/.ssh/<your_geenrated_ssh_key>.pub
Create file:
$ touch ~/.ssh/config
Open file with VSCode:
$ code ~/.ssh/config
Paste configuration
~/.ssh/config
Host work
AddKeysToAgent yes
HostName <work_host_name>
User <work_user_name>
PreferredAuthentications publickey
IdentityFile ~/.ssh/<work_key>
Port <port_number>
Host personal
AddKeysToAgent yes
HostName <personal_host_name>
User <personal_user_name>
PreferredAuthentications publickey
IdentityFile ~/.ssh/<personal_key>
Port <port_number>
$ echo "Host work
AddKeysToAgent yes
HostName <work_host_name>
User <work_user_name>
PreferredAuthentications publickey
IdentityFile ~/.ssh/<work_key>
Port <port_number>
Host personal
AddKeysToAgent yes
HostName <personal_host_name>
User <personal_user_name>
PreferredAuthentications publickey
IdentityFile ~/.ssh/<personal_key>
Port <port_number>" > ~/.ssh/config
$ ssh-add <ssh_key_name>
In case you need to remove it, you can do:
$ ssh-add -D
$ rm -rf ~/.ssh/*
You should create a root folder called repos
, and inside of it, create two new folders.
work
- This folder you'll have all your work repositoriespersonal
- This folder you'll have all your personal repositories
Edit your git config file, and create two new ones for each of the folders above.
~/.gitconfig
[includeIf "gitdir:~/repos/work/"]
path = ~/repos/work/.gitconfig
[includeIf "gitdir:~/repos/personal/"]
path = ~/repos/personal/.gitconfig
~/repos/work/.gitconfig
[user]
email = [email protected]
name = Your Name
~/repos/personal/.gitconfig
[user]
email = [email protected]
name = Your Name
To clone any repository now, public or private, use this command:
git clone git@<your_host_name>:<remote_repository_name>
If the git repository tells you to clone like this: [email protected]:nodejs/node.git
You should use this command instead:
git clone git@work:nodejs/node.git
or
git clone git@personal:nodejs/node.git
$ git config --show-origin --get user.email
This is just one piece of my open personal notes collection, where I'm mapping out all my knowledge. If you're keen on checking out other topics, give this a click: official dev-notes