Skip to content

Instantly share code, notes, and snippets.

@bowsersenior
bowsersenior / stooge_loader.rb
Created May 18, 2011 23:18
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@Myndex
Myndex / brintness.md
Last active December 4, 2026 21:39
Fast Integer Lightness: brintness

BRINTNESS

Fast integer lightness calculations from RGB — by Andrew Somers

brintness is an integer brightness/lightness/darkness calculation

This is part of an experiment in estimating a perceived brightness while remaining in integer math and using bitshifts to maximize performance (avoiding all subtraction, division, and square-root calculations).

The Issue

The traditional means to determine the perceived lightness or brightness for a given color value is to first normalize R, G, and B from 0-255 to 0.0-1.0, linearize the values via exponent or more exotic methods (we assume colors are in a gamma encoded color space, such as sRGB), and then after linearizing, creating a linear luminance value by applying coefficients to each of the R, G, B values, adding them, and then finally applying an exponent or more exotic math to find a predicted lightness value.

@rvtr
rvtr / decrypt_tad.py
Last active December 4, 2026 21:32 — forked from NWPlayer123/decrypt_tad.py
Tool for decrypting DSi TADs (not the ones listed on dsibrew, that's wrong, the installable ones that are closer to WADs), py2/3
from io import BytesIO
from struct import unpack
from binascii import hexlify, unhexlify
from Crypto.Cipher import AES #pip install pycryptodome
import sys
dsi_common_key = unhexlify(b"%032X" % 0xAF1BF516A807D21AEA45984F04742861) # DSi common key
debugger_common_key = unhexlify(b"%032X" % 0xA2FDDDF2E423574AE7ED8657B5AB19D3) # DSi debugger common key (used for `maketad.updater` TADs)
wii_debug_key = unhexlify(b"%032X" % 0xA1604A6A7123B529AE8BEC32C816FCAA) # Wii debug key

librdkafka Performance Tuning Guide

Target version: librdkafka v2.13.x (latest stable as of March 2026) Applies to: All language bindings built on librdkafka - confluent-kafka-python, confluent-kafka-go, confluent-kafka-dotnet, node-rdkafka, Karafka/rdkafka-ruby, and others.


1. Building Kafka Performance from the Hardware Up

Before touching a single configuration property, ensure the underlying infrastructure matches the workload profile.

@HybridDog
HybridDog / ssim_perceptual_downscaling.c
Last active December 4, 2026 21:29
SSIM-based perceptual image downscaling for PNG images
// SPDX-License-Identifier: MIT
//
// This program contains an implementation of SSIM-based perceptual image
// downscaling for PNG images.
// The program can be twice as fast when compiled with -Ofast.
// The program behaviour can be adjusted with predefined preprocessor macros:
// * -DTILEABLE: Assume images wrap around at corners. This should be enabled
// when downscaling tileable textures.
// * -DGAMMA_INCORRECT: Downscale without applying the sRGB EOTF and OETF.
// When downscaling images with symbolic meaning, e.g. screenshots of text or
@ruvnet
ruvnet / .gist-v0.6.5.md
Created May 18, 2026 21:56
RuView v0.6.5-esp32 — open-source WiFi sensing on a $9 ESP32 board (presence, vitals, motion through walls — no camera)

See through walls with WiFi — RuView v0.6.5 firmware released

Most rooms are already full of radio waves. Your WiFi router is constantly transmitting, and your phone, laptop, and smart-home gear are constantly listening. Every human body in the room subtly disturbs those waves — moving, breathing, even just sitting still. RuView is open-source software that turns those disturbances into useful data: where people are, what they're doing, whether they're okay.

Just shipped v0.6.5 of the ESP32 firmware. This is the bit that runs on the $9 sensor board.

Links:

@broestls
broestls / Remove_VMwareTools.ps1
Last active December 4, 2026 21:22
Force removal of VMware Tools, Program Files, and Windows Services
# This script will manually rip out all VMware Tools registry entries and files for Windows 2008-2019
# Tested for 2019, 2016, and probably works on 2012 R2 after the 2016 fixes.
# This function pulls out the common ID used for most of the VMware registry entries along with the ID
# associated with the MSI for VMware Tools.
function Get-VMwareToolsInstallerID {
foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) {
If ($item.GetValue('ProductName') -eq 'VMware Tools') {
return @{
reg_id = $item.PSChildName;
@karl-zylinski
karl-zylinski / android_triangle.odin
Last active December 4, 2026 21:20
Minimal Android GL ES triangle
/* Minimal android GL ES triangle.
BUILD INSTRUCTIONS
1) Use https://gist.github.com/karl-zylinski/8b07ef223c76cd80e708cd3da8d969f6 to download and set up
Android SDK, NDK and JRE. You may need to add things to environment variables like the script
tells you when it finishes running. I'll refer to the folder where you put the stuff as <android_sdk>
2) Next to this file, create a folder called `app`. Put the following inside `app/AndroidManifest.xml`:
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active December 4, 2026 21:12
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@skylandersNFC
skylandersNFC / Skylanders_Helpdesk_ROMs.md
Created August 18, 2024 09:44
Skylanders_Helpdesk_ROMs by TheBiemGamer

Helpdesk ROMs

For Cemu, RPCS3, Dolphin and PC

Whats the difference between US and EU ROMs?

Almost nothing just in the EU ROMs there are some European languages added.

Cemu

.WUA File Compatibility