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.

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.

accent-color
Nice looking radios and checkboxes with native css styling

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

useStorage
A React hook that uses localStorage (or sessionStorage) to persist component state.

Cleaning up local branches
A bash script that deletes all local branches not found on the remote.

Support Ukraine banner
Add a stand with Ukraine banner using this TailwindCSS snippet

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

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

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