Skip to content

Instantly share code, notes, and snippets.

View kentcdodds's full-sized avatar
🤓
working hard to make the world better with software

Kent C. Dodds kentcdodds

🤓
working hard to make the world better with software
View GitHub Profile
@kentcdodds
kentcdodds / README.md
Created September 7, 2026 16:21
Devin + Kody issue

Right—the clone won’t have production request logs. I was considering a live Cloudflare log stream, but I don’t have that tooling set up here.

Instead, I can use a temporary localhost OAuth diagnostic proxy with Devin’s CLI. It will forward the exchange to kody.codes and report only the HTTP status and OAuth error fields—not codes, headers, or tokens. That should reveal the error Devin is currently hiding, without changing Kody or your existing MCP configuration.

The diagnostic proxy is running on localhost. I’ll start one more sign-in; please authorize it in the browser. This uses a separate temporary kody-diagnostic entry and leaves your existing kody entry unchanged.

The diagnostic attempt hit Cloudflare 403 / error 1010 (browser_signature_banned) before reaching Kody’s OAuth handler. That happened on the proxy’s registration request, so it does not yet prove the cause of Devin’s original token-exchange failure.

@kentcdodds
kentcdodds / README.md
Last active May 5, 2026 00:09
Specialist Knowledge Sources

Knowledge Source

This is for a simulation using theaiplatform.com agency.

@kentcdodds
kentcdodds / README.md
Created October 11, 2025 04:13
Unofficial, AI-generated @remix-run/dom and @remix-run/events docs

@remix-run/events and @remix-run/dom Documentation

NOTE: this was generated by Cursor from within the Remix demo using the following prompt:

Please use the example code in @public/ and the types definitions to write documentation for @remix-run/events and @remix-run/dom and stick it in a markdown file in the root of this repo.

This documentation covers two core Remix 3 packages: @remix-run/events for declarative event handling and @remix-run/dom for creating reactive UI components.

Table of Contents

@kentcdodds
kentcdodds / README.md
Last active December 5, 2025 17:20
epicshop notifications

Epicshop Notifications

This gist provides notifications for the Epicshop platform. Notifications are loaded on demand and shown to users based on specific criteria.

How Notifications Work

Notifications are defined in the notifications.json5 file. Each notification is an object with the following properties:

@kentcdodds
kentcdodds / index.js
Last active October 16, 2024 18:35
check local access to mocking workshop
#!/usr/bin/env node
import { promises as fs } from 'fs'
import { homedir } from 'os'
import path from 'path'
const homeDir = homedir()
const dataFilePath = path.join(homeDir, '.epicshop', 'data.json')
let data
@kentcdodds
kentcdodds / index.tsx
Created September 26, 2024 20:33
Hoist Title and Meta tags in React 19
import { Suspense, use, useDeferredValue, useState, useTransition } from 'react'
import * as ReactDOM from 'react-dom/client'
import { ErrorBoundary } from 'react-error-boundary'
import { useSpinDelay } from 'spin-delay'
import { getImageUrlForShip, getShip, imgSrc, searchShips } from './utils.tsx'
const shipFallbackSrc = '/img/fallback-ship.png'
function Shell() {
return (
@kentcdodds
kentcdodds / index.tsx
Created September 26, 2024 20:32
Deduplicate Title tags with React 19
import { Suspense, use, useDeferredValue, useState, useTransition } from 'react'
import * as ReactDOM from 'react-dom/client'
import { ErrorBoundary } from 'react-error-boundary'
import { useSpinDelay } from 'spin-delay'
import { getImageUrlForShip, getShip, imgSrc, searchShips } from './utils.tsx'
const shipFallbackSrc = '/img/fallback-ship.png'
function Shell() {
return (
@kentcdodds
kentcdodds / index.tsx
Created September 26, 2024 20:31
Script for Efficiently Render Script Tags in Components React 19
import {
Suspense,
use,
useDeferredValue,
useState,
useTransition,
useEffect,
useRef,
} from 'react'
import * as ReactDOM from 'react-dom/client'
@kentcdodds
kentcdodds / lifetime-contributions.js
Last active September 5, 2024 05:09
Calculate your total lifetime github contributions
// ⚠️ warning: This script was written by ChatGPT, not entirely reviewed, and is completely unmodified
// This counts your lifetime contributions so you can decide
// whether to block Twitter: https://x.com/mjackson/status/1831554887706169674
const GITHUB_API_URL = 'https://api.github.com/graphql'
// scope needed: "user:read" for public contributions and "repo" for private
// https://github.com/settings/tokens/new
const GITHUB_TOKEN = process.env.GITHUB_TOKEN
@kentcdodds
kentcdodds / screenshot-node.js
Created August 14, 2024 22:05
Create a screenshot of a DOM element (while preserving a transparent background).
const { default: html2canvas } = await import(
'https://unpkg.com/html2canvas@1.4.1/dist/html2canvas.esm.js'
)
async function captureElement(element, { scale = 1, backgroundColor = null } = {}) {
const canvas = await html2canvas(element, {
backgroundColor,
scale,
})