Skip to content

Instantly share code, notes, and snippets.

@chiller
chiller / Readme.md
Last active June 11, 2023 11:04
ab benchmark file upload
@laksa19
laksa19 / SimpleHTTPServerWithUpload.py
Last active April 7, 2022 15:05 — forked from amdei/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload and MultiThreading support
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.1"
__all__ = ["SimpleHTTPRequestHandler"]
@Dufgui
Dufgui / gist:72debe81068bf3ecd7d8
Last active April 25, 2023 14:34 — forked from eduardocardoso/gist:82a629882ddb02ab3677
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@phrawzty
phrawzty / 2serv.py
Last active January 21, 2026 12:21
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@pankajp
pankajp / serve_http.py
Last active February 19, 2026 10:41
Simple Python HTTP Server with multi-threading and partial-content support
#! /usr/bin/env python
# Standard library imports.
from SocketServer import ThreadingMixIn
import BaseHTTPServer
import SimpleHTTPServer
import sys
import json
import os
from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext,