Skip to content
Ekam Singh
AboutThoughts

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

YouTube

Get channel statistics.

Update MDX Meta

Update MDX Meta

Change last updated time.

Stripe

Stripe

Accept a payment.

Sticky Nav

Sticky Nav

Create a fixed navbar.

Spotify

Spotify

Show what you're listening to.

Spotify

Spotify

List your top tracks.

Slack

Slack

Create a slash command.

SendGrid

SendGrid

Send an email to a user.

Search

Search

React Context hook for search values.

MDX Table of Contents

MDX Table of Contents

For use with Next.js.

Mailgun

Mailgun

Send an email to a user.

Mailchimp

Mailchimp

Subscribe to a newsletter.

Loading Progress

Loading Progress

React Hook for nprogress.

Gumroad

Gumroad

Retrieve all sales for a user.

Gumroad

Gumroad

Get all sales of a product in dollars.

Gradient Border

Gradient Border

Create a gradient border with CSS.

Google Sheets

Google Sheets

Create an entry in a sheet.

Google Analytics

Google Analytics

Page views over a given range.

Firebase

Firebase

Read data from Realtime Database.

useEmailQueryParam()

useEmailQueryParam()

Parse an email from a URL.

CRUD API Route

CRUD API Route

For use with Next.js.

Buttondown

Buttondown

Subscribe to a newsletter.

Buttondown

Buttondown

Get all subscribers.


Not Playing

–

Spotify

HomeAboutNewsletter
TwitterGitHubYouTube
UsesGuestbookSnippetsTweets