将 Codex 生命周期事件通过 Bark 推送到手机,并在 Hammerspoon 菜单栏中提供开关。
codex_mobile_notify.py:Codex hook 与通知命令。config.json:通知规则与 Bark 地址。发布的版本不含个人信息。hammerspoon.lua:菜单栏开关。
将 Codex 生命周期事件通过 Bark 推送到手机,并在 Hammerspoon 菜单栏中提供开关。
codex_mobile_notify.py:Codex hook 与通知命令。config.json:通知规则与 Bark 地址。发布的版本不含个人信息。hammerspoon.lua:菜单栏开关。| # write this file to | |
| # .codex/sub2api.config.toml | |
| # use by: `codex --profile sub2api`. | |
| model_provider = "sub2api" | |
| model = "gpt-5.6-terra" | |
| model_reasoning_effort = "medium" | |
| disable_response_storage = true | |
| network_access = "enabled" | |
| windows_wsl_setup_acknowledged = true |
Claude Code 默认走 Anthropic API。如果你有 OpenCode Go 订阅,可以用它来跑 Claude Code,享受 opencode-go 的极低价格和模型选择(如 deepseek-v4)。
| #!/usr/bin/env bash | |
| export ANTHROPIC_BASE_URL=http://127.0.0.1:4000 | |
| export ANTHROPIC_AUTH_TOKEN=unused | |
| export ANTHROPIC_MODEL=deepseek-v4-flash | |
| export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro | |
| export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-flash | |
| export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash | |
| export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash | |
| exec claude "$@" --dangerously-skip-permissions |
| #!/bin/bash | |
| # Read JSON input from stdin | |
| input=$(cat) | |
| # Extract information from JSON | |
| model_name=$(echo "$input" | jq -r '.model.display_name') | |
| current_dir=$(echo "$input" | jq -r '.workspace.current_dir') | |
| # Extract context window information |
place the following content to /Users/sam/.codex/prompts/plan.md
$INSTRUCTIONS
Follow the instructions given by the user. You have to come up with a plan first, User will review the plan and let you know what to change or ok to proceed. You can record the plan using your own way like using the todo tool, but in additional, give user a text version of the plan to read. Only start implementing after getting the approval.
| # golang 编译cgo时需要的环境变量 | |
| export LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -L/usr/local/homebrew/opt/ruby@2.7/lib" | |
| export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" # Needed for Rust compilation and linking | |
| export CPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" | |
| export CGO_LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" | |
| export CGO_CFLAGS="-F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -Wno-nullability-completeness" | |
| export GOROOT="/usr/local/go" | |
| export GOBIN=~/go_bin | |
| export PATH=$PATH:$GOBIN |
| /** | |
| type v10 struct { | |
| data [10]byte | |
| } | |
| //函数参数,指针 | |
| //当struct大小在1K时,指针传递(无拷贝)快1个数量级。低于1K差别不大 | |
| func BenchmarkPointer10In(b *testing.B) { | |
| var v v10 |
| vscode-gist>error: extension.gist.create > Requires authentication |
| //to fix this issue, you can add this to ~/.bashrc: | |
| // | |
| // export CPATH=`xcrun --show-sdk-path`/usr/include | |
| npm ERR! #include <errno.h> | |
| ~/dev/my/outline-apps[master]$ npm install -g iconv | |
| npm ERR! code 1 |