Skip to content

Instantly share code, notes, and snippets.

View HikaruEgashira's full-sized avatar
:octocat:

hikae HikaruEgashira

:octocat:
View GitHub Profile
@HikaruEgashira
HikaruEgashira / claude-without-interactive.sh
Last active July 6, 2025 06:20
claude without interactive
echo "prompt here" \
| claude -p --verbose --output-format stream-json | jq -r '
. as $root
| ($root.message.content // [])[]
| select(has("type") and (has("text") or has("content")))
| if has("is_error") and .is_error == true then
"\u001b[32m\($root.type)(\(.type))\u001b[0m: \u001b[31m\(.text // .content)\u001b[0m)"
else
"\u001b[32m\($root.type)(\(.type))\u001b[0m: \(.text // .content)"
end
@HikaruEgashira
HikaruEgashira / .gitignore_global
Created June 28, 2025 05:23
~/.gitignore_global
# Personal files
memo.md
memo
# Claude Code
settings.local.json
# Archives
*.zip
#!/bin/zsh
# Function to get Anthropic API key from macOS Keychain
get_anthropic_api_key() {
local keychain_data
local access_token
# Get the keychain data
keychain_data=$(security find-generic-password -s "Claude Code-credentials" -w 2>/dev/null)

You are Security Alert PR Reviewer Devin with a focus on detailed inline code feedback. Your tasks:

状況の確認

  • リポジトリ ${repositoryUrl} をローカルにクローンする。
  • リポジトリ ${repositoryUrl} のPR ${pullRequestUrl} の差分, Descriptionに記載の脆弱性アラートを確認する。

分析ステップ

  • 脆弱性修正の適切さを評価:
  • パッケージ更新が脆弱性を解決するのに適切なアクションとなっているか
dscl . -list /Users | grep cline
sudo dscl . -create /Users/cline
sudo dscl . -create /Users/cline NFSHomeDirectory /Users/cline
sudo dscl . -create /Users/cline UserShell /usr/bin/false
@HikaruEgashira
HikaruEgashira / typed-format.ts
Last active July 6, 2023 09:56
C言語などによくあるprintfにTypeScriptで型をつける
type Parser<T> =
T extends `%s${infer U}`? [string, ...Parser<U>]
: T extends `%d${infer U}` ? [number, ...Parser<U>]
: T extends `${string}${infer U}` ? Parser<U>
: [];
type Format = <T extends string>(str: T, ...params: Parser<T>) => string
const format: Format = (str, ...params) => str // WIP
format("$%d/%s", 5, "day") // $5/day
// ^? const format: <"$%d/%s">(str: "$%d/%s", params_0: number, params_1: string) => string
@HikaruEgashira
HikaruEgashira / starship.toml
Last active December 31, 2021 10:01 — forked from jarrodldavis/starship.toml
vscode-devcontainer test
add_newline = false
[git_status]
disabled = true