Skip to content

Instantly share code, notes, and snippets.

@wrkhenddher
wrkhenddher / flask_issue.py
Created November 1, 2023 14:37
Werkzeug LintMiddleware w/Flask
# Pretty much lifted from https://github.com/pallets/flask/issues/2992
#
# To test:
# $ export FLASK_APP=flask_issue.py
# $ python -m flask run
# $ curl -v http://127.0.0.1:5000/streamingerror
# Notice how respose is 200 but still truncated
from flask import Flask, Response
from werkzeug.middleware.lint import LintMiddleware
LS_COLORS='no=00;37:fi=00:di=00;33:ln=04;36:pi=40;33:so=01;35:bd=40;33;01:'
export LS_COLORS
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
export CLICOLOR=1
@wrkhenddher
wrkhenddher / pre-commit 2.21.0
Last active January 12, 2024 19:04
Homebrew pre-commit 2.21.0 (3.x.x breaks with existing .pre-commit-config.yaml)
```shell
$ brew tap-new $USER/local--pre-commit
```
```shell
Initialized empty Git repository in /opt/homebrew/Library/Taps/henddher/homebrew-local--pre-commit/.git/
`.pre-commit-config.yaml` config file not found. Skipping `pre-commit`.
[main (root-commit) 5f52df2] Create henddher/local--pre-commit tap
3 files changed, 90 insertions(+)
create mode 100644 .github/workflows/publish.yml