Skip to content

Instantly share code, notes, and snippets.

View abhishek72850's full-sized avatar
🏢
Working from Office

Abhishek kumar abhishek72850

🏢
Working from Office
View GitHub Profile
@chriscauley
chriscauley / makemigrations.sh
Last active January 22, 2024 08:54
Django style migrations for alembic
#!/usr/bin/env bash
# This script gives alembic django style migrations
# Revision id is auto-incremented and autogenerate is the default behavior
# Alter this line to point to migrations folder
NEXT_ID=`ls path/to/db/versions/* | grep -P '/\d{4}_.*\.py'|wc -l`
NAME=""
FLAG="--autogenerate"
function usage() {
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active June 1, 2024 11:27
Using multiple github accounts with ssh keys

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.