Skip to content

Instantly share code, notes, and snippets.

View dot's full-sized avatar
😇

Shuhei KONDO dot

😇
View GitHub Profile
@dot
dot / README.md
Created March 26, 2026 05:52
CotEditor as VISUAL editor for Claude Code on macOS

CotEditor as VISUAL editor for Claude Code on macOS

A wrapper script to use CotEditor as the external editor (Ctrl+G) in Claude Code on macOS.

Why this script?

  • The cot --wait command has a bug on macOS Tahoe + Ghostty that causes exit code 1
  • open --wait-apps waits for the app to quit (⌘Q), not the document to close (⌘W)
  • This script uses AppleScript to detect when the document is closed, and returns focus to the terminal immediately after
0rax/fish-bd
jethrokuan/z
rbenv/fish-rbenv
oh-my-fish/plugin-nodenv
jorgebucaran/fisher
oh-my-fish/theme-bobthefish
decors/fish-ghq
@dot
dot / .Brewfile
Last active February 9, 2025 15:28
tap "brimdata/tap"
tap "cantino/mcfly"
tap "espanso/espanso"
tap "federico-terzi/espanso"
tap "github/gh"
tap "hashicorp/tap"
tap "heroku/brew"
tap "homebrew/bundle"
tap "homebrew/services"
tap "knqyf263/pet"
0rax/fish-bd
oh-my-fish/plugin-balias
jethrokuan/z
yoshiori/fish-peco_select_ghq_repository
#dot/theme-yimmy
decors/fish-ghq
rbenv/fish-rbenv
oh-my-fish/plugin-nodenv
oh-my-fish/theme-bobthefish
@dot
dot / nfd_d.sh
Last active October 2, 2020 06:25
detect NDF file
#!/bin/sh
dir=$1
if [ ! -d "$dir" ]; then
dir='.'
fi
find "$dir" -name '*[! -~]*' | while read file
do
bstr=`basename "$file" | xxd -g1`
@dot
dot / auth_gh.sh
Created June 11, 2019 08:36
ssh auth
#!/bin/sh
set -e
userHome=$(getent passwd $(whoami) | cut -d":" -f6)
cacheFile="$userHome""/.ssh/authorized_keys_cache"
cacheValidity="300"
if [ ! -f "$cacheFile" ] || [ "$(($(date +%s) - $(stat -c %Y "$cacheFile")))" -gt "$cacheValidity" ]
then
@dot
dot / gh_release.rb
Created May 8, 2017 10:44
gh releaser
require 'octokit'
require 'pry'
require 'active_support'
require 'active_support/core_ext'
token = ENV['GH_TOKEN'] # create via https://github.com/settings/tokens
repos = 'nnh/oscr-ptosh'
matchers = [/Merge pull request \#(\d+) from/, /\(\#(\d+)\)/]
client = Octokit::Client.new(access_token: token)
@dot
dot / Gemfile
Created March 29, 2017 09:57
Gemfile
source 'https://rubygems.org'
ruby '2.3.3'
gem 'browser'
gem 'carrierwave'
gem 'cells', '~> 3.0'
gem 'crummy'
gem 'date_validator'
gem 'devise'
gem 'devise-i18n'
@dot
dot / gist:ef050dfc3e694f7f5e3adb2372cc5fbd
Last active April 11, 2016 16:26
IP Address for Alfred
#!/bin/bash
_LOCALS=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
LOCALS=(`echo ${_LOCALS}`)
#LOCAL=$(ipconfig getifaddr en0)
EXTERNAL=$(curl -4 --silent http://icanhazip.com)
LITEMS=""
for ((i=0; i<${#LOCALS[*]}; i++)) do
ITEM=$(cat <<-EOS
<item uid="localip_$i" arg="${LOCALS[i]}">
@dot
dot / README.md
Last active January 13, 2016 11:16
wkhtmltopdf test
$ wkhtmltopdf --version
wkhtmltopdf 0.12.3-dev-79ff51e (with patched qt)

$ wkhtmltopdf --print-media-type --orientation Portrait --header-html ./header.html --footer-html ./footer.html body.html out.pdf

then

Loading pages (1/6)
Counting pages (2/6)

Resolving links (4/6)