Skip to content

Instantly share code, notes, and snippets.

View cookernetes's full-sized avatar

Henry cookernetes

  • Gifted Social
  • United Kingdom
  • 10:32 (UTC +01:00)
View GitHub Profile
@cookernetes
cookernetes / stripe_payload_hook_integration.ts
Last active January 27, 2023 22:16
Stripe + Payload CMS Integration for easy product management :)
import { CollectionBeforeChangeHook } from "payload/types";
import Stripe from "stripe";
export const syncWithStripe: CollectionBeforeChangeHook = async ({
operation,
data,
originalDoc,
}) => {
const stripe = new Stripe(process.env.T_STRIPE_SECRET!, {
apiVersion: "2022-11-15",
@tjsudarsan
tjsudarsan / Change CRLF to LF to all Files.md
Last active July 24, 2025 06:28
Change End of Line Sequence from CRLF to LF to all files in the project for supporting ESLint

Converting the End of Line Sequence from CRLF to LF in any of your project files

Execute the following commands in your root of your project folder

NOTE: Do not do the following steps without commiting your data. As it clears all the git cache and it will clear all your changes in your project.

  1. First disable the autoCRLF in the git config by running the following command in your terminal git config core.autocrlf false

  2. Then remove the cached files in the git. Run the following command:

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 26, 2025 07:13
Conventional Commits Cheatsheet