Skip to content

Instantly share code, notes, and snippets.

View claytonchew's full-sized avatar

Clayton Chew claytonchew

View GitHub Profile
@claytonchew
claytonchew / keymap.json
Created May 2, 2026 09:47
Zed keymap.json coming from neovim user
[
// =========================
// GLOBAL KEYBINDINGS
// =========================
{
"bindings": {
// pane navigation
"ctrl-h": "workspace::ActivatePaneLeft",
"ctrl-l": "workspace::ActivatePaneRight",
"ctrl-k": "workspace::ActivatePaneUp",
@claytonchew
claytonchew / simplify.ts
Created March 13, 2025 16:55
Typescript utility for simplifying an object or array type recursively to its most basic representation
/**
* Simplifies an object or array type recursively to its most basic representation.
*
* @example
* // Complex nested type
* type Complex = Array<
* SerializeObject<{
* data: Array<SerializeObject<{ date: number } & { name: string } & { amount: number }>>;
* metadata: { date: Date } & { name: string } & { amount: number };
* }>
@claytonchew
claytonchew / countries.json
Created February 15, 2025 14:10
List of countries, with name, iso3, iso2, numeric, region, emoji, etc.
[
{
"name": "Aruba",
"iso3": "ABW",
"iso2": "AW",
"numeric": "533",
"iso3166-2": "ISO 3166-2:AW",
"phonePrefix": "+297",
"emoji": "🇦🇼",
"currencyCode": "AWG",