Skip to content

Instantly share code, notes, and snippets.

View HarleySalas's full-sized avatar
🎯
Focusing

Harley Salas HarleySalas

🎯
Focusing
View GitHub Profile
@HarleySalas
HarleySalas / cache.ts
Created December 15, 2024 16:30
Combine React's cache with Next's unstable_cache, with a simpler API
import { cache as reactCache } from 'react'
import { unstable_cache as nextCache } from 'next/cache'
type CacheOptions = {
revalidate?: number | false
tags?: string[] | ((...args: any[]) => string[])
}
/**
* Combines React's cache (for deduping requests) with Next.js unstable_cache (for persistent caching).
@r1tsuu
r1tsuu / bump-payload.ts
Last active April 28, 2025 15:25
script to bump all Payload 3.0 related packages versions to latest.
/**
* Place this to ./src/scripts/bump-payload.ts
* Then in your package.json add script:
* "bump-payload": "tsx ./src/scripts/bump-payload.ts ./package.json && pnpm i"
* Run `pnpm bump-payload`
*/
import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
@Geczy
Geczy / readme.md
Last active June 30, 2025 06:55
Migrate Coolify to a new server