Skip to content

Instantly share code, notes, and snippets.

View richardkmichael's full-sized avatar

Richard Michael richardkmichael

  • 22:49 (UTC -07:00)
View GitHub Profile
@richardkmichael
richardkmichael / 0-README.md
Last active August 11, 2026 05:26
Claude Code voice dictation on macOS — Karabiner tap-to-talk, terminal Option-as-Alt, system-audio muting

Claude Code voice dictation — macOS terminal + Karabiner

Tap right Option in Alacritty or Ghostty to toggle Claude Code voice dictation; speaker output mutes while recording so the mic doesn't catch speaker audio. Escape cancels without submitting.

A bare modifier tap never reaches a terminal app, and voice:pushToTalk takes a single keystroke, so Karabiner converts a solo right-Option tap to Option+z.

Option-as-Alt terminal configuration sends that as Alt+z, which Claude Code has bound to voice:pushToTalk in tap mode — the binding is opt+z because Claude Code sees only the Alt+z

# Go to the sesssion transcripts.
$ pwd
/Users/rmichael/.claude/projects/-Users-rmichael-Documents-Personal-Source-claude-skill-fork-development/
# Transcript files for demo session
$ ls -1R 98b3b2c6-913f-485f-b3ef-cc12c6479e87*
98b3b2c6-913f-485f-b3ef-cc12c6479e87.jsonl
98b3b2c6-913f-485f-b3ef-cc12c6479e87:
subagents
@richardkmichael
richardkmichael / .blade.yml
Last active March 5, 2021 16:39
Sprockets 3.6 CoffeeScript processor with sourcemaps.
load_paths:
- src
logical_paths:
- simple.js
build:
logical_paths:
- simple.js
path: dist
@richardkmichael
richardkmichael / pickle-jsonPickle.py
Created February 6, 2019 00:51
Using jsonpickle instead of pickle has benefits.
# jsonpickle is human readable for inspection (security, etc.) before unpickling.
# It is smaller, when native.
#
# 246099 cd33.jpkl
# 1432509 cd33.pkl
#
# 241K cd33.jpkl
# 1.4M cd33.pkl

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@richardkmichael
richardkmichael / gist:c3f9251630f7da63fbe7
Created August 24, 2015 19:25
Broken DateTime based Range#include?
[38] pry(main)> RUBY_DESCRIPTION
=> "ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin12.0]"
[41] pry(main)> d = "2015-01-01"
=> "2015-01-01"
# Broken Range#include? with DateTime objects, they don't understand the time portion of the day.
[42] pry(main)> n = DateTime.parse "#{d} 9am"
=> #<DateTime: 2015-01-01T09:00:00+00:00 ((2457024j,32400s,0n),+0s,2299161j)>
@richardkmichael
richardkmichael / bash-completion-notes.md
Last active August 29, 2015 14:24
Install bash-completion:master for `shopt -s failglob` with TAB-completion.

bash-completion:master has fixes for TAB-completion breakage when using shopt -s failglob (helpful with shopt -s dotglob).

$ ls -l bash: no match: words[0]=${!ref}${COMP_WORDS[i]}

Unfortunately, Homebrew's bash-completion will always use version 1.3, pinned because of OSX pinning to bash 3.2.x. Also, the homebrew-version/bash-completion2 package is 2.1, which is very old.

So, let's quickly install bash-completion from source until we have time to fix homebrew.

#!/bin/bash
# Post-update hook, it receives a list of updated refs on STDIN ($@); including tags.
# -e = exit if any command exits non-zero ; -u exit if undefined variable name ; -o pipefail
set -euo pipefail
GIT_DIR="$( readlink -nf ${PWD} )"
REPO_NAME="$( basename ${GIT_DIR} .git )"
DEPLOY_LOG_DIR="${GIT_DIR}/../deploy-logs"
/*
Creates a computed property that persists into local storage, all
instances share the same value for the same property.
App.AuthController = Ember.Controller.extend({
token: Em.computed.stored()
});
controller = App.__container__.lookup('controller:auth')
contorller.set('token', 'abc123foo456bar')

Ember.Console

This is a set of helpers for finding the application's currently active models/routes/controllers/etc. This isn't a straightforward process because of how Ember (rightly) encapsulates application objects, but it's useful in debugging environments to be able to quickly access them. And with the beta release of Ember Data, the store is not easily accessible without helpers either.

Usage

All helpers can be called directly if you provide them an application instance: