Snippet Catalogue
Curated and community verified programming code passages ready for practice.
TypeScript Generic LRU Cache
High-performance O(1) doubly linked LRU eviction cache
React useDebounce Custom Hook
Generic debounce hook with cleanup timer in TypeScript
Async Connection Lock Context
Thread-safe asynchronous resource lease with exception cleanup
Rust Port Parser with Result
Robust configuration value parsing using Rust Result and match
C++ Thread-Safe Queue Push
Modern C++ std::lock_guard with condition variable notification
Java Stream Collector Grouping
Filter and collect transaction totals by currency using modern Java Streams
Responsive CSS Grid with MinMax
Fluid responsive auto-fit grid layout without media queries
SQL Window Function with CTE
DENSE_RANK partition query ranking top typists per language
Bash Timestamped Tar Archive
Safe shell script with exit on error and timestamped gzip archive
Express Typed Rate Limit Middleware
In-memory token bucket rate limiter middleware in Express/TypeScript
Next.js Typed Server Action
Server Action with revalidatePath and safe response schema in Next.js
Vue 3 Composition API Composable
Ref, computed, and reactive state management in Vue 3
Svelte 5 Universal State Rune
Modern Svelte 5 $state and $derived reactive typing
NestJS Injectable Auth Service
NestJS injectable service with constructor injection and async validation