Skip to content

Instantly share code, notes, and snippets.

View yell0wsuit's full-sized avatar
:atom:

yell0wsuit

:atom:
View GitHub Profile
@yell0wsuit
yell0wsuit / accentcolor.py
Created January 3, 2026 07:11
Python script to extract accent colors from images using K-means clustering in perceptually uniform color spaces (Lab/Oklab). Outputs colors in hex, RGB, and Oklch formats
"""
Extract accent colors from images using perceptual color spaces.
Provides hex, RGB, and Oklch color representations for UI theming.
"""
import colorsys
import sys
from typing import cast
@yell0wsuit
yell0wsuit / extract_appledict_entries.py
Last active July 9, 2025 10:25
Python script to extract Apple Dictionary entries from AppleDict source XML format.
"""
Script to extract Apple Dictionary entries from AppleDict source XML format to HTML files.
You will need to use pyglossary to extract the dictionary's Body.data to XML first.
Usage:
python extractentries.py input.xml output_folder/
"""
import os
import re
@yell0wsuit
yell0wsuit / favicongenerator.bat
Created February 8, 2024 04:10
Generate favicon for website on Windows
@echo off
setlocal enabledelayedexpansion
set IMAGE=favicon.png
set OUTPUT=favicon.ico
set SIZES=16 32 64 128 192 256
:: Create a temporary directory for resized images
set TEMP_DIR=%~dp0temp_ico
mkdir "!TEMP_DIR!"
@yell0wsuit
yell0wsuit / iconsizegenerator.bat
Created February 8, 2024 04:08
Generate various icon sizes for webpage with ImageMagick (on Windows)
@echo off
set IMAGE=favicon.png
set SIZES=16 32 64 128 180 192 256
for %%s in (%SIZES%) do (
magick convert "%IMAGE%" -resize %%sx%%s "icons/appicon-%%s.png"
)
@yell0wsuit
yell0wsuit / listonlyeveryfiles
Created February 15, 2022 04:05
List only files in the current folder and subfolder inside it.
dir /b /o:n /s /a:-d > onlyfilespls.txt
From https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dir
/b: Displays a bare list of directories and files, with no additional information. The /b parameter overrides /w.
/o:n: Sorts the output according to name (alphabetically).
/s: Lists every occurrence of the specified file name within the specified directory and all subdirectories.
/a:-d: Displays only the names of those files. -d means excluding directories.