Skip to content

Instantly share code, notes, and snippets.

View kjanat's full-sized avatar

Kaj Kowalski kjanat

  • KJANAT
  • Amsterdam
  • 07:05 (UTC +01:00)
View GitHub Profile
@kjanat
kjanat / bun_completions.ps1
Last active November 5, 2025 22:53
PowerShell argument completer for Bun's command-line interface.
<#
.SYNOPSIS
PowerShell argument completer for the Bun command-line interface.
.DESCRIPTION
This script provides tab completion for Bun commands in PowerShell.
- Completes top-level commands (e.g., 'bun add', 'bun run').
- Completes script names from 'package.json' when using 'bun run'.
.NOTES
Author: Kaj Kowalski
Version: 1.0
@kjanat
kjanat / argocd-application-schema.json
Last active October 29, 2025 22:03
Schema for ArgoCD Application Custom Resource Definition (BEWARE, AI GENERATED!!! Comment below if issues identified!) Based on: https://github.com/argoproj/argo-cd/blob/f5eaae7/docs/operator-manual/application.yaml. Refer to it using: https://gist.githubusercontent.com/kjanat/556796a0a363a338ee9453a2613cfd53/raw/argocd-application-schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ArgoCD Application",
"description": "Schema for ArgoCD Application Custom Resource Definition",
"type": "object",
"required": ["apiVersion", "kind", "metadata", "spec"],
"properties": {
"apiVersion": {
"type": "string",
"const": "argoproj.io/v1alpha1",
@kjanat
kjanat / brightness.sh
Last active September 11, 2025 21:21
#!/usr/bin/env bash
#
# brightness.sh - DDC/CI Monitor Brightness Control Utility
#
# Intelligent monitor brightness control with sophisticated caching system.
# Supports multiple monitors, relative adjustments, and atomic cache operations.
#
# Installation:
# curl -o ~/.local/bin/brightness https://gist.github.com/kjanat/0efbcfef3026498bb9f21cd1518dd001/raw/brightness.sh
@kjanat
kjanat / js_ts_manual.md
Last active July 17, 2025 01:35
JavaScript & TypeScript Beginner's Manual
@kjanat
kjanat / claude-mcp-install.md
Last active September 12, 2025 23:18
Claude Code MCP Servers | Greatest Hits

Claude Code MCP Servers | Complete Installation Guide

Official MCP documentation: docs.anthropic.com/en/docs/claude-code/mcp

This guide provides comprehensive installation instructions for MCP (Model Context Protocol) servers, enabling Claude Code to interact with external tools and services.


Prerequisites

@kjanat
kjanat / gemwrap.sh
Last active January 14, 2026 13:10
Gemini token-usage logger for interactive sessions.
#!/usr/bin/env bash
#
# !!!!!!!!!!!!!!
# SCRIPT IS BROKEN FOR NOW, NOT GOT NO TIME TO CHANGE, SORRY
# MIGHT GET UPDATED IN A MONTH OR SO... :(
# !!!!!!!!!!!!!!
#
# gemwrap: run gemini, mirror its output, and log token stats + git root.
# Can also parse existing gemini output from stdin when used with --parse-only
#
@kjanat
kjanat / servstat.sh
Last active May 25, 2025 21:06
Universal Service Status Tool
# shellcheck disable=SC2148
# Universal Service Status Function for Unix Systems
# Works on: FreeBSD/TrueNAS, Debian/Ubuntu, RHEL/Fedora/CentOS, macOS, OpenBSD, NetBSD
servstat() {
local filter=""
local show_disabled=false
local show_details=false
local sort_output=false
local output_format="table"
@kjanat
kjanat / Truth table for logic gates.md
Last active May 25, 2025 19:02
Truth table for 2-input logic gates (AND, OR, NAND, NOR, XOR, XNOR) with links to Wikipedia and explanations for T (true) and F (false).

Truth table for logic gates [^1]

Here is a truth table that gives definitions of each of the 6 possible 2-input logic gate functions of two Boolean variables $P$ and $Q$:

$P$ $Q$ $P$$Q$ $P$$Q$ $P$$Q$ $P$$Q$ $P$$Q$ $P$$Q$
$\text{T}$ $\text{T}$ $\text{T}$ $\text{T}$ $\text{F}$ $\text{F}$ $\text{F}$ $\text{T}$
$\text{T}$ $\text{F}$ $\text{F}$ $\text{T}$ $\text{T}$ $\text{F}$ $\text{T}$ $\text{F}$
$\text{F}$ $\text{T}$ $\text{F}$ $\text{T}$ $\text{T}$ $\text{F}$ $\text{T}$ $\text{F}$
$\text{F}$ $\text{F}$ $\text{F}$ $\text{F}$ $\text{T}$ $\text{T}$ $\text{F}$ $\text{T}$