Skip to content

Instantly share code, notes, and snippets.

View Shilo's full-sized avatar

Shilo Shilo

View GitHub Profile
@Shilo
Shilo / run_instance_grid.gd
Last active June 6, 2026 02:39
Automatically tile multiple Godot "Run Instances" windows launched from the editor, making local multiplayer testing easier. (Based on foxssake/netfox)
extends Node
## MimicRunInstanceGrid optional editor-only AutoLoad.
## [br][br]
## Not registered automatically by the plugin; add this script as an AutoLoad
## to enable window tiling.
## Automatically tiles multiple Godot run-instance windows into a shared grid.
## [br][br]
## This utility is intended for local multiplayer testing from the editor. Make
## sure "Game > Embedding Options > Embed Game on Next Play" is disabled so run
## instances open as separate windows. Each run instance writes a short-lived
@Shilo
Shilo / vscode-markdown-preview-by-default.md
Last active June 4, 2026 11:03
Open Markdown files in preview mode by default in VS Code (and forks like Cursor, Antigravity)

Open Markdown Files in Preview by Default (VS Code & Forks)

By default, VS Code opens .md files in the text editor. To open them in preview mode instead:

Steps

  1. Open Settings (JSON): Ctrl+Shift+PPreferences: Open User Settings (JSON)
  2. Add this to your settings.json:
@Shilo
Shilo / commit-url.md
Created February 21, 2026 02:02
Claude Code command: generate commit URLs from git remote

Generate plain URLs to view commits on the remote hosting platform.

Input

$ARGUMENTS can be:

  1. Empty — default to HEAD.
  2. Commit hashes — one or more, separated by spaces or commas.
  3. Natural language — e.g., "last 5 commits", "today's commits", "commits since yesterday". Interpret the intent and use the appropriate git command to resolve the hashes (e.g., git log -5 --format="%H", git log --since="yesterday" --format="%H").
@Shilo
Shilo / claude_notify.md
Last active May 26, 2026 09:01
Claude Code notification system for Windows — configurable notification sounds and taskbar flashing for stop, input, task complete, and subagent events. Works universally in VS Code, Windows Terminal, cmd, PowerShell, and any embedded terminal.

Claude Code Notification Sounds & Taskbar Flash (Windows)

Play Windows notification sounds and flash the taskbar icon when Claude Code needs your attention - so you can multitask without constantly checking back.

What it does

Event Default Sound Taskbar Flash When
Stop chimes yes Claude finished responding
Input Windows Exclamation yes Permission prompt or question
@Shilo
Shilo / vscode-launch-without-debugger.md
Created February 17, 2026 01:23
VS Code: Run launch.json configs without the debugger toolbar — workaround using background tasks + instant-exit node to keep commands in the launch dropdown without attaching a debugger

VS Code: Run Launch Configs Without the Debugger Toolbar

VS Code's launch.json only supports debug-type configurations ("type": "node", etc.), which always attach a debugger toolbar — even for simple shell scripts or build tasks. There's no built-in way to run a command from the launch dropdown without it.

This workaround combines a background shell task (no debugger) with a minimal launch config that exits instantly, causing the debugger to detach.

How It Works

  1. A shell task runs your actual command — since tasks use "type": "shell", no debugger is involved
  2. The task is marked as "isBackground": true with "activeOnStart": true, so VS Code doesn't block with a "Waiting for preLaunchTask..." prompt
@Shilo
Shilo / claude_statusline.md
Last active February 19, 2026 03:07
Claude Code status line (for Windows): {progress bar} {context %} | {tokens used/max} | {cost} | {api duration} | {model}

Claude Code Custom Status Line (Windows)

A rich status line for Claude Code on Windows — shows context usage, token counts, cost, duration, and active model at a glance.

What it shows

████▌██████████ 26.0% | 52.1k/200.0k | $1.93 | 3m 33s | Opus 4.6
@Shilo
Shilo / code-editor-rules.md
Created February 4, 2026 13:09 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@Shilo
Shilo / ref.svelte.js
Last active January 19, 2026 13:42
Svelte 5 ref wrapper for universal reactivity. (Not sure if it's useful)
export function ref(initialValue) {
const state = $state({value: initialValue});
return state;
}
export function watchedRef(initialValue, onSet, onGet) {
let value = $state(initialValue)
return {
set value(newValue) {
const oldValue = value
@Shilo
Shilo / SafeAreaContainer.cs
Last active March 23, 2025 22:48
Godot 4 container that automatically sets margins based on touch screen safe area.
using Godot;
using System;
/// <summary>
/// Margins for Mobile safe area that accounts for cutouts.
/// Also accounts for corner radius.
/// </summary>
[GlobalClass]
public partial class SafeAreaContainer : MarginContainer
{
@Shilo
Shilo / PackedSceneExtension.cs
Last active January 20, 2025 06:39
Godot 4 PackedScene extension to get export property value based on property name.
public static partial class PackedSceneExtension
{
public static Variant? GetNodePropertyValue(this PackedScene packedScene, int nodeIndex, StringName propertyName)
{
SceneState sceneState = packedScene.GetState();
int propertyCount = sceneState.GetNodePropertyCount(nodeIndex);
for (int propertyIndex = 0; propertyIndex < propertyCount; propertyIndex++)
{
if (sceneState.GetNodePropertyName(nodeIndex, propertyIndex) == propertyName)