Snippets

Useful code snippets and guides. Copy, paste, and adapt to your needs!
Istio Gateway API Setup in Kubernetes
Complete guide for Istio Gateways with Kubernetes Gateway API, Cert-Manager and TLS. Terraform setup, HTTPRoutes and Let's Encrypt integration.
kubernetesistio
Zod coerceArray - TypeScript Schema Validation for Arrays
Zod helper function to transform single values and arrays into a consistent array format. Perfect for flexible API validation with TypeScript.
zodvalidationtypescript
Drizzle ORM MySQL JSON Parser Fix - pnpm Patch Guide
Fix JSON parsing issues in Drizzle ORM with MySQL. Complete patch guide for proper JSON data type handling using pnpm.
patchdrizzle
Docker Compose PostgreSQL Setup for Local Development
Quick PostgreSQL Docker Compose setup for local development. Simple database configuration with Docker for development environments.
docker
Text Truncating with CSS - Single and Multi-line
CSS snippets for truncating text with ellipsis. Simple and multi-line text truncation using text-overflow and line-clamp.
css
Drag & Drop Files and Folders in Browser - JavaScript Guide
Implement drag & drop for files and complete directories using the File System API. Complete tutorial with TypeScript and fallbacks.
jstsdrag-and-drop

© 2025 - Alexander Friesen