Skip to content

Instantly share code, notes, and snippets.

Diving deep into web frameworks world

Khalid Almosallamy Mosallamy

Diving deep into web frameworks world
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 February 23, 2023 11:46
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 February 26, 2023 13:51
EU RAL Color Codes lookup table represented as JSON
View RalCodes.json
"name":"Green beige",