Skip to content

Instantly share code, notes, and snippets.

@tkalus
tkalus / app.py
Created March 13, 2022 22:15
Flask render markdown with live-reload
#!/usr/bin/env python3
"""
Render a markdown file into HTML via Flask app on localhost.
Includes live-reload using HTTP long polling and a bit of vanilla JS.
Made pretty with https://picocss.com
[1]$ pip install Flask Flask-Caching Flask-Markdown requests
[1]$ flask run
[2]$ open http://localhost:5000/README.md
@tkalus
tkalus / envelope.py
Created August 10, 2024 22:11
PDF for printing envelopes with a addresses
#!/usr/bin/env python3
"""
Print to and return addresses on envelopes from a toml input file.
---
Requires:
- Python 3.11.x or later; tomllib support
- Pycairo - https://pypi.org/project/pycairo/
"""
@tkalus
tkalus / init.sh
Last active August 14, 2024 00:05
Golang crypto.Signer from Cert/Key pair stored in AWS Secrets Manager with tests
#!/bin/sh
go mod init example.com/signer
go mod tidy
go test ./...