Skip to content

Instantly share code, notes, and snippets.

View champl0o's full-sized avatar
🇺🇦

Roman champl0o

🇺🇦
  • Lviv. Ukraine
View GitHub Profile
@champl0o
champl0o / settings.json
Created October 24, 2022 17:38
VSCode settings
{
"workbench.iconTheme": "material-icon-theme",
"editor.tabSize": 2,
"vsicons.dontShowNewVersionMessage": true,
"workbench.colorTheme": "Abyss",
"tabnine.experimentalAutoImports": true,
"editor.inlineSuggest.enabled": true,
"editor.tokenColorCustomizations": {
"[Abyss]": {
"textMateRules": [
@champl0o
champl0o / work-with-multiple-github-accounts.md
Created September 22, 2023 18:16 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.

How to deploy a Rails 7.1 app with Postgres and Kamal on a single server

I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.

rails new kamal_pg --css tailwind --skip-test --database=postgresql

cd kamal_pg