- https://github.com/rtk-ai/rtk というやつ便利そうなので、公私ともに便利に使っていきたいぞ
- ところで rtk って安心して安全に使えるものなのか気になった
- Claude Code とか Codex が rtk ls とか rtk git したとき、コマンドラインとか、実コマンドの標準入出力を勝手に外部送信してたら困る
- 私は Rust の読み書きはできないんだな
- Codex くんに質問して読解してもらいつつ、見様見真似で Rust コード読解してみた。正直キツかった。だいぶわからなかった
- ghq get して取れた今日時点の main の HEAD の
a69935746172d913fcbd282d720d2daf5025e5e9で読解してもらった - rtk は外部送信やってなさそうな気配を感じた
- rtk がコマンド実行の統計データ保管する SQLite ファイルは、うっかり漏洩しないよう厳重保管として扱うのが安全そう
- macOS なら
"/Users/$USER/Library/Application Support/rtk/history.db"に転がってた
- macOS なら
- なんなら時々 SQLite ファイル削除するくらいでいいんじゃないかな
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HIP Library Path: C:\WINDOWS\SYSTEM32\amdhip64_7.dll | |
| build_commit,build_number,cpu_info,gpu_info,backends,model_filename,model_type,model_size,model_n_params,n_batch,n_ubatch,n_threads,cpu_mask,cpu_strict,poll,type_k,type_v,n_gpu_layers,n_cpu_moe,split_mode,main_gpu,no_kv_offload,flash_attn,devices,tensor_split,tensor_buft_overrides,use_mmap,use_direct_io,embeddings,no_op_offload,no_host,fit_target,fit_min_ctx,n_prompt,n_gen,n_depth,test_time,avg_ns,stddev_ns,avg_ts,stddev_ts | |
| "d05fe1d7d","9010","AMD Ryzen 9 3900XT 12-Core Processor ","AMD Radeon AI PRO R9700","ROCm","C:\Users\sasas\.lmstudio\models\unsloth\Qwen3.6-35B-A3B-GGUF\Qwen3.6-35B-A3B-MXFP4_MOE.gguf","qwen35moe 35B.A3B MXFP4 MoE","21695154688","34660610688","1024","512","12","0x0","0","50","q4_0","q4_0","99","0","layer","0","0","1","auto","0.00","none","1","0","0","0","0","0","0","0","256","0","2026-05-05T12:59:18Z","3346415600","19761957","76.501883","0.448819" | |
| "d05fe1d7d","9010","AMD Ryzen 9 3900XT 12-Core Processor ","AMD Radeon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # メインメモリ 64GB, NVIDIA RTX 5070 (12GB) で、VRAM に若干の安全バッファを設けつつ、cmoe を増やしても性能改善しないラインで各パラメータ指定した。 | |
| # llama-bench で cmoe, b, c を変化させつつ様子を見て決めた | |
| llama-server.exe \ | |
| -m "${USERPROFILE}\.lmstudio\models\unsloth\Qwen3.6-35B-A3B-GGUF\Qwen3.6-35B-A3B-MXFP4_MOE.gguf" \ | |
| -ngl 99 \ | |
| -ncmoe 32 \ | |
| -c 262144 \ | |
| -fa on \ | |
| --cache-type-k q4_0 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --python 3.13 --with playwright | |
| # https://health.aws.amazon.com/health/status から RSS の URL を入手する。 | |
| # 昔は curl で取れたが、JSでレンダリングを要するようになったので Playwright を使う。 | |
| # npx playwright codegen でポチポチして python library で生成したものをベースにした。 | |
| from playwright.sync_api import sync_playwright | |
| import time | |
| import re | |
| def get_all_rss_urls(): | |
| rss_urls = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ISBN 13 桁版チェックディジット計算方法 は https://www.jbpa.or.jp/nenshi/pdf/0208.pdf を参考にした | |
| { | |
| # ISBN を stdin から受け取る | |
| isbn=$1; | |
| # 電子書籍の ISBN から -10 して 13桁目を再計算した値が、紙書籍の ISBN | |
| isbn = isbn - 10; | |
| isbn_tmp = \ | |
| ((substr(isbn, 1, 1) + substr(isbn, 3, 1) + substr(isbn, 5, 1) + substr(isbn, 7, 1) + substr(isbn, 9, 1) + substr(isbn, 11, 1)) * 1) + \ | |
| ((substr(isbn, 2, 1) + substr(isbn, 4, 1) + substr(isbn, 6, 1) + substr(isbn, 8, 1) + substr(isbn, 10, 1) + substr(isbn, 12, 1)) * 3); | |
| isbn_chk_digit = 10 - (isbn_tmp % 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| # Windows版Kindleアプリは、購入済みKindle蔵書一覧をXMLファイルとしてローカルに置く。 | |
| # XML から JSON に簡易に変換できる CLI ツールとして dasel を利用している。 | |
| # https://daseldocs.tomwright.me/ | |
| # dasel は凝ったクエリは未だ jq ほどには記述できないので、 dasel からの出を jq で加工している。 | |
| # 依存ツールは scoop でインストールできる。 | |
| # sort,tr,awk,tailなどUNIXコマンドは Git Bash で入れることにしている。趣味に合わせて好きにしたらよい。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Feel free to explore, or check out the full documentation | |
| * https://docs.newrelic.com/docs/synthetics/new-relic-synthetics/scripting-monitors/writing-api-tests | |
| * for details. | |
| */ | |
| var assert = require('assert'); | |
| // Google Public DNS の API エンドポイントに投げると JSON で DNS レコードを返してくれる | |
| // https://developers.google.com/speed/public-dns/docs/doh/json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## how to use; | |
| ## get 1 domein; | |
| # $ get_dmarc_policy.sh sasasin.net | |
| # "_dmarc.sasasin.net.","reject" | |
| ## bulk get; | |
| # $ cat domain_list.txt | xargs -L1 get_dmarc_policy.sh | |
| # "_dmarc.example.com." | |
| # "_dmarc.example.net.","none" | |
| # "_dmarc.example.org.","reject" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -v | |
| BOOK_NAME=$1 | |
| # 1ファイルに結合する | |
| ls *.mp3 \ | |
| | sort -u \ | |
| | awk '{print "file " $0 "" }' \ | |
| > ${BOOK_NAME}.mp3-list.txt | |
| ffmpeg \ | |
| -f concat \ |
NewerOlder