Skip to content

Instantly share code, notes, and snippets.

View GadgetSteve's full-sized avatar

Steve (Gadget) Barnes GadgetSteve

  • Bridgend, UK
View GitHub Profile
@SteveBarnes-BH
SteveBarnes-BH / cgi-post.py
Last active November 1, 2021 12:20
CGI Debugging - sometimes you have a web page that uses CGI and you need to see what data is being POSTed.
#!/usr/bin/env python
"""
This script is based on https://cgi.tutorial.codepoint.net/file-upload but with changes as needed.
To use:
- Download the web page to be debugged.
- Edit it to replace `action="/cgi-bin/cgi-post"` with `action="/cgi-bin/cgi-post.py"` (on Windows on Linux you can simply rename this file to not have .py at the end.
- place in a cgi-bin subdirectory of the one where you saved the web page
- start a simple web server with ` python -m http.server 8001 --bind localhost --cgi`
@sloria
sloria / bobp-python.md
Last active May 12, 2024 06:54
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens