Skip to content

Instantly share code, notes, and snippets.

@kiliman
kiliman / SKILL.md
Created February 12, 2026 18:09
Guiding Meditation Skill: Have your AI Assistant generate a relaxing meditation session and audio file using ElevenLabs
name description
guiding-meditation
MUST be used when creating guided meditation sessions with emotion markup for TTS. Generates intimate, loving meditation practices focused on connection with emotion tags for V3 voice models. Includes breathing exercises, body awareness, and relationship visualization. Triggers on: meditation, guided meditation, mindfulness, relaxation session, breathing exercise, stress relief, calm down, meditate together, couples meditation, mindfulness practice, relaxation, zen session.

Guiding Meditation

Generate intimate, loving guided meditation sessions with emotion markup for advanced TTS voice models.

When to Use

@kiliman
kiliman / cleanup-local-branches.sh
Last active October 9, 2025 21:48
Cleanup local branches after closing PR
#!/bin/bash
# Display help message
show_help() {
echo "Usage: $0 [options]"
echo ""
echo "This script cleans up or archives Git branches based on their PR status."
echo ""
echo "Options:"
echo " --help Show this help message and exit."
@kiliman
kiliman / add-host.sh
Last active October 8, 2025 01:36
Use Caddy to debug production site
#!/bin/bash
set -e
SCRIPT_DIR=$(dirname "$(realpath "$0")")
sudo bash "$SCRIPT_DIR/update-hosts" add "$1" "127.0.0.1"
sudo bash "$SCRIPT_DIR/update-hosts" add "$1" "::1"
@kiliman
kiliman / codemesh-log.md
Created October 3, 2025 19:06
CodeMesh Log file showing 3-step workflow plus augmentation

CodeMesh Session Log

New Session - 20:20:16

Version: 0.2.4

20:20:20 - discover-tools

Duration: 4.4s
Status: ✅ Success

Request

No arguments

@kiliman
kiliman / entry.server.tsx
Last active June 3, 2025 09:37
Setup Sentry.io with Remix
const env = getEnvVars();
function myTracesSampler(samplingContext: SamplingContext) {
// Don't trace healthcheck or HEAD requests
const { transactionContext } = samplingContext;
if (
transactionContext.name === 'routes/healthcheck/_index' ||
transactionContext.tags?.method === 'HEAD'
) {
return false;
@kiliman
kiliman / ts2js.sh
Last active April 7, 2025 18:01
Script to convert TypeScript files to JavaScript
#!/bin/bash
# Check if the correct number of arguments is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 source_folder target_folder"
exit 1
fi
source_folder="$1"
target_folder="$2"

Configure HTTP/2 on express with Remix

Remix uses <link rel="modulepreload"/> on client-side JavaScript.

I thought it would be cool to setup HTTP/2 on express to enable pipelining the script files.

Add spdy package, then update server.js to setup server.

Generate self-signed SSL certificate and copy to ./certs folder.

@kiliman
kiliman / README.md
Last active March 26, 2025 23:44
Debug server-side Remix using VSCode

💡 HOWTO: Debug your server-side Remix code using VSCode

✨ New in Remix v1.3.5

The latest release of Remix fixes sourcemaps so you no longer need to use any hacks to set breakpoints in your route modules. Simply start the debugger and Remix will hit the breakpoint in your loaders and actions.

Debugging session even survives edits and Live Reload.

@kiliman
kiliman / index.tsx
Created February 7, 2023 21:31
Remix `useSubmitPromise` hook
import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import type { SubmitOptions } from "@remix-run/react";
import { useActionData, useNavigation, useSubmit } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
export function loader({ request }: LoaderArgs) {
return json({ message: "Hello World" });
}
@kiliman
kiliman / types.ts
Created August 11, 2023 14:43
Type helpers
export type MakeOptional<Type, Key extends keyof Type> = Omit<Type, Key> &
Partial<Pick<Type, Key>>;
export type PickNullable<T> = {
[P in keyof T as null extends T[P] ? P : never]: T[P];
};
export type PickNotNullable<T> = {
[P in keyof T as null extends T[P] ? never : P]: T[P];
};