A collection of code snippets – including serverless functions, Node.js scripts, and CSS tricks.
Use Directus Flows to generate slugs
Subscribe to a newsletter.
Get all subscribers.
Safely get a dot-notated path within a nested object, with ability to return a default if the full key path does not exist or the value is undefined
Axios calls can get repetitive so a hook to handle it can be handy.
Send a slack webhook
Simple fetch call for Hasura
This hook allows you to detect clicks outside of a specified element.
Sometimes, you want to render a sequence of numbers.
The jsonHash function lets you define those functions directly in the json, reducing the need to create extra functions and variables.
This is a simple bash script that when passed an example, will download just that example from the Directus examples repo, handy to get started quickly with an example and build something.
Subscribe to a newsletter
SQLite is a handy database and can be a lot more powerful that it seems but it also can use some optimization to help it get there.
Quick little Astro component that uses Tailwind to animate links on hover.
Use the content-visibility property in CSS indicates to the browser whether or not an element’s contents should be rendered at initial load time, acting as a lazy load.