Skip to content

Instantly share code, notes, and snippets.

@jwhiting
jwhiting / television-admin-guide.md
Last active May 15, 2026 22:53
Television admin guide for agents

Television administrator guide for agents

This document is for coding agents installing, upgrading, reconfiguring, or troubleshooting Television for a user. Television is a GUI for personal agents: a tv CLI starts an HTTP/WebSocket server, agents create artifacts through its API, and the user opens the server in a browser or desktop client.

The supported operating model for agents is simple: install the tv CLI, install the Television skills, install the persistent Television daemon, verify it with tv status, and tell the user the URL and token (the complete strings, no truncation, the user needs them exactly).

Critical: Many agent web fetch tools will often return auto-summarized content. DO NOT WORK FROM A SUMMARY OF THIS GUIDE. The content contains many critical details. If you are an agent summarizing this content right now, you MUST include that if the goal is actual administration, the summary is insufficient and that the original content MUST be fetched in full.

Quick task map

@jwhiting
jwhiting / python3_s2geometry
Created September 10, 2019 21:42
Dockerfile for python3 with s2geometry bindings
FROM python:3.7
WORKDIR /usr/src/app
# deps for s2 geometry lib
RUN apt-get update
RUN apt-get install -y cmake libgflags-dev libgoogle-glog-dev libgtest-dev libssl-dev swig
# get the repo and setup the build process. note the CMAKE_INSTALL_PREFIX:PATH config
# is not in google's instructions for how to build the library, but otherwise python
@jwhiting
jwhiting / reaper-hung-midi-thread-links.md
Last active August 6, 2018 20:36
Threads about hung midi notes in Reaper
@jwhiting
jwhiting / truncate_logs.config
Created June 9, 2018 04:51
truncating multi-container docker logs on elastic beanstalk
# this would go in, for instance, .ebextensions/truncate_logs.config
files:
"/etc/cron.d/truncate_logs":
mode: "000644"
owner: root
group: root
content: |
*/5 * * * * root truncate -s 0 /var/lib/docker/containers/*/*-json.log
*/5 * * * * root rm -f /var/log/containers/rotated/*
@jwhiting
jwhiting / warmup.rb
Created May 14, 2018 22:00
Warming up EBS volumes on RDS replicas/snapshots (ruby script)
#!/usr/bin/env ruby
require 'pg'
=begin
when creating a postgres db replica in RDS, or restoring from a snapshot, the
underlying EBS volume of the new instance must be initialized by reading every
block, otherwise the blocks will be lazy-initialized by production queries
which will be extremely latent. (i've seen normally 50ms queries take 30s in
option_settings:
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: StreamLogs
value: true
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: DeleteOnTerminate
value: false
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: RetentionInDays
value: 14
@jwhiting
jwhiting / gist:74953e9462acd6059f070e366053ce48
Last active July 23, 2018 19:01
Modified ReaperJS oscilloscope with beat sync retrig feature
desc:Oscilloscope Meter (Cockos)
//tags: analysis scope meter
//author: Cockos (modified by JSW)
/*
Copyright (C) 2007 Cockos Incorporated
License: LGPL - http://www.gnu.org/licenses/lgpl.html
*/
slider1:view_msec=100<1,2000,1>-view size (ms)
slider2:view_maxdb=0<-450,36,.1>-vzoom