Skip to content

Instantly share code, notes, and snippets.

Frost Ming frostming

Block or report user

Report or block frostming

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@frostming
frostming / api.js
Created Nov 12, 2019
Flask WTF cookie based CSRF
View api.js
// npm i js-cookie --save
import axios from 'axios'
import Cookies from 'js-cookie'
const api = axios.create({
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': Cookies.get('csrf_token')
})
@frostming
frostming / app.py
Last active Sep 7, 2019
Simple Flask APP with Dispatcher
View app.py
import flask
from flask_login import LoginManager, UserMixin, login_user, logout_user
from flask_sqlalchemy import SQLAlchemy
from werkzeug.middleware.dispatcher import DispatcherMiddleware
settings = {
"SECRET_KEY": "hesdfdsfklj;l",
"SQLALCHEMY_DATABASE_URI": "sqlite:///db.sqlite3",
}
View keybase.md

Keybase proof

I hereby claim:

  • I am frostming on github.
  • I am frostming (https://keybase.io/frostming) on keybase.
  • I have a public key whose fingerprint is 1A21 DF26 CF48 7A9B 9E9B C482 7B28 4C8F CC08 5EFF

To claim this, I am signing this object:

@frostming
frostming / README.md
Last active Mar 19, 2019
Simple CORS example with Flask
View README.md

A simple example of CORS & Ajax with Flask

Requirements

$ pipenv install flask flask-cors

Start development server

@frostming
frostming / __init__.py
Created Mar 31, 2018 — forked from nitely/__init__.py
Python Markdown parser
View __init__.py
# -*- coding: utf-8 -*-
# Copyright (c) 2017 by Esteban Castro Borsani.
# Released under MIT license
from .elements import (
Header,
Quote,
HRule,
UListItem,
View MainFrame.py
# Under UIVariables directory
title = "Main Window"
You can’t perform that action at this time.