Skip to content

Instantly share code, notes, and snippets.

View dbist's full-sized avatar

Artem Ervits dbist

View GitHub Profile
@dbist
dbist / psycopg2_cheatsheet.md
Created April 16, 2020 16:52 — forked from pfigue/psycopg2_cheatsheet.md
psycopg2 Cheatsheet

Connect and Select

connect()

The shortest connect:

from psycopg2 import connect
psql_conn = connect("dbname=XXX user=XXX password=XXX host=localhost sslmode=require")
psql_conn.close()
@dbist
dbist / keep_fork_updated_with_master.md
Last active April 29, 2019 15:03 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com: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