Skip to content

Instantly share code, notes, and snippets.

View kibotu's full-sized avatar
🎯
Focusing

Jan Rabe kibotu

🎯
Focusing
View GitHub Profile
@kibotu
kibotu / .zshrc
Created March 17, 2026 08:51
Local Proxy to use claude on mac and connect to remote ollama server.
# Use the actual model name from `ollama list`
export LM_MODEL="qwen3.5:35b" # or qwen3-coder:30b for coding tasks
export ANTHROPIC_BASE_URL="http://127.0.0.1:8131" # point to local proxy
export ANTHROPIC_AUTH_TOKEN="local"
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=128000
export ANTHROPIC_MODEL="$LM_MODEL"
export ANTHROPIC_DEFAULT_OPUS_MODEL="$LM_MODEL"
export ANTHROPIC_DEFAULT_SONNET_MODEL="$LM_MODEL"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="$LM_MODEL"
@kibotu
kibotu / cursor-estimated-token-cost.php
Last active March 18, 2026 09:16
Rough estimate for token usage by cursor CSV export.
<?php
error_reporting(0);
$csv = __DIR__ . '/all-time.csv';
/**
* Cursor CSV Cost Calculator
* Computes estimated API cost based on model and token usage.
*
* Pricing (per 1M tokens, USD) — verified March 2026
* Sources: Anthropic docs, OpenAI pricing page, Google AI dev / Vertex docs,
@kibotu
kibotu / INSTALL.md
Last active March 24, 2026 07:13
How to Run Qwen3.5 Locally With Claude Code (No API Bills, Full Agentic Coding)

Run Qwen 3.5 Locally with Claude Code — Zero API Bills, Full Agentic Coding

Your Mac has a GPU. Your Mac has RAM. Why are you paying someone else to think?

This guide gets you a fully local agentic coding setup: Claude Code talking to Qwen 3.5-35B-A3B via llama.cpp, all running on your Apple Silicon Mac. No API keys. No cloud. No surprise invoices. Just you, your M-series chip, and 35 billion parameters doing your bidding on localhost.

Based on this article.


@kibotu
kibotu / convert-to-gif.sh
Last active March 9, 2026 08:16
Convert mp4 or mov to webp and gif for optimized for medium articles.
#!/usr/bin/env bash
#
# convert_to_webp.sh — Convert video files to animated GIF and WebP.
#
# DESCRIPTION
# Converts all .mp4 and .mov files in the script's directory to both
# animated GIF (Medium-compatible) and animated WebP (higher quality).
# Output files are placed alongside the source videos.
#
# Aspect ratio is preserved. Videos are scaled to TARGET_WIDTH (default 362px),
@kibotu
kibotu / clean.py
Last active March 11, 2026 09:04
macos clean script with dry run for app developers + cursor
#!/usr/bin/env python3
"""
macOS Cleanup Tool
Usage:
python3 clean.py --system # system caches & logs
python3 clean.py --dev-caches # developer tool caches
python3 clean.py --build-folders ~/Projects # 'build' & '.build' dirs in tree
python3 clean.py --docker # docker images & volumes
python3 clean.py --ios-backups # iOS device backups
@kibotu
kibotu / microgpt.py
Created February 12, 2026 08:01 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shader Test - Train Scene</title>
<style>
* {
margin: 0;
padding: 0;
@kibotu
kibotu / stalebot-jenkins.groovy
Last active January 28, 2026 12:11
Stalebot for Groovy Jenkins Pipeline & Bitbucket Cloud
/**
* Jenkins Stale Branch Bot - Standalone Gist
*
* This script identifies and optionally deletes stale branches in a Git repository.
* It analyzes branches for:
* - Merged branches (fully merged to master with no unique commits)
* - Stale branches (no commits in the last X days)
* - Active branches (recent activity)
*
* Features:
@kibotu
kibotu / authenticator.gradle
Created January 19, 2026 12:24
Gradle Authenticator
if (!project.hasProperty('artifactory_contextUrl')) throw new GradleException('the "artifactory_contextUrl" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_token')) throw new GradleException('the "artifactory_token" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_1')) throw new GradleException('the "artifactory_reader_1" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_2')) throw new GradleException('the "artifactory_reader_2" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_3')) throw new GradleException('the "artifactory_reader_3" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_token_1')) throw new GradleException('the "artifactory_reader_token_1" needs to be set in gradle.properties!')
if (!project.hasProperty('artifactory_reader_token_2')) throw new GradleException('the "artifactory_reader_token_2" needs to be set in gradle.properti
@kibotu
kibotu / version-overrides.gradle
Last active January 14, 2026 17:28
Task to analyze dependencies and output necessary version overrides Similar to version-overrides/generate.py - finds actual duplicate versions
tasks.register("logVersionOverrides") {
group = "help"
description = "Analyzes dependencies for actual version conflicts (same dep with multiple versions)"
doLast {
// Track all versions seen for each dependency
def depVersions = [:]
def resolvedVersions = [:]
// Analyze releaseRuntimeClasspath configuration