Skip to content

Instantly share code, notes, and snippets.

View gaslitbytech's full-sized avatar

David Micallef gaslitbytech

  • Montage Software
  • based in Melbourne Australia
View GitHub Profile
@gaslitbytech
gaslitbytech / gist:ac78f9e61b956d69293e
Last active August 29, 2015 14:06
Melbourne django School Windows Powershell Commands
(school) PS C:\Users\Dave\Documents\Projects\MelbDjango\wibble> history
Id CommandLine
-- -----------
1 cd C:\Users\Dave\Documents\Projects
2 mkdir MelbDjango
3 cd .\MelbDjango
4 python
5 pip
6 C:\Python27\Scripts\pip.exe
from requests_oauthlib import OAuth2Session
from flask import Flask, request, redirect, session, url_for
from flask.json import jsonify
import os
from uuid import uuid4
#from urlparse import urlparse, urljoin
app = Flask(__name__)
# This information is obtained upon registration of a new GitHub OAuth
@gaslitbytech
gaslitbytech / listen_sqla.py
Created August 8, 2017 01:32 — forked from dtheodor/listen_sqla.py
Listen for pg_notify with SQL Alchemy + Psycopg2
import select
import datetime
import psycopg2
import psycopg2.extensions
from sqlalchemy import create_engine, text
engine = create_engine("postgresql+psycopg2://vagrant@/postgres")