Skip to content
HomeBlogSnippetsAboutTweets

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.

Buttondown

Buttondown

Get all subscribers.

Buttondown

Buttondown

Subscribe to a newsletter.

CRUD API Route

CRUD API Route

For use with Next.js.

useEmailQueryParam()

useEmailQueryParam()

Parse an email from a URL.

Firebase

Firebase

Read data from Realtime Database.

Google Analytics

Google Analytics

Page views over a given range.

Google Sheets

Google Sheets

Create an entry in a sheet.

Gradient Border

Gradient Border

Create a gradient border with CSS.

Gumroad

Gumroad

Get all sales of a product in dollars.

Gumroad

Gumroad

Retrieve all sales for a user.

Loading Progress

Loading Progress

React Hook for nprogress.

Mailchimp

Mailchimp

Subscribe to a newsletter.

Mailgun

Mailgun

Send an email to a user.

MDX Table of Contents

MDX Table of Contents

For use with Next.js.

Revue

Revue

Get all subscribers.

Revue

Revue

Subscribe to a newsletter.

Search

Search

React Context hook for search values.

SendGrid

SendGrid

Send an email to a user.

Slack

Slack

Create a slash command.

Spotify

Spotify

List your top tracks.

Spotify

Spotify

Show what you're listening to.

Sticky Nav

Sticky Nav

Create a fixed navbar.

Stripe

Stripe

Accept a payment.

Update MDX Meta

Update MDX Meta

Change last updated time.

YouTube

YouTube

Get channel statistics.


HomeAboutNewsletter
TwitterGitHub
SnippetsTweets