Skip to content

Instantly share code, notes, and snippets.

import os
import stat
import github.Auth
from github import Github
import json
import subprocess
import time
from pathlib import Path
import shutil
@pongo
pongo / bb.go
Created March 19, 2026 10:38
Go bubbletea file listing
package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
"os"
"path/filepath"
)
type model struct {
// ==WindhawkMod==
// @id taskbar-icon-changer
// @name Change taskbar icon
// @description Assigns custom icons to app instances based on their command line arguments or window title.
// @version 0.5
// @author claude
// @include *
// @compilerOptions -lshlwapi -lcomctl32
// ==/WindhawkMod==
export function prevent<T extends unknown[], R>(listener: (event: KeyboardEvent, ...rest: T) => R) {
return (event: KeyboardEvent, ...rest: T) => {
event.preventDefault();
event.stopPropagation();
return listener(event, ...rest);
};
}
import { createKeybindingsHandler } from "tinykeys";
// code from https://github.com/jaywcjlove/hotkeys-js/blob/master/src/index.js
function isInput(event: KeyboardEvent) {
const target = event.target as HTMLInputElement;
const { tagName } = target;
const isInput =
tagName === "INPUT" &&
!["checkbox", "radio", "range", "button", "file", "reset", "submit", "color"].includes(
target.type,
@pongo
pongo / 170531.ahk
Last active June 8, 2025 10:49 — forked from bobuk/switcher.ahk
So bored to use default keyboard layouts switcher so write mine with ahk
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)
ru := DllCall("LoadKeyboardLayout", "Str", "00000419", "Int", 1)
~<+RControl::SetLayout(ru)
~>^LShift::SetLayout(ru)
~RControl::SetLayout(en)
#Space::ChangeLayout()
!Space::ChangeLayout()
ol {
padding-inline-start: 0;
list-style: none;
counter-reset: my-counter;
display: grid;
grid-template-columns: auto 1fr;
row-gap: 0.5rem;
}
ol li {
display: contents;
function debounce(fn, delay) {
let timer;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => fn.apply(this, args), delay);
};
}
#SingleInstance, force
#NoEnv
#KeyHistory 0
SendMode Input
; Menu, Tray, Icon, C:\Program Files\Mozilla Firefox\firefox.exe
GroupAdd, WorkIn , ahk_exe firefox.exe
GroupAdd, WorkIn , ahk_exe chrome.exe
GroupAdd, WorkIn , ahk_exe msedge.exe
GroupAdd, WorkIn , ahk_exe browser.exe
@pongo
pongo / no-flash-window.wh.cpp
Last active January 11, 2026 10:42
NoFlashWindow for 10 seconds
// ==WindhawkMod==
// @id no-flash-window-fork
// @name NoFlashWindow
// @description Prevent programs from flashing their windows on the taskbar
// @version 1.0
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include *