Skip to content

Instantly share code, notes, and snippets.

View alexwaters's full-sized avatar
💭
Shaving Yaks

Alex Waters alexwaters

💭
Shaving Yaks
View GitHub Profile
@agronholm
agronholm / gist:7249102
Last active October 27, 2017 14:41
Alternative Flask SQLAlchemy extension
from sqlalchemy.engine import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.orm.session import sessionmaker
class SQLAlchemy:
def __init__(self, app=None):
if app is not None:
self.init_app(app)
@rduplain
rduplain / gist:4980944
Created February 18, 2013 21:31
SysV Init script for supervisord, running as a production user 'garcon'. Run supervisorctl as 'garcon'.
#! /bin/sh
# /etc/init.d/supervisord
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: process supervisor
### END INIT INFO