Skip to content

Instantly share code, notes, and snippets.

View Mosallamy's full-sized avatar
🤿

Khalid Almosallamy Mosallamy

🤿
View GitHub Profile
@TonyFrancis
TonyFrancis / MultiTenantFlask.py
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
Rajeshr34 / wkhtmltopdf.sh
Last active February 28, 2024 17:08
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
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases
#replace arch
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
@edwinwebb
edwinwebb / RalCodes.json
Last active February 26, 2023 13:51
EU RAL Color Codes lookup table represented as JSON
{
"1000":{
"code":"1000",
"name":"Green beige",
"rgb":"205-186-136",
"hex":"#CDBA88"
},
"1001":{
"code":"1001",
"name":"Beige",