BlogSnippetsGitHub

Code Snippets

These are a collection of code snippets I've used in the past and share in the case that someone else finds them useful.

next-cookie-crud

next-cookie-crud

A simple util to perform CRUD operations on cookies in Next.js environment.

Google OAuth2

Google OAuth2

Google OAuth2 client for Node.js.

Razorpay

Razorpay

Collect payments.

useVisibility()

useVisibility()

Check if an element is in viewport.

Validate Name

Validate Name

RegExp to validate the input of a person's name.