Skip to content

Instantly share code, notes, and snippets.

@czerasz
czerasz / varnish-jsonp.vcl
Last active November 1, 2016 20:33 — forked from simonw/varnish-jsonp.vcl
Get Varnish to handle JSONP requests - working example
backend jsonp_varnish {
.host = "localhost";
.port = "80";
}
#------------- begin jsonp functionality -------------#
# How the jsonp_template_backend dispatches to the ESI generating code:
sub jsonp_throw_error_recv {
if (req.url == "/JSONP-ESI-TEMPLATE") {
error 760;
@lrvick
lrvick / flask_geventwebsocket_example.py
Created September 1, 2011 07:17
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@mihow
mihow / _webfaction_setup.rst
Created April 26, 2011 00:21 — forked from ptone/_webfaction_setup.rst
setting up a stack on webfaction

Setting up Webfaction for modern Django deployment

last updated: 4/5/2011

note that this stuff is always a moving target, much of this has been cribbed and combined from various blog posts. Much of the information was out of date from those, and if it is more than a couple months after the last updated date above, consider some of this likely to now be out of date.