Skip to content

Instantly share code, notes, and snippets.

View davecap's full-sized avatar
😇
hello!

David Caplan davecap

😇
hello!
View GitHub Profile
@davecap
davecap / build-your-own-otto.md
Created October 19, 2026 19:49
Build your own Otto: a prompt for Claude Opus 5.5+ to build a personal AI chief of staff on Pi and Pi Pocket

Build your own Otto

A prompt for Claude Opus 5.5 or newer in Claude Code. It builds a personal AI chief of staff: one assistant you talk to from your phone, which runs AI workers across all your projects on a Mac you own.

What you need: a Mac that stays on, Tailscale on the Mac and your phone, Node.js 22.19+, the GitHub CLI signed in, and a Claude plan with Claude Code signed in.

Paste everything below the line into Claude Code. Change anything to suit how you work: that’s the point.

Disclaimer: shared as is, for learning, with no warranty. You run it at your own risk: AI agents can change files, run commands and act on your accounts. I’m not responsible for what you build or do with it, or for any costs, data loss or damage. Read what it builds before you trust it.

@davecap
davecap / 99stop_datadog.sh
Created April 24, 2014 02:21
.ebextensions/datadog/hooks/99stop_datadog.sh
#!/bin/bash
# .ebextensions/datadog/hooks/99stop_datadog.sh
if [ -e /etc/init.d/datadog-agent ]; then
/etc/init.d/datadog-agent stop
fi
@davecap
davecap / 99start_datadog.sh
Created April 24, 2014 02:21
.ebextensions/datadog/hooks/99start_datadog.sh
#!/bin/bash
# .ebextensions/datadog/hooks/99start_datadog.sh
if [ -e /etc/init.d/datadog-agent ]; then
/etc/init.d/datadog-agent start
fi
@davecap
davecap / datadog.repo
Last active August 29, 2015 14:00
.ebextensions/datadog/datadog.repo
[datadog]
name = Datadog, Inc.
baseurl = http://yum.datadoghq.com/rpm/x86_64/
enabled=1
gpgcheck=0
@davecap
davecap / 99datadog.config
Created April 24, 2014 02:20
.ebextensions/99datadog.config
# .ebextensions/99datadog.config
container_commands:
01chmod:
command: "chmod +x .ebextensions/datadog/hooks/*"
02mkdir_appdeploy_post:
test: '[ ! -d /opt/elasticbeanstalk/hooks/appdeploy/post ]'
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
02mkdir_configdeploy_post:
test: '[ ! -d /opt/elasticbeanstalk/hooks/configdeploy/post ]'
command: "mkdir /opt/elasticbeanstalk/hooks/configdeploy/post"
@davecap
davecap / collections.liquid.html
Last active October 15, 2025 13:07
"Infinite" scrolling in Shopify collections
{% paginate collection.products by 20 %}
<!-- the top of your collections.liquid -->
<!-- START PRODUCTS -->
{% for product in collection.products %}
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}">
{% include 'product' with product %}
</div>
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->