Skip to content

Instantly share code, notes, and snippets.

@swerder
swerder / 10-prepare-env.sh
Created May 18, 2026 05:37
zskarte nginx config to wrap password protected wms source incl caching
#!/bin/sh
set -e
if [ -z "${WMS_SECURE_DOMAIN}" ]; then
echo "ERROR: WMS_SECURE_DOMAIN is required"
exit 1
fi
export LOGIN_COMMENTED=""
if [ "${WMS_NO_LOGIN}" = "1" ]; then
export LOGIN_COMMENTED="#"
if [ "${WMS_CACHE_DISABLED}" = "1" ]; then
@swerder
swerder / FileUploadRequestHandler.py
Last active November 18, 2024 00:26 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python3
"""HTTP Server with auth and Upload.
This module builds on SimpleHTTPRequestHandler,
implements simple Authentication, use ssl
full "multipart" rfc2046 handling,
multi file upload, create folder and delete files,
TableView file listing with icon/size/date
from bones7456: https://github.com/bones7456/bones7456/blob/master/SimpleHTTPServerWithUpload.py / https://gist.github.com/UniIsland/3346170