Code Snippets
These are a collection of code snippets I've used in the past and saved. Some are Serverless Functions, which include set up instructions. Others are anything from random CSS snippets to Node.js scripts.
YouTube
Get channel statistics.
Update MDX Meta
Change last updated time.
Stripe
Accept a payment.
Sticky Nav
Create a fixed navbar.
Spotify
Show what you're listening to.
Spotify
List your top tracks.
Slack
Create a slash command.
SendGrid
Send an email to a user.
Search
React Context hook for search values.
MDX Table of Contents
For use with Next.js.
Mailgun
Send an email to a user.
Mailchimp
Subscribe to a newsletter.
Loading Progress
React Hook for nprogress.
Gumroad
Retrieve all sales for a user.
Gumroad
Get all sales of a product in dollars.
Gradient Border
Create a gradient border with CSS.
Google Sheets
Create an entry in a sheet.
Google Analytics
Page views over a given range.
Firebase
Read data from Realtime Database.
useEmailQueryParam()
Parse an email from a URL.
CRUD API Route
For use with Next.js.
Buttondown
Subscribe to a newsletter.
Buttondown
Get all subscribers.