Skip to content

Instantly share code, notes, and snippets.

View ericpardee's full-sized avatar

ericpardee ericpardee

View GitHub Profile
@ericpardee
ericpardee / claude-code-prompt-macos-VulgarWordUsage-db.md
Created November 3, 2026 21:47
Claude Code prompt: find out why ~/Library/Keyboard/VulgarWordUsage.db is missing on your Mac and make macOS create it

I read https://helgesver.re/articles/macos-vulgar-word-flags about ~/Library/Keyboard/VulgarWordUsage.db, the per-app, per-recipient SQLite store macOS autocorrect uses to learn which swear words I am willing to type. The file does not exist on my Mac and I want to understand why and make macOS create it, without faking it: the OS must write the file, not you.

What is already known, so you do not have to rediscover it:

  • AppleSpell (the autocorrect XPC service at /System/Library/Services/AppleSpell.service) hosts the iOS keyboard engine for inline predictive text. The database is created by TextInputCore's TI::VulgarWordUsageDatabaseWrapper the moment AppleSpell lazily initializes a TIKeyboardInputManager for a language. That happens once per AppleSpell process per language, and only when a real text view asks for inline predictions. Calling NSSpellChecker from a command-line tool does not reach that path.
  • The usual reason the file is missing is that ~/Library/Keyboard itself does not exist. SQLite create
---
name: Improve Prompt
description: Analyze and enhance a prompt using Claude's prompt improvement methodology
arguments:
- name: prompt
description: The prompt you want to improve
required: true
---
# Prompt Improvement Analysis
# Define make completions
function _make_completions() {
local -a targets
if [[ -f 'Makefile' ]]; then
# Read targets from Makefile using Extended Regular Expressions
# This regex aims to match any target that does not start with a dot and includes more characters than before.
targets=($(grep -oE '^[^\.#][^ ]*:' Makefile | sed 's/:.*//'))
fi
# Define completions based on targets
@ericpardee
ericpardee / check_lambda_credentials.py
Created June 4, 2024 23:55
check for aws creds in lambda
import subprocess
import json
def list_lambda_functions():
result = subprocess.run(['aws', 'lambda', 'list-functions', '--query', 'Functions[*].FunctionName', '--output', 'text'], stdout=subprocess.PIPE)
function_names = result.stdout.decode('utf-8').strip().split()
return function_names
def get_environment_variables(function_name):
result = subprocess.run(['aws', 'lambda', 'get-function-configuration', '--function-name', function_name, '--query', 'Environment.Variables', '--output', 'json'], stdout=subprocess.PIPE)
@ericpardee
ericpardee / pet-snippet.toml
Created June 22, 2022 20:35 — forked from varenc/pet-snippet.toml
description
[[snippets]]
description = "start dev file syncer. uses fswatch to know when to run rsync. does not sync .git file. Sort like a write-through cache network file system with only eventual consistency guarantees."
command = "fswatch -0 --exclude \"\\.git\" --exclude \"\\.xml\" --exclude \"___\" -o /Users/chris/Documents/workspace/lingt_chris_dev_rsync_checkout/myproject | xargs -0 -n 1 -I {} rsync --progress --exclude '*.pyc' --exclude '*.git' --recursive ~/workspace/lingt_chris_dev_rsync_checkout/myproject dev@dev.server:/home/user/webapps/dev_chris/myproject"
output = ""
[[snippets]]
description = "plex find unscanned tv!"
command = "cat <(find /Users/chris/Downloads/media/dbx_mount/tv -type f | sed 's/.*\\///' | grep 'mp4\\|mkv\\|avi') <(unbuffer /Applications/Plex\\ Media\\ Server.app/Contents/MacOS/Plex\\ Media\\ Scanner -c 4 --tree | grep 'mp4\\|mkv\\|avi' | sed 's/.*\\///' | sed 's/\\w*\\[.*\\]$//' | awk '{$1=$1};1') | sort | uniq -u"
output = ""
$ pulumi up
Previewing update (hello-fargate)
View Live: https://app.pulumi.com/ericpardee/hello-fargate/hello-fargate/previews/39d16f8d-43a9-4bb3-a17d-6de535d2d36c
Type Name Plan Info
pulumi:pulumi:Stack hello-fargate-hello-fargate 4 errors; 10 messages
+ ├─ aws:ecs:Cluster default-cluster create
+ └─ awsx:lb:ApplicationLoadBalancer nginx-lb create
# when get
$ mosh proxMac-Pro 130 ↵
zsh:1: command not found: mosh-server
Connection to 192.168.0.94 closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)
# did you install mosh with homebrew? Then
$ mosh --server=/usr/local/Cellar/mosh/1.3.2_18/bin/mosh-server proxMac-Pro
@ericpardee
ericpardee / README.md
Created May 28, 2022 22:48 — forked from tomdaley92/README.md
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@ericpardee
ericpardee / update-all-route53-domains-contacts.py
Created April 23, 2022 13:36 — forked from mvanholsteijn/update-all-route53-domains-contacts.py
update the contacts of all route53 registered domains
import boto3
import json
contact = {
"FirstName": "Mark",
"LastName": "van Holsteijn",
"ContactType": "COMPANY",
"AddressLine1": "Laapersveld 27",
"City": "Hilversum",
"CountryCode": "NL",
@ericpardee
ericpardee / brew.txt
Last active January 17, 2022 16:51
macOS Homebrew (brew installs)
$ brew leaves
arduino-cli
argocd
arping
asciinema
asciiquarium
assh
automake
aws-shell
aws/tap/aws-sam-cli