Skip to content

Instantly share code, notes, and snippets.

@spekkionu
spekkionu / composer.json
Created October 9, 2014 20:07
Standalone validation using laravel validation component
{
"name": "spakkionu/validate",
"description": "Validation Test",
"require": {
"illuminate/validation": "~4.2.9"
},
"license": "MIT",
"authors": [
{
"name": "Jonathan Bernardi",
@papaeye
papaeye / test_context.py
Created May 27, 2013 09:22
Test push/pop of Flask application/request context
import unittest
from flask import Flask
from flask.globals import _app_ctx_stack, _request_ctx_stack
class TestContext(unittest.TestCase):
def setUp(self):
self.app = Flask(__name__)
@chrisguitarguy
chrisguitarguy / server.py
Created October 24, 2011 03:14
Super simple python socket server and HTTP request class.
import socket, traceback
HOST = ''
PORT = 51235
CLRF = '\r\n'
class InvalidRequest(Exception):
pass
class Request(object):