Skip to content

Instantly share code, notes, and snippets.

View dschinkel's full-sized avatar
💻

Dave Schinkel dschinkel

💻
View GitHub Profile
@dschinkel
dschinkel / README.md
Last active October 17, 2026 08:14
Real CPU % in the Claude Code status line (macOS)

Real CPU % in the Claude Code status line (macOS)

Status line showing CPU, processes and Claude, Codex and AGY sessions

Just ask Claude to add this to your statusline, give claude https://gist.github.com/dschinkel/c8b22c226c62da9b8aa33f5bf97d2e9e

Shows your Mac's real CPU utilization in the Claude Code status line, e.g. CPU 88% · load: 27.9 tasks | processes: 420 (CLI: 42 · other: 378) | Claude: 3 sessions + 2 subagents | Codex: 1 session | AGY: 1 session, refreshed every 2 seconds.

  • cpu-util.py reads the CPU tick counters (host_statistics) and compares them with the previous sample saved in ~/.claude/.cpu-ticks, so the number is the busy share of the last few seconds — not the load average. First run (or a stale sample) takes a quick 200 ms two-sample read. Any error prints nothing.
  • statusline-cpu-segment.sh is the snippet to paste into your status-line script. Green under 60
@dschinkel
dschinkel / GITHUB-PROFILE-HANDOFF.md
Last active October 7, 2026 06:25
LLM handoff: install a custom GitHub profile header with GitHub CLI setup

Handoff: add a custom GitHub profile header

Let your LLM do the magic: Share this gist link with a friend, or give it directly to your LLM: https://gist.github.com/dschinkel/16ce250f477c24b1d5dee1b9ce85ea13. Include your header script or design, and your LLM will handle the setup and publishing, guiding you through GitHub sign-in only if needed. No extra prompt to copy.

Instructions for the LLM receiving this handoff: carry out the setup below. The user does not need to copy another prompt or perform the repository setup themselves.

Add a personalized header image at the top of the user's GitHub profile README, like the header on Dave Schinkel's profile.

Get the header input

@dschinkel
dschinkel / EmailSweeper.java
Last active March 27, 2019 22:26
Pillar Bootcamp
package subscriptions;
import dependencies.User;
import dependencies.UserMailer;
import dependencies.UserRepository;
public class EmailSweeper {
UserMailer mailer;
UserRepository repository;
String unpaidMessage = "Please renew your subscription to Ferret Fancy!";
@slagyr
slagyr / autumn.js
Last active January 9, 2019 23:44
Autumn code
/**
* Micah's Autumn setup
*/
alert('Running Autumn!');
/**
* Window management
*/
@dschinkel
dschinkel / no-ddd.md
Last active January 4, 2019 06:01
There is no such thing as "Document Driven Development"

My repsonse to zsup/ddd.md in which he wrote:

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified
@dschinkel
dschinkel / oh-my-zsh.commands.csv
Last active November 27, 2018 02:01
my favorite oh-my-zsh commands
alias for git command
ga . git add .
gcmsg git commit -m
gp git push
gp -f git push -f
gst git status
gb git branch
gb git branch
gco git checkout
gco -b git checkout -b
@dschinkel
dschinkel / PlayingWithElmDictionaries.elm
Last active September 20, 2018 05:27
Elm - Dictionaries
-- instead of using a 2D list or 2D array to represent a game node/board, lets use a Dict instead
-- with Dict unlike List or Array, it's much easier to insert, find, and update values
{--
repl:
make sure you have no trailing spaces after \. Also, might need to uses spaces not tab in Sublime text
import Dict
board = Dict.fromList \
[ \
{--
Below shows some code commands that if entered into elm repl shows the output received
--}
import List
empty = ' '
markerX = 'X'
markerO = 'O'
gameNode = [ [ markerX, empty, empty ], [ markerO, markerO, empty ], [ markerX, empty, empty ]]
@skfarhat
skfarhat / build.gradle
Created June 26, 2018 19:01
Sample build.gradle used in a Cucumber based test project
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
plugins {
id "com.github.samueltbrown.cucumber" version "0.9"
}
@tonybaines
tonybaines / IntelliJ-Elm-Setup.md
Last active January 5, 2019 19:41
IntelliJ IDEA Elm Setup

Configuring and Using IntelliJ IDEA for basic Elm development

Assumes an elm toolchain installed through NPM

npm install -g elm elm-test elm-format

Versions

  • Elm 0.18
  • IntelliJ IDEA 2017.3.4