Skip to content

Instantly share code, notes, and snippets.

View duz-sg's full-sized avatar
🏠
Working from home

Du Zheng duz-sg

🏠
Working from home
View GitHub Profile
@vulcan25
vulcan25 / run.py
Last active January 11, 2023 13:52
psycopg2 flask implementation with connection pooling support
from flask import Flask, g, jsonify
import werkzeug, os
from werkzeug.utils import secure_filename
import psycopg2
from psycopg2 import pool
def get_db():
print ('GETTING CONN')
if 'db' not in g:
@loziju
loziju / macosx-configure-postfix-as-relay.md
Last active April 4, 2025 12:03
Configure postfix as relay for OS X