Skip to content

Instantly share code, notes, and snippets.

View knil-sama's full-sized avatar
💭
Nothing really

Clement Demonchy knil-sama

💭
Nothing really
View GitHub Profile
@sbaltus
sbaltus / TroubleShooting PG
Last active January 18, 2018 15:59
Useful administration queries
-- Lock management
https://wiki.postgresql.org/wiki/Lock_Monitoring
SELECT relname,
mode,
relation,
database,
pid,
query
FROM pg_locks
@gnilchee
gnilchee / http_multithreaded.py
Last active March 12, 2024 13:54
Multi-threaded Python3 HTTP Server
#!/usr/bin/env python3
import sys, os, socket
from socketserver import ThreadingMixIn
from http.server import SimpleHTTPRequestHandler, HTTPServer
HOST = socket.gethostname()
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer):
pass