Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Jochen Wersdörfer",
"label": "Resident Vibe coder",
"picture": "https://example.com/photo.jpg",
"email": "jochen-jsonresume@wersdoerfer.de",
"phone": "(123) 456-7890",
"url": "https://wersdoerfer.de/jochen/",
"summary": "Freelance software developer specializing in data science, machine learning, and Django-based web development.\n\n",
"location": {
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
@ephes
ephes / stadion.md
Last active January 7, 2026 10:05
Stadion-Gewinnspiel

Stadion-Gewinnspiel / Live-Farbsteuerung (50k Clients) – Optionen, Machbarkeit, offene Punkte

Zielbild / Anforderungen (aus dem Chat abgeleitet)

  • Bis zu 50.000 Smartphones gleichzeitig im Stadion.
  • Admin klickt im Dashboard → sofortige “Live”-Kontrolle (Farbwechsel / Muster / Gewinner grün).
  • Akzeptable End-to-End-Latenz: ≤ 10 Sekunden (1 Minute ist zu viel).
  • Ideal: gleichzeitige Wahrnehmung (“alle werden gelb/rot”), keine hörbaren/visuellen Asynchronitäten.
  • PWA bevorzugt (kein nativer App-Zwang), funktioniert über WLAN und/oder LTE/5G.
  • Gewinnerlogik: “alle Farbe X, aber einige wenige sind grün”.
# STORAGE CONFIGURATION
# ------------------------------------------------------------------------------
AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY")
AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME")
AWS_AUTO_CREATE_BUCKET = True
AWS_QUERYSTRING_AUTH = False
AWS_S3_REGION_NAME = "eu-central-1"
AWS_S3_SIGNATURE_VERSION = "s3v4"
import base64
import pytest
from django.urls import reverse
from saml2 import server
from saml2.config import Config as PysamlConfig
@pytest.fixture(scope="session")
sequenceDiagram
participant IDP as Identity Provider
actor User as User (Principal)
participant Django as Django App (Service Provider)
User ->>+ Django: Access login page
Django -->>- User: Display login form with SSO button
User ->>+ Django: Click SSO login button
Django ->>+ IDP: Redirect to IdP for login
IDP -->>- User: Display login form
@ephes
ephes / dict.py
Created February 21, 2024 23:20
Memory usage __dict__ vs __slots__
import string
import random
long_key = "a_key_with_a_very_long_name_"
class Test:
def __init__(self):
for i in range(20):
v = "".join(random.choices(string.ascii_lowercase, k=20))
def blog_to_podcast(blog, content_type):
exclude = {"id", "page_ptr_id", "page_ptr", "translation_key"}
kwargs = {
f.name: getattr(blog, f.name)
for f in Blog._meta.fields
if f.name not in exclude
}
kwargs["slug"] = f"new_{blog.slug}"
kwargs["content_type"] = content_type
kwargs["new_itunes_artwork"] = blog.itunes_artwork
http:
routers:
{{ fqdn }}-web-router:
rule: "{{ traefik_host_rule }}"
entryPoints:
- web
middlewares:
- redirect
service: {{ fqdn }}-web