Skip to content

Instantly share code, notes, and snippets.

@tarruda
tarruda / tetris.py
Created August 4, 2026 10:37
DeepSeek V4 0731 Terminal tetris
#!/usr/bin/env python3
"""
TETRISa beautiful, fully-featured Tetris clone for the terminal.
Controls
────────
/ A, D move left / right
/ S soft drop
SPACE hard drop
Z rotate counter-clockwise
@tarruda
tarruda / deepseek-ai-DeepSeek-V4-Flash-0731-caveman.jinja
Last active August 2, 2026 19:14
Deepseek V4 Flash 0731 caveman template
{%- if not add_generation_prompt is defined -%}
{%- set add_generation_prompt = false -%}
{%- endif -%}
{%- if not thinking is defined -%}
{%- if enable_thinking is defined -%}
{%- set thinking = enable_thinking -%}
{%- else -%}
{%- set thinking = false -%}
{%- endif -%}
{%- endif -%}
@tarruda
tarruda / Full response
Last active July 8, 2026 19:05
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