Code Snippets
These are a collection of code snippets I've used in the past and saved. They include React hooks, TypeScript tips, random CSS snippets and Node.js scripts.
accent-color
Nice looking radios and checkboxes with native css styling
Cleaning up local branches
A bash script that deletes all local branches not found on the remote.
Git hash in Next.js
A snippet to parse the git hash from the command line and add it as an environment variable to a Next.js app.
Custom scrollbars
It's something you easily forget, but it's easy and looks so much better.
Support Ukraine banner
Add a stand with Ukraine banner using this TailwindCSS snippet
useStorage
A React hook that uses localStorage (or sessionStorage) to persist component state.