Skip to content

Instantly share code, notes, and snippets.

View bojanrajkovic's full-sized avatar

Bojan Rajkovic bojanrajkovic

View GitHub Profile
@bojanrajkovic
bojanrajkovic / migrate.js
Created May 26, 2026 00:46
Copy Chrome localStorage entries from one origin to another (rewrites LevelDB directly)
#!/usr/bin/env node
// Copies Chrome localStorage entries from one origin to another.
// Chrome must be closed before running.
//
// Usage:
// node migrate.js <old-origin> <new-origin> [chrome-profile-path]
//
// Examples:
// node migrate.js https://old.example.com https://new.example.com
// node migrate.js https://old.example.com https://new.example.com "/path/to/Chrome/Default"
@bojanrajkovic
bojanrajkovic / atc-analytics.html
Created May 24, 2026 00:00
ATC Analytics — 3-Day Snapshot
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ATC Analytics — 3-Day Snapshot</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: Georgia, 'Times New Roman', serif;
@bojanrajkovic
bojanrajkovic / check-session-age.sh
Created April 25, 2026 02:40
Claude Code UserPromptSubmit hook: warn/block on stale prompt cache
#!/bin/bash
# UserPromptSubmit hook: block when the prompt cache is stale, warn when close.
# Anchored to the last `type: "user"` entry in the transcript — those are the
# cache-refresh events on Anthropic's side. Falls back to file mtime on parse
# failure. Fails open on any error.
set -e
INPUT=$(cat)
TRANSCRIPT=$(printf '%s' "$INPUT" | jq -r '.transcript_path // empty')
[ -z "$TRANSCRIPT" ] || [ ! -f "$TRANSCRIPT" ] && exit 0
@bojanrajkovic
bojanrajkovic / atc-playground-anon.html
Created April 17, 2026 21:44
ATC — Action Traffic Control UI Explorer (playground)
<!DOCTYPE html>
<html lang="en" data-theme="radar">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ATC — Action Traffic Control UI Explorer</title>
<style>
/* ============================================
OKLCH COLOR SYSTEM
Neutral ramp driven by --hue. Switching
@bojanrajkovic
bojanrajkovic / atc-topbar-mockups.html
Created April 15, 2026 12:16
ATC Top Bar Layout Exploration — 3 approaches with OKLCH design system
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ATC Top Bar Layout Exploration</title>
<style>
/* ATC OKLCH Design System — Radar theme (default) */
:root {
--hue: 155;
@bojanrajkovic
bojanrajkovic / research-claude-code-terminal-notifications.md
Created March 28, 2026 15:07
How Claude Code sends terminal notifications — detection chain, OSC sequences, and embedding guide (reverse-engineered from v2.1.86)
date 2026-03-28
category research
labels
claude-code
terminal
osc

How Claude Code Sends Terminal Notifications

@bojanrajkovic
bojanrajkovic / atc-playground.html
Last active March 21, 2026 21:56
ATC — Action Traffic Control UI Explorer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ATC — Action Traffic Control UI Explorer</title>
<style>
:root {
--bg: #0a0e14;
--bg2: #131820;
@bojanrajkovic
bojanrajkovic / cpap-dashboard.html
Last active April 25, 2026 12:30
Olivia CPAP Sleep Analysis Dashboard
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Olivia — CPAP Sleep Analysis Dashboard</title>
<style>
:root {
--bg: #1a1a2e;
--bg2: #16213e;
@bojanrajkovic
bojanrajkovic / reanchoring-rendered-mode.html
Last active March 9, 2026 19:37
Loupe: Rendered-Mode Comment Re-Anchoring — Four Anchor States Prototype
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loupe — Rendered-Mode Re-Anchoring States</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
@bojanrajkovic
bojanrajkovic / reanchoring-states.html
Last active March 9, 2026 19:15
Loupe: Comment Re-Anchoring — Four Anchor States Prototype
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loupe — Comment Re-Anchoring States</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {