Skip to content

Instantly share code, notes, and snippets.

@vinhnx
vinhnx / detect-256-theme.py
Created March 1, 2026 06:56 — forked from jake-stewart/detect-256-theme.py
Detect and handle 256-color themes
#!/usr/bin/env python3
"""
Detects whether the terminal is using a light or dark theme and automatically
adjusts 256-color palette indices so that colors render consistently regardless
of the active theme. This is especially useful when a terminal (e.g. Ghostty)
generates its 256-color palette to match the current theme — or when it doesn't,
and we need to compensate by flipping the indices ourselves.
"""
import os
@vinhnx
vinhnx / color256.md
Created March 1, 2026 06:56 — forked from jake-stewart/color256.md
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@vinhnx
vinhnx / ANSI-escape-sequences.md
Created February 25, 2026 06:38 — forked from ConnerWill/ANSI-escape-sequences.md
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@vinhnx
vinhnx / microgpt.py
Created February 12, 2026 02:10 — 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
@vinhnx
vinhnx / LICENSE
Created January 27, 2026 04:03
algorithmic-art AgentSkills P5.js
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@vinhnx
vinhnx / claude-frontend-design-skill
Created December 25, 2025 07:48 — forked from edxeth/claude-frontend-design-skill
Claude's frontend design skill
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
license: Complete terms in LICENSE.txt
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
@vinhnx
vinhnx / context.md
Created December 25, 2025 07:32
Context Engineering for AI Agents with LangChain and Manus
Strategy Description Typical Implementation Advantages Risks/Trade-offs
Context Offloading Moving parts of the working co
@vinhnx
vinhnx / SKILL.md
Last active December 13, 2025 14:52
Save this file to `.claude/skills`, as SKILL.md name. eg `.claude/skills/spreadsheet-generator/SKILL.md`. and use with VT Code.
name description version author
spreadsheet-generator
Generate professional Excel spreadsheets with data, charts, and formatting using Claude and Anthropic's xlsx skill
1.0.0
VTCode Team

Spreadsheet Generator Skill

Generate professional Excel spreadsheets with structured data, formulas, charts, and professional formatting. This skill leverages Anthropic's xlsx Agent Skill to create Excel documents programmatically.

# To permanently store config options, create a config.toml file located in your config directory:
# Linux and Mac: ~/.config/helix/config.toml
# Windows: %AppData%\helix\config.toml
theme = "onedark"
[editor]
# Show currently open buffers, only when more than one exists.
bufferline = "multiple"
# Highlight all lines with a cursor
@vinhnx
vinhnx / ANSI.md
Created November 14, 2025 15:15 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27