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.

My gitconfig
A snippet I use to setup the aliases and global git config on new machines.

Decoding a JWT token
Using jq to decode JWT tokens from the command line.

Custom scrollbars
It's something you easily forget, but it's easy and looks so much better.

Use trash instead of rm
Stop using rm -rf node_modules, use Trash instead.

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.