Skip to content

Instantly share code, notes, and snippets.

View thiskevinwang's full-sized avatar

Kevin Wang thiskevinwang

View GitHub Profile
@thiskevinwang
thiskevinwang / cimd.txt
Last active August 28, 2026 14:00
OAuth Client ID Metadata Documents (CIMD)
https://chatgpt.com/oauth/codex/client.json
https://chatgpt.com/oauth/CrXSqmg5eT2O/client.json
https://claude.ai/oauth/claude-code-client-metadata
https://claude.ai/oauth/mcp-oauth-client-metadata
https://nousresearch.github.io/hermes-agent/docs/oauth/client-metadata.json
@thiskevinwang
thiskevinwang / instructions.md
Created January 31, 2026 16:19
Codex CLI v0.93.0 Instructions

You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.

General

  • When searching for text or files, prefer using rg or rg --files respectively because rg is much faster than alternatives like grep. (If the rg command is not found, then use alternatives.)

Editing constraints

  • Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
  • Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
@thiskevinwang
thiskevinwang / ._README.md
Last active July 12, 2024 17:15
cognito_test

Description

A .ts script to output information about a Cognito user pool. This uses the V3 JS client to call describe-user-pool

This is simply one means, amongst many, to fetch user pool info.

Setup

user@~: $ mkdir cognito_test
@thiskevinwang
thiskevinwang / main_test.go
Created November 17, 2023 13:45
go-bench
// benchmarking two flavors of logging
//
// run with `go test -benchmem -bench=.`
//
// Example output:
// ----------------------------------------------------------
// goos: darwin
// goarch: arm64
// pkg: go-benchmarks
// BenchmarkLogPlain-10 3548698 332.0 ns/op 64 B/op 2 allocs/op
@thiskevinwang
thiskevinwang / boost.js
Last active October 2, 2023 21:20
Arc Boost — Click to copy GitHub PR title as richtext link to Clipboard
function copyToClip(str) {
function listener(e) {
e.clipboardData.setData("text/html", str);
e.clipboardData.setData("text/plain", str);
e.preventDefault();
}
document.addEventListener("copy", listener);
document.execCommand("copy");
document.removeEventListener("copy", listener);
};
@thiskevinwang
thiskevinwang / lambda-node-code-that-streams.ts
Created May 17, 2023 13:09
lambda-node-code-that-streams
import util from "util";
import stream from "stream";
const { Readable } = stream;
const pipeline = util.promisify(stream.pipeline);
import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
export const handler = awslambda.streamifyResponse(
async (event, responseStream, context) => {
const s3 = new S3Client({ region: "us-east-1" });
@thiskevinwang
thiskevinwang / delete_github_environments.sh
Created April 1, 2023 13:12
Delete GitHub environments
#!bin/sh
# This script fetches GitHub environments and delets them
# - requires the `gh` CLI
# - requires `jq`
envs=$(gh api repos/{owner}/{repo}/environments --paginate | jq -r ".environments[].name")
for env in $envs
do
@thiskevinwang
thiskevinwang / yunmai_protocol.txt
Created June 7, 2022 05:53 — forked from pwnall/yunmai_protocol.txt
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Commands are written to GATT attribute 0xffe9 of service 0xffe5. Responses come
as value change notifications for GATT attribute 0xffe4 of service 0xffe0. These
are 16-bit Bluetooth LE UUIDs, so nnnn is 0000nnnn-0000-1000-8000-00805F9B34FB.
-----
Packet Structure
@thiskevinwang
thiskevinwang / 1_screenshot.md
Last active December 26, 2021 00:11
MDX to JSX to SWC

Screen Shot 2021-12-25 at 7 09 40 PM