Skip to content

Instantly share code, notes, and snippets.

View Abdur-rahmaanJ's full-sized avatar
🛰️
Python, for the love of it!

Abdur-Rahmaan Janhangeer Abdur-rahmaanJ

🛰️
Python, for the love of it!
View GitHub Profile
@AkiraKito
AkiraKito / polymorphic_model.py
Created March 8, 2012 21:40
Polymorphic model with SQLAlchemy
# -*- coding: utf-8 -*-
from sqlalchemy import Column, String, Integer, ForeignKey, create_engine
from sqlalchemy.orm import sessionmaker, relation
from sqlalchemy.ext import declarative
engine = create_engine('sqlite:///:memory:')
Session = sessionmaker(bind=engine)
session = Session()
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream