Skip to content

Instantly share code, notes, and snippets.

View Mosallamy's full-sized avatar

Khalid Almosallamy Mosallamy

View GitHub Profile
TonyFrancis /
Created May 18, 2017 04:48
Creating multi Tenant system with multiple Database. Switching between databases based on subdomain related to tenant
from functools import wraps
from flask import Flask, g, session, request, abort, jsonify
from flask_migrate import MigrateCommand, Migrate
from flask_script import Manager
from flask_sqlalchemy import SQLAlchemy
flask_app = Flask(__name__, static_folder='./static')
db = SQLAlchemy()
migrate = Migrate()
Rajeshr34 /
Last active July 8, 2024 05:42
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#replace arch
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
edwinwebb / RalCodes.json
Last active July 15, 2024 14:29
EU RAL Color Codes lookup table represented as JSON
"name":"Green beige",