Skip to content

Instantly share code, notes, and snippets.

View jeromecovington's full-sized avatar

Jerome Covington jeromecovington

View GitHub Profile
@jeromecovington
jeromecovington / curl-in-brief.md
Last active November 10, 2021 21:05
Curl in brief

Basic

curl https://www.keycdn.com

Returning only the HTTP headers of a URL

curl -I https://www.keycdn.com
@jeromecovington
jeromecovington / revalidate.ts
Created February 8, 2023 13:48
NextJS on-demand revalidation endpoint
import { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (
!req.query.revalidate_token ||
!process.env.REVALIDATE_TOKEN ||
req.query.revalidate_token !== process.env.REVALIDATE_TOKEN
@jeromecovington
jeromecovington / Sanity_GROQ_Examples.md
Last active January 27, 2025 17:07
Sanity Schema Design and GROQ Query Examples

Sanity Schema Design and GROQ Query Examples

This document provides schema design examples and corresponding GROQ queries for various use cases. It’s a practical guide for developers to get familiar with GROQ querying and the basics of Sanity schema design.


Query to Get All Top-Level Types

Use the following query to retrieve a list of all unique top-level types in your dataset:

@jeromecovington
jeromecovington / nvchad-keymap-guide.md
Last active October 10, 2025 20:24
NvChad keymap guide

NvChad Keymap Guide

Insert Mode Shortcuts

  • Ctrl + b: Move to beginning of line
  • Ctrl + e: Move to end of line
  • Ctrl + h/j/k/l: Move left / down / up / right (respectively)

Normal Mode Window Navigation