Skip to content

Instantly share code, notes, and snippets.

@enerqi
enerqi / decompression.py
Created April 17, 2025 16:37
Litestar Brotli Decompression Middleware v1
from typing import ClassVar, cast
import brotli
from litestar.datastructures import Headers, MutableScopeHeaders
from litestar.enums import CompressionEncoding
from litestar.middleware import AbstractMiddleware
from litestar.types import HTTPRequestEvent, Receive, ReceiveMessage, Scope, Send
class BrotliDecompressionMiddleware(AbstractMiddleware):
@enerqi
enerqi / fsharp-fable-tips.md
Last active January 27, 2025 07:23
Fable F# Notes

Basic Tooling Setup

Fable is an F# language to javascript compiler powered by Babel.

F# is a language that runs on a Microsoft CLR. Using the .NET Core CLR implementation it works on Windows, Mac or Linux.

F# Linux

  • .NET Core SDK - download the latest 2.1 SDK
  • Mono - mono-complete package
  • F# compiler - fsharp package from the mono repository