Skip to content

Instantly share code, notes, and snippets.

View Chemaclass's full-sized avatar
🦀

Jose M. Valera Reales Chemaclass

🦀
View GitHub Profile
@Chemaclass
Chemaclass / claude-ping.md
Last active October 7, 2026 08:46
claude-ping: get fresh Claude usage sooner

claude-ping: get fresh Claude usage sooner

What

A small command that says "ping" to Claude. Your computer runs it on its own at 7:01, 12:01, and 17:01. You can also run it by hand.

Why bother

You get three blocks of Claude usage in your workday instead of two.

@Chemaclass
Chemaclass / README.md
Created September 20, 2026 11:59
Codex TUI status line setup

Codex TUI status line

This configures a compact Codex prompt footer showing the active model and reasoning effort, context remaining, account limits, token usage, estimated thread cost when available, fast mode, and the current Git branch.

Setup

Add the following to ~/.codex/config.toml:

[tui]
@Chemaclass
Chemaclass / clawd-util.sh
Created June 29, 2026 12:44
A clawd function util for Clawdmeter
# util fn for https://github.com/HermannBjorgvin/Clawdmeter
function clawd() {
local plist="$HOME/Library/LaunchAgents/com.user.claude-usage-daemon.plist"
case "$1" in
start)
launchctl unload "$plist" 2>/dev/null
launchctl load -w "$plist"
;;
stop) launchctl unload "$plist" ;;
restart) launchctl unload "$plist" 2>/dev/null; launchctl load -w "$plist" ;;
@Chemaclass
Chemaclass / phel-ring-style-symfony.md
Last active May 21, 2026 14:39
Embedding Phel into a Symfony project, Ring-style (Phel owns the application, Symfony is just the HTTP container)

Phel on Symfony, Ring-style — TLDR

Embed Phel into a Symfony app the way a Clojure dev would. Pure handlers over plain request/response maps. Symfony stays at the edge (HTTP, DI, config). Phel owns routing, handlers, business logic. Adapter ~130 LOC.

Full demo repo, tests, docs, migration guide, REPL cookbook: https://github.com/Chemaclass/phel-symfony-demo

Stack

@Chemaclass
Chemaclass / statusline.sh
Created April 10, 2026 08:04
My claude statusline
#!/bin/bash
# Shared StatusLine for Claude Code
# Shows: robbyrussell prompt + model + cost + tokens + context % + 5h rate limit + 7d rate limit
# Override locally via .claude/settings.local.json
input=$(cat)
# Parse all values in single jq call for performance
eval $(echo "$input" | jq -r '
@sh "dir=\(.workspace.current_dir // .cwd // "unknown")",
@Chemaclass
Chemaclass / life-passes.php
Created June 24, 2025 11:19
Visualizes a life calendar in the terminal. Each line is a year, each character is 2 days. Tracks progress and supports leap years.
#!/usr/bin/env php
<?php
declare(strict_types=1);
/**
* Life Calendar Visualizer
*
* This script prints a visual timeline of a person's life in years and "day pairs",
* where each line represents a year, and each character represents 2 days.
* It uses `X` for days already lived and `_` for days yet to come.
@Chemaclass
Chemaclass / release_chart.sh
Last active April 8, 2025 09:13
A bash script to render a graph with the number of releases per day
#!/usr/bin/env bash
###################################################################################
# usage example: bash local/release_chart.sh TypedDevs/bashunit --last 300
###################################################################################
set -euo pipefail
REPO=""
LIMIT_DAYS=60
@Chemaclass
Chemaclass / fibonacci.phel
Created April 18, 2024 20:21
A fibonacci implementation written in phel
(ns phel-testing\local)
(defn fib [n]
(loop [fib-nums [0 1]]
(if (>= (count fib-nums) n)
(slice fib-nums 0 n)
(let [[n1 n2] (reverse fib-nums)]
(recur (push fib-nums (+ n1 n2)))))))
(println (fib 50))
@Chemaclass
Chemaclass / racing_horses.go
Last active April 1, 2024 04:54
Racing horses using goroutines
package main
import (
"fmt"
"math/rand"
"os"
"os/exec"
"os/signal"
"sync"
"time"
@Chemaclass
Chemaclass / php_macos_installation.md
Last active March 17, 2024 12:26
Managing diff local PHP versions in MacOS

Managing diff local PHP versions in MacOS

Identify which php versions do you have installed locally

  • brew search php

Install the versions that you need

  • brew install php@7.4
  • brew install php@8.0