Skip to content

Instantly share code, notes, and snippets.

View rayjohnson's full-sized avatar

Ray Johnson rayjohnson

  • California
View GitHub Profile
@rayjohnson
rayjohnson / CLAUDE.md
Last active June 15, 2026 05:48
Claude Code: Reduce approval prompts with a global CLAUDE.md

Global Claude Code Instructions

Preferred Tools & Auto-Install via Homebrew

Before falling back to Python scripts or sed for file manipulation, check for and prefer these tools. If a preferred tool is not installed, suggest installing it via Homebrew before proceeding with an inferior alternative.

File Editing

  • Edit tool — always first choice for single precise edits
@rayjohnson
rayjohnson / gist:fe92c9377e35b95bbfb2a3bbc535d64b
Created November 15, 2017 09:13
docker-machine set up for Qnap
I use the QNAP nas server to host docker containers. We can configure
this mac to run docker-machine and point to the qnap server to deploy or
otherwise mess with docker.
This is how we set that up:
docker-machine create --driver=none --url tcp://<your qnap box>:2376 qnap
Next we need to install the certs. Download them from within the QNAP
@rayjohnson
rayjohnson / gist:dfcaab1bfbd111ecbb6d2a5fd486fee0
Created August 4, 2016 16:12
Docker 1.12 create service --mount option
I was trying to install cadvisor using the new docker service option. Paticularly using the new --mode global option which is perfect for something like that.
However, I quickly ran into a problem because -v is not supported. What? There is a new --mount option - but I could find no documentation on it.
Now there is a bug to fix the docs: https://github.com/docker/docker/issues/24277
In the mean time I dug around and found that the format for that call would be something like this:
--mount type=volume,target=<container file/directory>,source=<host file/directory>,volume-driver=<driver>,volume-opts=<k0>=<v0>,volume-opts=<k1>=<v1>