Sheet ⁨05⁩ · ⁨Code snippets⁩Surveyed ⁨2026⁩
Category
4Snippets

Backend

Upload Files to AWS S3 with Pre-Signed URLs in Node.js

Upload Files to AWS S3 with Pre-Signed URLs in Node.js

Routing file uploads through your API server is the default that nobody questions, and it is usually the wrong one. The bytes travel to your compute, sit in memory or a temp file, then travel again to

Python Dataclass Patterns: Slots, Frozen Instances, and Field Validation

Python Dataclass Patterns: Slots, Frozen Instances, and Field Validation

Quick Tip Reach for @dataclass(slots=True, frozen=True) with a post_init check and you get a small, immutable, validated value object in about five lines. The Problem The problem

Node.js Environment Variable Validation with Zod at Startup

Node.js Environment Variable Validation with Zod at Startup

Most Node.js apps treat process.env like a trusted friend. You reach into it whenever you need a value, assume the key is there, assume it's spelled right, and assume the string is actually the type

Redis Caching Patterns: Cache-Aside, Write-Through & Cache Invalidation

Redis Caching Patterns: Cache-Aside, Write-Through & Cache Invalidation

Need to scale your backend without throwing money at servers? Start with Redis caching patterns. Most databases can handle hundreds of queries per second, but thousands? Your app slows to a crawl