Skip to content

Instantly share code, notes, and snippets.

View nishimura's full-sized avatar

Satoshi Nishimura nishimura

View GitHub Profile
@nishimura
nishimura / CLAUDE.md
Last active August 14, 2025 06:56
Configuring the project-reminder tag to behave like the system-reminder tag

CLAUDE.md

about project-reminder tag

Tool results and user messages may include <project-reminder> tags. <project-reminder> tags contain useful information and reminders. They are NOT part of the user's provided input or the tool result.

@nishimura
nishimura / claude-format-check.sh
Created July 1, 2025 08:05
Blank check hooks for Claude Code
#!/bin/bash
# Format check and fix script for Claude
# Fixes files according to CLAUDE.md formatting rules
# Hooks-compatible version - Can be auto-executed on PostToolUse events
# When called via hooks (JSON is passed via stdin)
if [ ! -t 0 ]; then
# Read JSON from stdin
json=$(cat)

Claude向けドキュメント作成ルール

このドキュメントは、プロジェクトのドキュメントを作成・更新する際の絶対的なルールです。

【最重要】Claudeが理解しやすい形式で書く

ドキュメントの目的

// ドキュメントの判断基準
<?php
/*
COPYRIGHT
Copyright 2007 Sergio Vaccaro <sergio@inservibile.org>
This file is part of JSON-RPC PHP.
JSON-RPC PHP is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<?php
// @see https://github.com/Bit-Wasp/bitcoin-lib-php
$xpcoin_mainnet_public = '0277f374';
$xpcoin_mainnet_private = '0277ef39';
$xpcoin_mainnet_version = '4b';
$xpcoin_testnet_public = '042f6fbd';
$xpcoin_testnet_private = '042f6859';
$xpcoin_testnet_version = '6f';
@nishimura
nishimura / db4blkindex.php
Last active January 9, 2018 11:52
Search Block Index by PHP5
<?php
// needs: PHP5, db4.so
// from oracle web site
//
// php db4blkindex.php <XP_data_directory> [<block hash suffix>]
error_reporting(-1);
#!/usr/bin/env bash
set -ue -o pipefail
export LC_ALL=C
DATETIME=`date +"%Y%m%d%H%M%S"`
USER=""
if [ $# -ge 1 ]; then
case "$1" in

Keybase proof

I hereby claim:

  • I am nishimura on github.
  • I am nishimura (https://keybase.io/nishimura) on keybase.
  • I have a public key whose fingerprint is 0D72 4534 492C E975 7EF1 5BB0 9125 8F45 C103 C2A5

To claim this, I am signing this object:

@nishimura
nishimura / Reload.hs
Created March 8, 2012 02:48
Reloading feature copied from yesod.
{-# LANGUAGE ScopedTypeVariables #-}
--
-- Copied from Yesod
-- see http://www.yesodweb.com/
--
module Reload (main, develLoop) where
-- reload
import Control.Concurrent (forkIO, threadDelay)
import qualified Control.Exception as Ex
@nishimura
nishimura / commit-msg
Created December 3, 2010 06:51
Add issue id to commit message.
#!/bin/bash
BRANCH=$(git symbolic-ref HEAD)
if [ "$BRANCH" == "refs/heads/master" ]; then
echo "cannot commit on master branch."
echo "please commit on topic branch."
exit 1
fi
grep '^refs #[0-9]\+: ' $1