Code Snippet Weekly

Useful code snippets you can use today. | 2026-09-04

THE BIG ONE

Let’s Use the Emergent CSS random() Function in all the Browsers — Excited about the upcoming CSS random() function? This article dives into creating a polyfill that allows you to use random() in all browsers today. The gotcha? Understanding how to handle fallback scenarios is crucial—especially in browsers that don't support CSS variables. Read more here →

QUICK HITS

Markdown Tricks for Cleaner Docs — Enhance your documentation with Markdown's full potential! From custom styles to embedding images, these tips will make your docs cleaner and more engaging. Check it out →

Stop Calling ccusage on Every Prompt — Discover how to build a caching mechanism for a hook that reduces unnecessary calls, keeping your system efficient and responsive. The key takeaway? A slight delay can greatly enhance performance. Learn more →

vue3-pdf-export: Streamlining PDF Generation — Tired of messy PDF generation in Vue 3? This open-source package simplifies the process of creating PDFs directly from HTML, saving you time and effort. Just remember to handle asynchronous operations correctly! Explore this tool →

Python Async Programming: Master the Basics — Get a grip on async programming with Python. Learn how to write async functions and effectively use asyncio to manage slow I/O operations concurrently. A must for building responsive applications! Dive in here →

ONE THING TO TRY

Check out the random() function in CSS by implementing it with the new polyfill. Experiment with random colors or sizes in your styles today!

Happy coding! Keep pushing the boundaries of your projects with these snippets and tips. Until next week!

Get this in your inbox every week

Subscribe for Free →