Skip to content

Instantly share code, notes, and snippets.

@kidonng
kidonng / surfingkeys.js
Last active July 24, 2026 09:39
Surfingkeys settings
const {
addSearchAlias,
mapkey,
} = api
const $ = selector => document.querySelector(selector)
addSearchAlias('a', 'AI Mode', 'https://www.google.com/search?udm=50&q=')
mapkey('\\', 'Toggle Sidebar', function() {
($('.gem-menu-item-icon') || $('[aria-label="Open sidebar"]')).click()
@kidonng
kidonng / move-codex-project.ts
Created May 22, 2026 17:25
Deno script to move Codex project
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run --allow-env
import { join } from "jsr:@std/path";
const [oldCwdArg, newCwdArg] = Deno.args;
if (!oldCwdArg || !newCwdArg) {
console.error(`
Usage:
deno run --allow-read --allow-write --allow-run --allow-env move-codex-project.ts <old-cwd> <new-cwd>
#! /usr/bin/env bash
# More info at: https://github.com/elitak/nixos-infect
set -e -o pipefail
makeConf() {
# Skip everything if main config already present
[[ -e /etc/nixos/configuration.nix ]] && return 0
/* eslint-disable @typescript-eslint/restrict-plus-operands */
import stripIndent from 'https://esm.sh/strip-indent'
// https://sw.kovidgoyal.net/kitty/conf/#the-color-table
const ansi = [
'black',
'red',
'green',
'yellow',
'blue',
import {extname} from 'path'
import {build, stop} from 'esbuild'
import {solidPlugin} from 'esbuild-plugin-solid'
import {denoPlugin} from 'esbuild_deno_loader'
const [input] = Deno.args
const ext = extname(input)
const compileOutput = input.replace(ext, '.compiled.js')
const bundleOutput = input.replace(ext, '.bundle.js')