Skip to content

Instantly share code, notes, and snippets.

@ryo-touch
ryo-touch / claude-code-windows-notification-hooks.md
Last active January 15, 2026 04:26
Claude Code 作業完了通知の設定ガイド (Windows / WSL)

Claude Code 作業完了通知の設定ガイド (Windows / WSL)

Claude Code の hooks 機能を使って、作業完了時に Windows のトースト通知を表示する設定手順です。

できること

  • 作業完了通知: Claude Code がタスクを完了したときに Windows 通知が届く
  • 入力待ち通知: 許可が必要なときや、60秒以上入力待ちのときに通知が届く
  • クロス環境対応: Windows (Git Bash) / WSL (zsh) どちらでも同じ通知が届く
@ryo-touch
ryo-touch / statusline.js
Created January 14, 2026 14:33
Claude Code statusline
#!/usr/bin/env node
// Claude Code のステータスライン設定ファイル
// 表示項目: プロジェクトディレクトリ、モデル名、コンテキスト使用率、
// Gitブランチ、セッション時間、コード編集統計、警告メッセージ
const path = require("path");
const { execSync } = require("child_process");
/**
@ryo-touch
ryo-touch / csv2tsv.sh
Last active July 16, 2024 15:16
csv2tsv.sh
#!/bin/bash
# csv2tsv.sh
# このスクリプトは、CSVファイルをTSVファイルに変換します。
# このスクリプトでできること:
# - CSVファイルをコマンドライン引数として受け取り、カンマをタブに置換します。
# - 引用符で囲まれたフィールド内のカンマは保持します。
# - 入力ファイルと同じ名前(拡張子が.tsvに変更された)のTSVファイルを生成します。
# - 入力ファイルの存在チェックや適切なエラーメッセージを提供します。
/* google_rank */
/* serpsの順位を表示する */
body {
counter-reset: result !important;
}
h3.LC20lb:before {
content: counter(result) ". " !important;
counter-increment: result !important;
@ryo-touch
ryo-touch / googleform_notify_to_slack2.js
Last active May 2, 2023 05:00
google formの回答内容も含めてslack通知する
/**
* このスクリプトの説明、使い方はこちら。
* https://myfunc.jp/items/00068/index.html
*/
function onSubmit(e) {
// SlackのWebhook URLを入力する
const slack_webhook_url = 'https://hooks.slack.com/services/hogehoge';
// フォームの項目や回答を取得する
const form_responses = e.response.getItemResponses();
@ryo-touch
ryo-touch / getLocation.js
Last active July 25, 2022 10:51
住所から緯度経度を取得するGAS
function getLocation(address) {
try {
var key = 'hoge(GCP_key)';
var requestUrl = "https://maps.googleapis.com/maps/api/geocode/json?key=" + key + "&address=" + address; // Google Geocoding API
var json = UrlFetchApp.fetch(requestUrl);
var result = JSON.parse(json);
if ( result['status'] === 'ZERO_RESULTS' ) { return '住所エラー'; }
var location = result['results'][0]['geometry']['location'];
return [ [ location['lat'] , location['lng'] ] ];
@ryo-touch
ryo-touch / macbook-settings.sh
Created January 27, 2022 06:45
mac購入後に設定したい項目
# mac購入後に設定したい項目
# 参考
# https://qiita.com/ryuichi1208/items/5905240f3bfce793b33d
# ブート時のサウンドの無効化 (寂しい気もしますが煩いので消しています)
sudo nvram SystemAudioVolume=" "
# フリーズすると自動的に再起動
sudo systemsetup -setrestartfreeze on
@ryo-touch
ryo-touch / git-basic-operation.sh
Last active February 20, 2022 01:55
gitの基本操作をメモ
# リポジトリのディレクトリで実行する
# 具体的には /.git の存在するディレクトリ
# 確認方法
$ pwd # カレントディレクトリを表示
$ ls - a # 隠しファイルを表示する
# 指定したファイルをstagingにadd
$ git add hogehoge
# すべての変更ファイルをstagingにaddする
@ryo-touch
ryo-touch / settings.js
Last active December 14, 2022 05:04
vscodeのsettings.jsonファイル
{
// ================
// general settings
// ================
"workbench.startupEditor": "newUntitledFile",
"workbench.editor.languageDetection": false,
"workbench.statusBar.visible": true,
"workbench.colorTheme": "Monokai Pro (Filter Ristretto)", // ワークベンチで使用される配色テーマを指定
"workbench.iconTheme": "Monokai Pro (Filter Ristretto) Icons", // ワークベンチで使用されるファイル アイコン テーマを指定
"workbench.tree.indent": 20,
-- =============================================================================
-- ユーティリティ関数
-- =============================================================================
-- キーイベントを生成する関数
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)