Skip to content

Instantly share code, notes, and snippets.

View w3cj's full-sized avatar
🌱

CJ w3cj

🌱
View GitHub Profile
@w3cj
w3cj / settings.json
Created July 24, 2025 20:43
Claude - Block npm / npx
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./.claude/use-pnpm-hook.sh"
}
/* eslint-disable node/no-process-env */
import type { ZodObject, ZodRawShape } from "zod";
import { ZodError } from "zod";
export default function tryParseEnv<T extends ZodRawShape>(
EnvSchema: ZodObject<T>,
buildEnv: Record<string, string | undefined> = process.env,
) {
try {
// Run this command to generate base config and vs code settings:
// pnpm dlx @antfu/eslint-config@latest
import antfu from "@antfu/eslint-config";
export default antfu({
type: "app",
typescript: true,
formatters: true,
stylistic: {

Next.js Starters

A list of CLI generators, starter kits / boilerplates and toolkits to kick start your Next.js apps.

  • What is included in this list:
    • Has ~1K+ Github stars
    • Actively maintained / up to date
    • Includes a style / css solution or UI Framework
    • Includes a database
  • Includes authentication / authorization

Coding Garden - Currently Working On

If these notes are out of date, please let me know in the twitch chat, and I will update them!

Today:

Working on lots of random channel related things today:

  • Calendar
  • View the schedule on twitch: cdg.sh/schedule | View the calendar on google: cdg.sh/calendar | Download the calendar ics: cdg.sh/ics
version: '3.7'
services:
db:
image: mongo:4
restart: always
volumes:
- ./docker-data/db:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
// resources: https://del.dog/v/edypeginge.js
// https://www.hackerfactor.com/blog/?/archives/432-Looks-Like-It.html
// https://sharp.pixelplumbing.com/api-output#raw
// https://github.com/AndrewLaneX/photohash/blob/master/photohash/photohash.py#L22-L32
const fs = require('fs');
const sharp = require('sharp');
async function averageHash(filePath, hashSize = 8) {
const buffer = await fs.promises.readFile(filePath);