
Code Snippets &
Prompt Lab
Production-tested React hooks, AI engineering prompts, utility functions, and design patterns. Every snippet is battle-tested in real projects. Copy, paste, ship.
12+
Snippets
5
Categories
7+
Languages
100%
Copy Ready
Explore Snippets
Production-tested hooks, prompts, and utility functions.
Stop all tasks in an ECS cluster via AWS CLI
A bash one‑liner that lists every task in a given ECS cluster (handling pagination) and stops them safely with the AWS CLI.
Read Excel file row‑by‑row in Go with excelize
Shows how to stream an .xlsx file row by row using the official excelize library, safe for large files.
Read Excel rows efficiently in Go with excelize streaming
Shows how to open an .xlsx file and stream each row using excelize/v2, ideal for large files.
Enforce case‑consistent imports to fix TS type‑checking on Linux vs macOS
Turn on strict casing and linting so the same TypeScript code compiles without errors on case‑sensitive Linux and case‑insensitive macOS.
FastAPI async SQLAlchemy session dependency
Provides a clean async DB session dependency for FastAPI using SQLAlchemy 2.0, eliminating manual session cleanup.
Bash script to rotate AWS IAM access keys safely
Automates creating a new IAM access key, validates it, updates the local AWS credentials file, and deletes the old key with full error handling.
Express TypeScript Token Bucket Rate Limiter Middleware
A production‑ready middleware that enforces per‑IP request limits using a token‑bucket algorithm, fully typed for Express 6+.
Robust Bash S3 Sync with Retries and Checksum Verification
A production‑ready Bash script that syncs a local folder to S3, verifies each upload with checksums, and automatically retries failures using exponential backoff.
React useIntersectionObserver Hook with TypeScript
Detect when a DOM element enters the viewport for lazy‑loading or infinite scroll. Handles cleanup, optional freeze‑once‑visible, and graceful fallback when IntersectionObserver isn’t supported.
CSS Hide Scrollbar
A universal CSS class to hide the scrollbar while allowing scrolling.
Vercel Ignore Build Step
Bash script to ignore Vercel builds if no relevant files have changed.
GitHub Actions Node.js CI
A fast GitHub Actions workflow for caching and testing Node.js applications.
Stay Ahead of the Curve
Get our weekly digest of production blueprints, deep-dive benchmarks, and architectural audits delivered directly to your inbox.
Join 5,000+ engineers. No spam, ever.