Skip to content

Instantly share code, notes, and snippets.

@bmunslow
bmunslow / coach-repo-bootstrap.md
Created July 7, 2026 11:35 — forked from brendanlong/coach-repo-bootstrap.md
Claude Coach Bootstrap Skill

name: coach-repo-bootstrap description: >- Interview a user and scaffold a personalized git-based repo where an LLM acts as their ongoing strength-and-conditioning coach, with all state kept in files rather than the model's context. Use this whenever someone wants to set up a workout or training tracker, a personal-coach or AI-fitness-log repo, an RPE-autoregulated strength program, or any long-running per-session tracking system an agent maintains across sessions — even if they never say "skill," "scaffold," or "repo," and even if they only describe the outcome ("I want an AI to plan and log my workouts and handle the progression for me").

@bmunslow
bmunslow / sanitize_file_names.sh
Last active August 1, 2024 10:58
Bash script to sanitize and transliterate filenames in Automator workflow
#!/bin/bash
# activate extended pattern matching
shopt -s extglob
for f in "$@"; do
filename="$(basename "$f")"
dirpath="$(dirname "$f")"
# Get file extension
@bmunslow
bmunslow / commerce-quantity-select-add-to-cart-form.php
Last active July 11, 2020 16:03
Drupal 8 - Commerce 2.x - Transform quantity field in add to cart form into select list
<?php
/**
* hook_form_alter()
*
* Switch quantity field from input text to select in add_to_cart forms
* Supports both standard add_to_cart, as shipped in commerce framework
* as well as ajax add_to_cart forms implemented by dc_ajax_add_cart module
*
* It also supports quantity fields as they appear in view cart form, both with
@bmunslow
bmunslow / process_csv.php
Last active August 22, 2016 07:43
Drupal: Programmatically read and process CSV file using Feeds CSV parser
<?php
/**
* Quick CSV parsing in Drupal 7, using CSV parser library in the Feeds module.
* Default encoding expected to be UTF8.
*
*/
// Custom variables, adjust to your needs
$file_name = 'public://custom_path_to_my_file.csv'
$delimiter = ';';
@bmunslow
bmunslow / entityqueue-add-items.php
Last active July 18, 2024 08:31
Drupal 7 - Programatically add items to EntityQueue
<?php
/**
* This snippet adds all nodes belonging to a specific node type to all
* entityqueues found in the system, defined by Entityqueue module
* Customize to your own needs by modifying relevant parts of the code.
* @see https://www.drupal.org/project/entityqueue
*/
// Get all available entityqueue queues
$all_queue_names = variable_get('entityqueue_queue_names', array());
foreach ($all_queue_names as $queue_name) {
@bmunslow
bmunslow / .htaccess
Last active March 28, 2017 07:06
Custom .htaccess maintenance mode
<IfModule mod_rewrite.c>
RewriteEngine on
# Customize specific IP address which should have access to the live site
RewriteCond %{REMOTE_ADDR} !^11\.22\.33\.44
# Customize name of your maintenance mode template file
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
# Only images and CSS files are allowed. Customize to allow Javascript or other image extensions
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css) [NC]