Skip to content

Instantly share code, notes, and snippets.

View goosetav's full-sized avatar

Erik Gustavson goosetav

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Implement the following plan:</title>
<style>
:root {
--bg: #1a1b26;
--fg: #c0caf5;
@goosetav
goosetav / resilient-petting-kahn-59560cac-2026-02-12.md
Created February 16, 2026 03:03
Building @sgnl-actions/testing framework - Claude Code session transcript

Implement the following plan:

User

04:49:53 ok next item -- we need a robust testing framework for these actions that will let us define the remote API contract, mock http calls, and validate all the scenarios. There must be existing tools in the npm ecosystem for this kind of thing?

Assistant

04:50:22 - Task — Research JS API mocking test tools
05:35:31 Here's the short version:

List my 5 most recent sessions, then export the latest one a...


User

01:14:52 List my 5 most recent sessions, then export the latest one as markdown

Assistant

@goosetav
goosetav / K6_GO_IMPORTER_README.md
Created January 23, 2026 01:08
k6 + InfluxDB + Grafana Setup with High-Performance Go Importer (420k pts/sec, 14x faster)

k6-to-influxdb Go Importer

High-performance Go implementation for importing k6 JSON output to InfluxDB via HTTP.

Overview

This Go-based importer replaces the Python converter with a much faster implementation that achieves 6x better performance through:

  • True parallelism (no GIL limitation)
  • Fast JSON parsing with jsoniter (2-3x faster than stdlib)
@goosetav
goosetav / GRAFANA_SETUP_README.md
Last active January 22, 2026 23:56
k6 + InfluxDB + Grafana Setup - Automated script to visualize k6 load test results with automatic dashboard import and time range detection

k6 + InfluxDB + Grafana Setup Script

This script automates the setup of a local Grafana dashboard for viewing k6 load test results from JSON output files.

What It Does

  1. Validates prerequisites (docker, python3, git, jq)
  2. Creates a docker-compose stack with:
    • InfluxDB 1.8 (time-series database)
  • Grafana (visualization)
@goosetav
goosetav / count_nonarchived.sh
Created November 16, 2025 03:55
Count non-archived repos (public + private) for organizations under GitHub Enterprise
#!/bin/bash
echo "Organizations under sgnlai enterprise (non-archived only):"
echo ""
total_all=0
total_public=0
total_private=0
for org in sgnl-actions SGNL-ai SGNL-SE sgnl-training wholesalechips; do
@goosetav
goosetav / slacker.rb
Created August 2, 2015 22:27
clean up slack: a channel archival script
#!/usr/bin/env ruby
# The MIT License (MIT)
#
# Copyright (c) 2015 Erik Gustavson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@goosetav
goosetav / gist:9698683
Created March 21, 2014 23:30
example of installing git-prompt into an existing PS1 prompt; now in color!
# git-ify shell prompt
source ~/.git-prompt.sh
GIT_PS1='$(__git_ps1 " \[\033[0;32m\]%s\[\033[0m\]")'
export GIT_PS1_SHOWDIRTYSTATE="1"
export GIT_PS1_SHOWUPSTREAM="auto"
# example PS1 prompt or include $GIT_PS1 into yoru existing prompt
export PS1="\[\e]2;\u \w\a\e[32;1m\]$SI\w$NM$GIT_PS1 #\[\e[0m\] "
@goosetav
goosetav / gist:4004813
Created November 2, 2012 22:42
poltergeist#44 bug output
bundle exec rspec
{"name"=>"visit", "args"=>["http://127.0.0.1:52694/"]}
{"response"=>{"status"=>"success"}}
{"name"=>"render", "args"=>["/Users/erik/Documents/projects/true_type_bug/tmp/poltergeist-1351895942.png", true]}
{"response"=>true}
{"name"=>"reset", "args"=>[]}
{"response"=>true}
.{"name"=>"visit", "args"=>["http://127.0.0.1:52694/"]}
PhantomJS has crashed. Please read the crash reporting guide at https://code.google.com/p/phantomjs/wiki/CrashReporting and file a bug report at https://code.google.com/p/phantomjs/issues/entry with the crash dump file attached: /tmp/7D1CC2D4-97BD-4398-9A2D-68A3603E271A.dmp
{"name"=>"reset", "args"=>[]}
@goosetav
goosetav / howto.md
Created November 1, 2012 21:01
prevent ttf fonts while running poltergeist

RE: teampoltergeist/poltergeist#44

Use Rack::SimpleEndpoint to prevent Poltergeist/PhantomJS from crashing on TTF fonts.

In config/environments/test.rb, add

require 'rack/contrib/simple_endpoint'
config.middleware.insert_after Rack::Runtime, Rack::SimpleEndpoint, /\.ttf$/ do |req, res, match|
  res.status = '403'

"I will not serve TTF fonts in test mode."