Skip to content

Instantly share code, notes, and snippets.

@tarruda
tarruda / Full response
Last active April 20, 2026 08:22
Browser OS implemented by Qwen 3.6 35B Q8_0 GGUF
# BrowserOS - Full Browser-Based Operating System
## Special Feature: **"Neon Mode"** + **System Terminal**
- **Neon Mode**: A cyberpunk transformation that applies glowing neon effects to all UI elements, changes the color scheme to vibrant magenta/cyan/yellow, and adds animated border pulses.
- **Terminal**: A functional CLI with `help`, `neofetch`, `matrix`, `clear`, `time`, `date`, `echo`, `color`, and a fake `sudo rm -rf /` easter egg.
- **Why special**: It gives the OS personality, depth, and replay value — the terminal alone encourages exploration.
```html
<!DOCTYPE html>
<html lang="en">
@tarruda
tarruda / qwen-3.5-comparison.html
Last active February 24, 2026 19:22
Qwen3.5 models comparison
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Qwen 3.5 Models Benchmark Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
@tarruda
tarruda / gptoss.j2
Created November 2, 2025 11:30
gpt-oss jinja template for llama.cpp
{#-
In addition to the normal inputs of `messages` and `tools`, this template also accepts the
following kwargs:
- "builtin_tools": A list, can contain "browser" and/or "python".
- "model_identity": A string that optionally describes the model identity.
- "reasoning_effort": A string that describes the reasoning effort, defaults to "medium".
#}
{#- Tool Definition Rendering ============================================== #}
{%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}
@tarruda
tarruda / llama-cpp-annotate.html
Last active May 7, 2026 21:01
Test page for Qwen3-VL + llama.cpp server
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Image OCR and Bounding Box Drawer</title>
<style>
:root {
--pad: 12px;
--accent: #e53935;
#!/usr/bin/env python3
import argparse
import hashlib
import json
import os
import re
import subprocess
import sys
import time
import yaml
@tarruda
tarruda / claude-code-repo-init.md
Created August 11, 2025 17:57
Claude code repository initialization

System Prompt

You are Claude Code, Anthropic's official CLI for Claude.

You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.

IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation. IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.

If the user asks for help or wants to give feedback inform them of the following:

@tarruda
tarruda / planar-install.sh
Last active July 11, 2025 18:06
Install planar
#!/bin/sh
set -e
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "uv is not installed. Installing..."
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "uv installed successfully."
. "$HOME/.local/bin/env"

Code Bash command prefix detection

This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.

Command prefix extraction examples

Examples:

  • cat foo.txt => cat
  • cd src => cd
@tarruda
tarruda / micro_events.py
Last active December 25, 2025 23:33
Micro event loop library to teach the basic concepts of python coroutines and how event loop libraries might be implemented
"""
A micro event loop library implementation from scratch.
This library provides a minimal but feature-complete asynchronous event loop
implementation for educational purposes. It demonstrates the core concepts of
asynchronous programming including:
- Task scheduling and management
- I/O multiplexing with non-blocking sockets
- Timeouts and sleep functionality
@tarruda
tarruda / shfokus-control.sh
Last active September 15, 2024 14:18
Shfokus wrapper cron script. See https://github.com/rioastamal/shfokus for more info
#!/bin/bash
# Get the current hour and minute (24-hour format)
current_time=$(date +"%H%M")
# Get the current day of the week (1 = Monday, 7 = Sunday)
current_day=$(date +"%u")
# Check if already blocked
if grep -q "shfokus_begin" /etc/hosts; then
blocked=true