Skip to content

Instantly share code, notes, and snippets.

View benabraham's full-sized avatar

Daniel Srb benabraham

View GitHub Profile
@benabraham
benabraham / simple-statusline.py
Last active December 28, 2025 17:59
Simple Claude Code status line with context usage progress bar (dark/light themes, truecolor/256 fallback)
#!/usr/bin/env python3
"""
Simple Claude Code StatusLine Script
Shows context usage/progress with colored bar
Uses current_usage field for accurate context window calculations
BUG WORKAROUND (remove when fixed):
https://github.com/anthropics/claude-code/issues/13783
The statusline API's context_window data is inaccurate. This script parses
the transcript JSONL as a workaround. When bug #13783 is fixed, delete:
@benabraham
benabraham / simple-statusline.sh
Last active January 6, 2026 13:02
Claude Code StatusLine Script shows only context usage/progress information
#!/usr/bin/env bash
# Simple Claude Code StatusLine Script
# Shows only context usage/progress information
# System-agnostic version using Python instead of jq
# add to your .claude/settings.json (I use it as global)
#
# {
# …,
# "statusLine": {
@benabraham
benabraham / clamp-dimension.scss
Last active December 9, 2024 20:51
clampDimension
@use "sass:math";
@function clampDimension(
$minViewportWidthPx,
$minDimensionRem,
$maxViewportWidthPx,
$maxDimensionRem,
$remSize: 16px
) {
$minWidth: math.div($minViewportWidthPx, $remSize);
@benabraham
benabraham / solidpixels-admin.css
Created February 27, 2023 11:29
Solidpixels admin custom CSS for better image previews.
.upload-detail-preview,
.upload-dialog-thumbnail:has(.img),
.FilePreview {
background: repeating-conic-gradient(hsl(0 0% 60%) 0% 25%, hsl(0 0% 70%) 0% 50%) 50% / 20px 20px;
}
.info-filesize {
color: white;
}
@benabraham
benabraham / input.scss
Created October 28, 2020 17:48
Customizing Bootstrap
// init variables globally
// The !global flag (we use later) may only be used to set a variable
// that has already been declared at the top level of a file.
// It may not be used to declare a new variable.
$w: null;
$h: null;
$p: null;
$z: null;
// create a new scope to work in
@benabraham
benabraham / package.json
Created December 9, 2019 17:58
npm scripts to convert scss to css and autoprefix and minify using temporary file
"scripts": {
"_css-sass2css": "node-sass --source-map-embed true --precision 6 --source-map-root \"/\" ./scss/style.scss ./css-temp/style.css",
"_css-postcss": "postcss ./css-temp/style.css --use autoprefixer --output ./css-temp/style.css",
"_css-minify": "csso --input ./css-temp/style.css --output ./css-temp/style.css --source-map ./css-temp/style.css.map",
"_css-move": "ncp ./css-temp/ ./css/",
"_css-cleanup": "rimraf ./css-temp",
"css-compile": "npm run _css-sass2css && npm run _css-postcss && npm run _css-minify && npm run _css-move && npm run _css-cleanup",
}