A collection of code snippets – including serverless functions, Node.js scripts, and CSS tricks.
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.
Quick little Astro component that uses Tailwind to animate links on hover.
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.
Subscribe to a newsletter
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.
The jsonHash function lets you define those functions directly in the json, reducing the need to create extra functions and variables.
Sometimes, you want to render a sequence of numbers.
This hook allows you to detect clicks outside of a specified element.
Simple fetch call for Hasura
Send a slack webhook
Axios calls can get repetitive so a hook to handle it can be handy.
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
Get all subscribers.
Subscribe to a newsletter.
Use Directus Flows to generate slugs