Skip to content

Instantly share code, notes, and snippets.

View frankV's full-sized avatar
🦑
Work Hard. Cuttlesoft.

Frank Valcarcel frankV

🦑
Work Hard. Cuttlesoft.
View GitHub Profile
@frankV
frankV / app.py
Last active February 14, 2019 07:10 — forked from mmautner/app.py
Example of caching API results w/ Flask-Restless and Flask-Cache
import json
import hashlib
from flask import Flask, request
import flask.ext.sqlalchemy
import flask.ext.cache
import flask.ext.restless
from flask.ext.restless import ProcessingException
app = Flask(__name__)
app.config['DEBUG'] = True
from flask import Flask, render_template, jsonify, request
from threading import Timer, Thread
from time import sleep
app = Flask(__name__)
@app.route("/api/<method>")
def api(method):
data = {

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt