Skip to content

Instantly share code, notes, and snippets.

View martianboy's full-sized avatar
👽

Abbas Mashayekh martianboy

👽
  • Rechat
  • Toronto, Canada
View GitHub Profile
@martianboy
martianboy / front-dev-server.py
Last active August 29, 2015 14:01 — forked from dustingetz/serve.py
A quick http server for static files with no-cache headers that comes handy for front-end development.
#!/usr/bin/env python3
import argparse
from http.server import SimpleHTTPRequestHandler, test
class MyHTTPRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
self.send_header("Pragma", "no-cache")
self.send_header("Expires", "0")