Skip to content

Instantly share code, notes, and snippets.

View STRML's full-sized avatar

Samuel Reed STRML

View GitHub Profile
// @flow
const crypto = require('crypto');
module.exports = WebpackStableChunkHash;
function WebpackStableChunkHash() {}
WebpackStableChunkHash.prototype.apply = function(compiler) {
//
// For a while, webpack has had issues with [chunkhash] being unstable and not reflecting the actual
@STRML
STRML / ResizeSensor.js
Created April 21, 2018 03:49
A resize sensor component for React that doesn't use iframes, objects, or require ResizeObservers.
// @flow
import * as React from 'react';
type Dimensions = {width: number, height: number, ref: ?HTMLElement};
type Props = {
children?: React.Node,
className?: string,
onResize: (dimensions: Dimensions) => any,
};
@STRML
STRML / bat-download.js
Last active March 18, 2026 22:24
A simple script for downloading all images for a listing on BringATrailer.com
(async function() {
const delay = (ms) => new Promise(r => setTimeout(r, ms));
// Given a url, try to download a high-res version of it
// This prevents us from downloading a downscaled thumbnail
function replaceUrlParam(url) {
return url
.split('?')[0] // get rid of querystring
.replace('-scaled.', '.'); // Remove `-scaled` to attempt to get the full res image
}
@STRML
STRML / zha-lutron-aurora-smart-area-blueprint.yaml
Last active October 12, 2024 22:18 — forked from blizzrdof77/zha-lutron-aurora-smart-area-blueprint.yaml
HASS Blueprint | ZHA - Lutron Aurora Smart Area with Night-Light Dimmer
blueprint:
name: ZHA - Lutron Aurora Dimmer Expanded v1.5
description: Control lights with a Lutron Aurora Dimmer Pressing in the dimmer button will toggle between turning lights on to full brightness, and turning the lights off. Rotating the dimmer will increase and decrease the light brightness. Adjust the sensitivity if updates from the dimmer are being sent too quickly.
domain: automation
input:
remote:
name: Lutron Aurora Dimmer Switch
description: Lutron Aurora Z3-1BRL
selector:
device:
@STRML
STRML / MEMORY-SYSTEM-SPEC.md
Last active February 22, 2026 17:02
Claude Memory Spec

Claude Code Persistent Memory System — Spec

Note: This is the canonical spec. All scripts are embedded here with their full content. When editing scripts, update this spec to include the complete file content — no stubs or references to external files.

A two-layer memory system for Claude Code that compounds knowledge across sessions. Primary mechanism is proactive in-session note-taking (via CLAUDE.md instructions). Safety net is a Stop hook that spawns background Sonnet (medium effort) to extract missed learnings from transcripts. Periodic Opus (low effort) GC prevents unbounded growth. On /clear, a fast Sonnet (low effort) pass captures learnings before context is discarded.

Architecture

@STRML
STRML / gist:f9139c7daa88575bb7667aba2849ee6c
Last active August 2, 2026 14:44
claude-kimi-setup.md
# Moved
This setup prompt now lives in a combined gist alongside the other Claude Code
provider profiles, so they can reference each other and share one list of gotchas:
**https://gist.github.com/STRML/7aaafeaa6d161d4c4dd4738fc8e56a4e**
That gist covers:
- `claude-ds4` — DeepSeek's own Anthropic-compatible endpoint, no proxy
@STRML
STRML / claude-ds4-setup-prompt.md
Last active August 2, 2026 14:44
claude-ds4-setup.md

Moved

This setup prompt now lives in a combined gist alongside the other Claude Code provider profiles, so they can reference each other and share one list of gotchas:

https://gist.github.com/STRML/7aaafeaa6d161d4c4dd4738fc8e56a4e

That gist covers:

  • claude-ds4 — DeepSeek's own Anthropic-compatible endpoint, no proxy
@STRML
STRML / claude-ds4-deepseek-setup-prompt.md
Last active August 2, 2026 14:44
claude-ds4-deepseek-setup.md

Moved

This setup prompt now lives in a combined gist alongside the other Claude Code provider profiles, so they can reference each other and share one list of gotchas:

https://gist.github.com/STRML/7aaafeaa6d161d4c4dd4738fc8e56a4e

That gist covers:

  • claude-ds4 — DeepSeek's own Anthropic-compatible endpoint, no proxy
@STRML
STRML / 0-overview.md
Last active August 3, 2026 02:12
MOVED → github.com/STRML/cc-ds4 — Claude Code profiles for DeepSeek V4 and Kimi K3

Moved to github.com/STRML/cc-ds4

https://github.com/STRML/cc-ds4

This gist held setup prompts for running DeepSeek V4 and Kimi K3 in Claude Code through isolated profiles, so that pointing Claude Code at another provider does not reroute every session on the machine.

It outgrew a gist. Two things forced the move: