Skip to content

Instantly share code, notes, and snippets.

View peaceroad's full-sized avatar

k_taka peaceroad

  • Gijutsu-Hyoron Co., Ltd.
  • Japan
  • X @k_taka
View GitHub Profile
@peaceroad
peaceroad / check-lf.mjs
Created July 15, 2026 05:24
~/.agents/check-lf.mjs — a small Node.js utility for native Windows environments that verifies specified text files use LF (\n) line endings and reports CRLF or bare CR. It is intended for final line-ending checks from ~/.codex/AGENTS.md without scanning unrelated workspace files.
import { readFile } from "node:fs/promises";
const paths = [
...new Set(
process.argv
.slice(2)
.filter((value) => value !== "--"),
),
];
@peaceroad
peaceroad / AGENTS.md
Last active July 19, 2026 11:13
~/.codex/AGENTS.md for using Codex in a native Windows environment. It covers Windows path references, LF (\n) line-ending checks, and complete loading of SKILL.md files and required references, with loading rules designed around functions.exec’s default 10,000-token output limit.

Windows local file references

  • In Windows chat responses, reference local files with absolute drive-letter paths.
  • For workspace files you edited or reviewed, and for text files under configured writable roots when the link is likely to open in the editor, prefer Markdown file links with C:/... targets. Never use /C:/....
  • Do not link WindowsApps paths, executables, or other system-managed paths.
  • Add line numbers only when they are already known and relevant.

Writable-root file deletion

  • When deleting files under configured writable roots, prefer apply_patch; shell deletion may be blocked even when other file writes succeed.
@peaceroad
peaceroad / mastodon4-webui-customize.md
Last active October 4, 2023 10:36
PCで見ると、Mastodon 4のWebUIが余白が取られ過ぎていて、一覧しにくい問題に対応する

PCで見ると、Mastodon 4のWebUIが余白が取られ過ぎていて、一覧しにくい問題に対応する

特にタイムラインの各投稿の上下の余白がバージョン3系と比べて大きいです(該当issue)。これは以下の手順で調整できます。

  1. ページのスタイル(CSS)を修正できる、ブラウザ拡張の https://github.com/openstyles/stylus/ を導入する。

  2. Mastodon用のスタイル修正CSSが配布されているので、https://userstyles.world/style/7065/compacter-mastodon を導入する。

  3. 自分のMatodonサーバーでも使えるように以下のように修正する(該当サーバーのドメインを加える形になります)。

この文書は、2018年7月6日にMastodonの開発者であるEugen Rochkoさんが公式ブログに執筆した「Cage the Mastodon - An overview of features for dealing with abuse and harassment」を翻訳してみたものです。意訳していますので、正確に読む場合には原文を参照してください。 なお、原文と同じく、CC BY-SA 4.0のもとで提供されます。翻訳時点(2020年5月)でMastodonはすでにバージョン3.1.4がリリースされています。


Mastodonの檻 - 誹謗や嫌がらせに対処するための機能の概要