Skip to content

Instantly share code, notes, and snippets.

View shawnjgoff's full-sized avatar

Shawn J. Goff shawnjgoff

View GitHub Profile
▐▛███▜▌ Claude Code v2.1.34 + tweakcc v3.4.0
▝▜█████▛▘ Opus 4.6 · Claude API
▘▘ ▝▝ ~/projects/the_observer
┃ ✓ tweakcc patches are applied
[msg:5c546f5b-180a-4c64-9c8b-a46998c7ac5c]
[msg:5c546f5b-180a-4c64-9c8b-a46998c7ac5c]
> I'm testing a new feature added to Claude Code called "smart compaction".
It's different from auto compaction in that it can compact targetted messages
❯ What unanswered questions remain?
● Read 1 file (ctrl+o to expand)
● From the scratchpad plus things that came up implicitly:
Listed in the doc:
1. GitHub publish flow - PAT handling, UX for "push to real repo"
2. DOM swapping mechanics - how exactly does the overlay work for multi-page content?
3. Assets in live preview - images, CSS, fonts when previewing changes
@shawnjgoff
shawnjgoff / .gitignore
Last active August 29, 2015 13:56
Erlang version of Conway's Game of Life
*.beam
@shawnjgoff
shawnjgoff / board_viewer.rb
Last active November 13, 2017 16:11
Conway's game of life. It's a work-in-progress.
class BoardViewer
def initialize(board, opts = {})
@board = board
@coordinate_enumerator = opts[:coordinate_enumerator]
end
attr_accessor :coordinate_enumerator
def view()
p @board.inspect
end
def close()
@shawnjgoff
shawnjgoff / snmp4jruby_trap_listener.rb
Created December 21, 2013 17:57
Using snmp4jruby to receive traps and informs...
#!/usr/bin/env jruby
require 'snmp4jruby'
class TrapListener
def initialize()
@transport = SNMP4JR::Transport::DefaultUdpTransportMapping.new
@address = SNMP4JR::SMI::GenericAddress.parse("udp:127.0.0.1/1162")
@snmp = SNMP4JR::Snmp.new(@transport)
@callbacks = []
@snmp.addNotificationListener(@address, self)
@shawnjgoff
shawnjgoff / standalone-http-only.xml
Created October 3, 2013 18:21
A TorqueBox standalone.xml file that only listens on the http port. It provides messaging services to any processes running on the same server, but there is no clustering support.
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns='urn:jboss:domain:1.4'>
<extensions>
<extension module='org.jboss.as.clustering.infinispan'/>
<extension module='org.jboss.as.connector'/>
<extension module='org.jboss.as.deployment-scanner'/>
<extension module='org.jboss.as.ee'/>
<extension module='org.jboss.as.jmx'/>
<extension module='org.jboss.as.logging'/>
<extension module='org.jboss.as.messaging'/>
@shawnjgoff
shawnjgoff / event_timers.rb
Last active December 23, 2015 01:49
A simple service that listens on a socket for events related to objects. If the object has a lifetime associated, it will start a timer and alert if the object doesn't get another event within that lifetime.
#!/usr/bin/env ruby
require 'eventmachine'
class EventTimer < EventMachine::Connection
def receive_data(data)
event_identifier = get_identifier_from(data)
setup_timer_for(event_identifier)
end
def get_identifier_from(data)
@shawnjgoff
shawnjgoff / ps-timer
Created May 2, 2013 14:56
This is a crude script for timing how long various processes are running during a task. I made it to find out how much time is spent compiling vs configuring during a build.
#!/bin/sh
# ps-timer: count how much time processes are using during a task
# Usage:
# edit the $procs variable below to care about processes you want to watch
# run ps-timer comand [command_arg1] [command_arg2]...
# the output shows an estimate of the time each proces in the $procs list was running
$@ &
pid=$!
@shawnjgoff
shawnjgoff / has_key
Created August 30, 2012 22:43
replace python's depricated dict.has_key(k) with "k in dict" with a regex
Vim regex
:%s/\([^ ]\+\)\.has_key(\(.\{-}\))/\2 in \1/g
sed regex
s/\([^ ]\+\)\.has_key(\([^)]*\))/\2 in \1/g
And here is the string.method(object, ...) -> object.method(...)
Specificlaly for string.replace():
Vim regex:
%s/string\.replace(\(.\{-}\), /\1.replace(/
@shawnjgoff
shawnjgoff / talks
Created August 19, 2012 23:25
A list of topics I could give at a LUG (or BUG) meeting
Awesome (the window manager) (10 mins)
- general tiling window manager description, demonstration
- not limited to just tiles (floating mode)
- extremely keyboard friendly
- extremely mouse friendly
- extremely fast
- extremely configurable
Shell Tricks: Parameter Expansion (10 mins)
- POSIX