727
you are viewing a single comment's thread
view the rest of the comments
[-] diaphragmwp@discuss.tchncs.de 6 points 2 days ago* (last edited 2 days ago)

The first two are frameworks, the third is:

def serve(p: int, f):
    s = socket.socket()
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # let me reset plz
    s.bind(("", p))
    s.listen()
    while True:
        c, a = s.accept()
        c.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
        t = threading.Thread(target=serve0, args=(c, a, f))
        t.daemon = True
        t.start()

I have an entire file of some really cursed malicious compliance code for when I was brutally forced to write Python.

[-] Aatube@lemmy.dbzer0.com 2 points 1 day ago

I notice the absolute absence of "index.html"

[-] diaphragmwp@discuss.tchncs.de 1 points 1 day ago* (last edited 1 day ago)

There are a few XHTML pages and templates later in the file hardcoded into single strings. Some stuff is populated from markdown (or was it gemtext? don't feel like opening it again). I used XHTML because it's easier to notice escaping mistakes.

this post was submitted on 22 Oct 2026
727 points (96.8% liked)

Programmer Humor

33756 readers
2573 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS