Skip to content

Instantly share code, notes, and snippets.

View mariomui's full-sized avatar

Mario Mui mariomui

View GitHub Profile
@magma-chili
magma-chili / Output a table of notes with a particular heading and the heading's content 📌.md
Last active August 3, 2023 15:44
🪑 Table of notes with a particular heading and the heading's content 📌
Error in user YAML: Alias parsing is not enabled.
---
title: &title "Output a table of notes with a particular heading and the heading's content"
UUID: &UUID 7fa1055a-f5bf-4d85-b3d6-32e4a3c2105b
alias:
  - *title
  - *UUID
created: 2023-04-26T04:31:24
---

%%

@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",