Skip to content

Instantly share code, notes, and snippets.

@sveniu
sveniu / client.py
Created April 26, 2023 07:08
httpbin-like client to test CDN caching and stale-while-revalidate
#!/usr/bin/env python3
import sys
import time
import urllib.request
from threading import Thread
class fgcolor:
green = "\x1b[32;20m"
@sveniu
sveniu / server.py
Created April 26, 2023 07:08
httpbin-like server with extra capabilities like delayed errors
#!/usr/bin/env python3
import json
import sys
import time
from http.server import BaseHTTPRequestHandler, HTTPServer, ThreadingHTTPServer
from pathlib import Path
from urllib.parse import parse_qs, urlparse
sessions = {}
### Keybase proof
I hereby claim:
* I am sveniu on github.
* I am sveniu (https://keybase.io/sveniu) on keybase.
* I have a public key ASCXcAeocUehdWNzStzoljv_TXj41zGMm5ANzeg6kkaL3wo
To claim this, I am signing this object:
#!/bin/sh
# Enumerate all interrupts used by either the default or a specified
# network interface, and map them to separate CPUs. Each CPU that gets
# assigned interrupts will also have its C-states deeper than C1
# disabled to reduce the probability of rx queue overflow.
#
# TODO: NUMA interrupt scheduling.
#