Skip to content

Instantly share code, notes, and snippets.

View koron's full-sized avatar
🐱
meow

MURAOKA Taro koron

🐱
meow
View GitHub Profile
@koron
koron / upgrade-llama
Created August 24, 2026 09:29
Fedora 44 (Ryzen 5950X + Rademon 7600 XT) でllama.cpp を更新・ビルド・インストールに使ってるスクリプト 2026/08/08 版
#!/usr/bin/env bash
set -euo pipefail
SRCDIR="/home/koron/work/llama.cpp"
PREFIX="/opt/llama.cpp"
export HIPCXX="$(hipconfig -l)/clang"
export HIP_PATH="$(hipconfig -R)"
@koron
koron / generate-index.md
Last active August 23, 2026 11:48
A skill to generate an OKF `index.md` file for a specific directory.
name generate-index
description Generates or updates an OKF (v0.2) compliant index.md file for a specified directory. Useful for contextualizing workspace structure for AI agents.
argument_pattern ^@?([a-zA-Z0-9_-]+/?)+$
tags
okf
documentation
index
workspace
tools
file_search
read_file
write_file
@koron
koron / edit.ts
Created August 7, 2026 14:02
OpenCodeのeditツールが頻繁に失敗するものだから、代替のツールをGemini Flashに作ってもらった。~/.config/opencode/tools/に配置して、OpenCodeを再起動すれば使える。
import { tool } from "@opencode-ai/plugin"; // OpenCodeのプラグインSDK
import * as fs from "fs";
export default tool({
description: "Modify existing files using flexible string replacements (ignores minor whitespace/indentation mismatches).",
args: {
path: tool.schema.string().describe("The path to the file to edit"),
oldString: tool.schema.string().describe("The exact text to replace"),
newString: tool.schema.string().describe("The text to replace it with"),
},
@koron
koron / upgrade
Last active June 26, 2026 09:07
Upgrade script: ggml-org/llama.cpp
#!/usr/bin/env bash
#
# A script that downloads and extracts the Windows CUDA 13.x release (ZIP) from
# the latest release of https://github.com/ggml-org/llama.cpp.
# It places the ZIP file in `../distfiles` (relative to the script's directory)
# and extracts it into `../{zip_basename}/`.
# Additionally, it creates a symbolic link from `../current` to
# `../{zip_basename}`.
# Finally, it deletes previously downloaded ZIP files and their extracted
# directories, keeping only the three most recent ones.
@koron
koron / copy_fail_commentary.py
Created April 30, 2026 12:58
Commentary of copy fail
#!/usr/bin/env python3
import os
import zlib
import socket
def d(x):
return bytes.fromhex(x)
# invalid option level: 279
@koron
koron / support-fullscreen-for-gtk.diff
Last active April 20, 2026 13:37
GTKの gvim で go+=s のフルスクリーンを有効化するパッチ。フルスクリーン化直後に textarea の再描画が即時に行われないことが不満で提出してない。なんかイベントの処理タイミングが遅延し、何かキーを押すかしばらく待つまで反映されない。
diff --git a/src/gui.c b/src/gui.c
index 8673ec8d8..0260409b4 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -158,7 +158,7 @@ gui_start(char_u *arg UNUSED)
gui_gtk_init_socket_server();
#endif
-#ifdef FEAT_GUI_MSWIN
+#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)
@koron
koron / SFCSRAMBackup-19930502.txt
Last active April 4, 2026 01:56
This is an old code that was printed a long time ago, scanned, and then OCR'd and modified. The Japanese text in the code has been translated into English.
100 ' Super Family Computer
110 ' SRAM Back up program ver 2.00
120 ' (on MSA selected SRAM by SW)
130 ' `93/5/2(SAT)
140 ' programed by KoRoN
150 '
160 CLEAR200,&HB000:DEFINTA-Z:DIMS(13)
170 SCRENO,,1:COLOR14,0,0:KEYOFF
180 AD=&HD000:DEFUSR=AD:DEFUSR1=AD+2
190 FORI=0TO2:READA$,B$:A=LEN(A$):B=0
@koron
koron / Makefile
Created February 28, 2026 15:13
pending prepared を使うと httpfs + parquet の呼び出しが失敗する例
DUCKDB_DIR=../duckdb-go-bindings/lib/windows-amd64
#DUCKDB_DIR=../duckdb-go-bindings/lib/linux-amd64
#DUCKDB_DIR=../duckdb-go-bindings/lib/darwin-arm64
CFLAGS=-I${DUCKDB_DIR} -DDUCKDB_STATIC_BUILD
LDLIBS= \
-lduckdb_static \
-lautocomplete_extension \
-lcore_functions_extension \
-licu_extension \
@koron
koron / Makefile
Created February 27, 2026 15:12
This is a C example of DuckDB that accesses parquet files on a server that does not return Content-Length to the HEAD method. By linking it to the pre-built library included in duckdb/duckdb-go-bindings and running it, we can confirm that the library itself is free of defects.
DUCKDB_DIR=../duckdb-go-bindings/lib/windows-amd64
#DUCKDB_DIR=../duckdb-go-bindings/lib/linux-amd64
#DUCKDB_DIR=../duckdb-go-bindings/lib/darwin-arm64
CFLAGS=-I${DUCKDB_DIR} -DDUCKDB_STATIC_BUILD
LDLIBS= \
-lduckdb_static \
-lautocomplete_extension \
-lcore_functions_extension \
-licu_extension \
@koron
koron / Makefile
Created February 27, 2026 14:16
C (MSYS2 + UCRT64) で duckdb を使って Content-Length を返さないサーバーの parquet にアクセスしてみた
LDLIBS=-lduckdb
main: main.c
clean:
rm -f *.o
rm -f main