Skip to content

Instantly share code, notes, and snippets.

View laiso's full-sized avatar
☀️

laiso laiso

☀️
View GitHub Profile
@laiso
laiso / deepseek-opencode.json
Created August 28, 2025 09:35
opencode run -m deepseek/deepseek-chat hi
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"deepseek": {
"models": {
"deepseek-chat": {
"limit": {
"context": 128000,
"output": 8192
}
package com.nothinglondon.sdkdemo.demos.sushi
import android.content.Context
import com.nothing.ketchum.GlyphMatrixManager
import com.nothinglondon.sdkdemo.demos.GlyphMatrixService
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
@laiso
laiso / anth_proxy.ts
Last active July 28, 2025 16:56
anth_proxy.ts: OpenAI compatible interface for Anthropic Client.
/**
* OpenAI compatible interface for Anthropic Client.
*
* Usage:
* ANTH_PROXY_API_KEY=XXX bun run anth_proxy.ts.ts https://api.openai.com/v1/chat/completions qwen/qwen3-coder:free
* ANTHROPIC_BASE_URL=http://localhost:3000 claude -p 'write a sample code in main.ts'
*
* LICENSE: MIT
* Inspired by https://github.com/kiyo-e/claude-code-proxy
*/
import csv
import json
import sys
import ast
def find_task_by_id(filename, task_id):
with open(filename, 'r', encoding='utf-8') as file:
reader = csv.DictReader(file)
fieldnames = reader.fieldnames
id_columns = [col for col in fieldnames if 'id' in col.lower()]
@laiso
laiso / REPORT.md
Last active July 24, 2025 06:15
Cursor Background Agentsのコンテナ環境下でGUIアプリケーションの動作能力

目的

Cursor Background Agentsのコンテナ環境下でGUIアプリケーションの動作能力を検証する

実施日

2024年7月24日

検証環境

  • OS: Ubuntu 25.04 (Linux 6.12.8+)
  • 環境: CursorBackground コンテナ環境
  • Node.js: v22.15.0

Design Document

Overview

This design addresses the cursor inconsistency issue in the Settings menu, specifically after using the "Copy URL to clipboard" feature. The problem occurs when the confirmation message appears after copying, and hovering over this non-clickable element incorrectly displays a pointer cursor instead of the default cursor. This creates a misleading user experience as it suggests the element is clickable when it is not.

Architecture

The New Expensify application uses React Native for cross-platform development with React Native Web for the web implementation. Cursor styles in the web version are controlled through:

@laiso
laiso / task-agent.ts
Created July 13, 2025 13:59
A mimic of the Task Tool from Claude Code.
import Anthropic from '@anthropic-ai/sdk';
import { z } from 'zod';
import { join } from 'path';
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
// ============================================================================
// TYPE DEFINITIONS
// ============================================================================
export const TodoStatus = z.enum(['pending', 'in_progress', 'completed']);
#! /usr/bin/env node
import { execFileSync } from "node:child_process";
import { readFileSync, existsSync } from "node:fs";
import path from "node:path";
import os from "node:os";
try {
const input = JSON.parse(readFileSync(process.stdin.fd, 'utf8'));
if (!input.transcript_path) {
❯ docker run \
  --tmpfs /tmp/claude:rw,nosuid,size=1m \
  -e CREDS=$(security find-generic-password -a $USER -w -s "Claude Code-credentials") \
  -e HOME=/home/node \
  claude-code:latest sh -c '
    echo "$CREDS" > /tmp/claude/.credentials.json
    chmod 600 /tmp/claude/.credentials.json
    ln -s /tmp/claude/.credentials.json ~/.claude/.credentials.json
 claude -p hi
@laiso
laiso / Dockerfile
Last active June 22, 2025 02:15
Benchmarks CLI agents (Claude Code, Codex CLI, Goose CLI and Aider) on Exercism TypeScript programming exercises https://github.com/exercism/typescript/tree/main/exercises/practice
FROM node:22
ARG TZ
ENV TZ="$TZ"
# Install basic development tools and iptables/ipset
RUN apt update && apt install -y less \
git \
procps \
sudo \