Skip to content

Instantly share code, notes, and snippets.

@wmelvin
wmelvin / turnstile.py
Created November 13, 2022 17:22 — forked from mikeckennedy/turnstile.py
Python code for server-side Cloudflare validation (paired with client-side Cloudflare code)
# See details about Turnstile at https://blog.cloudflare.com/turnstile-private-captcha-alternative/
from typing import Optional
import pydantic
import requests
cloudflare_secret_key: Optional[str] = None
#!/usr/bin/env python3
# https://docs.python.org/3/library/secrets.html
import secrets
s = secrets.token_urlsafe(15)
n1 = secrets.randbelow(len(s))
n2 = secrets.randbelow(len(s))
@wmelvin
wmelvin / links.md
Created March 12, 2022 19:28 — forked from gbritton1/links.md
PostgreSQL Functions Playbook