Skip to content

Instantly share code, notes, and snippets.

View EwetoyeIbrahim's full-sized avatar
🌈
Thinking

Ewetoye Ibrahim EwetoyeIbrahim

🌈
Thinking
View GitHub Profile
@EwetoyeIbrahim
EwetoyeIbrahim / GoogleCloudDecisionTree.svg
Last active May 14, 2022 14:14
Unofficial Google Cloud Decision Tree
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EwetoyeIbrahim
EwetoyeIbrahim / EscrowV1.sol
Last active June 28, 2022 13:31
Solidity in Easy Steps: Escrow Contract
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
/**
* @title EscrowSol
* @dev Manages fund transfers between two parties
*/
contract EscrowSol {
// Wallet address of the payer
@EwetoyeIbrahim
EwetoyeIbrahim / flask_application_around_an_existing_database
Created July 19, 2021 21:00
Showing how to feed a Flask application with an existing database
from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
# --------- Configurations ------------
class Config:
# Change to your Database_URI, here we are using sqlite database
# Note that postgres URI looks like 'postgresql://UserName:password@host:port/DatabaseName'
@EwetoyeIbrahim
EwetoyeIbrahim / flask_subdomains_from_same_blueprint.py
Last active July 19, 2021 19:58
How to create multiple subdomains from the same flask blueprint
# -*- coding: utf-8 -*-
"""
Showing how to reuse a blueprint for several subdomain
"""
from flask import Flask, Blueprint
app = Flask(__name__)
"""
Note that for subdomains to work reliably, the SERVER_NAME config
variable has to be set. The full syntax is host:port