Skip to content

Instantly share code, notes, and snippets.

View kidharb's full-sized avatar

Kidhar Bachan kidharb

  • Johannesburg, South Africa
View GitHub Profile
@toonetown
toonetown / webserver
Last active September 7, 2022 21:11
A quick-and-dirty python web server
#!/usr/bin/python3
import http.server, ssl, argparse, re
from tempfile import mkdtemp
from shutil import rmtree
from contextlib import contextmanager
from os.path import exists, join, abspath
@contextmanager
def TemporaryDirectory():
name = mkdtemp()