Skip to content

Instantly share code, notes, and snippets.

@pachuco
pachuco / whirling_pool.user.js
Last active January 22, 2026 07:12
Greasemonkey script to fix stuff on Whirled Club, for PaleMoon and similar browsers.
// ==UserScript==
// @name Whirling Pool
// @namespace whirled
// @description Fix stuff on Whirled Club, for PaleMoon and similar browsers.
// @include https://www.whirled.club/*
// @version 1.0
// @grant none
// ==/UserScript==
function patch_fixObjectEmbedFF() {
@pachuco
pachuco / fminstr.json
Last active July 16, 2024 18:40
Stupid FM synth
{
"id": "fmbank4stupidsynth",
"ver": "alpha01_4op_ARenv",
"instruments": [
{
"name": "2OP Tubular Bell",
"fbRatio": 0,
"opDetune": [0, 0, 0, 0],
"opFreqMul": [1.0, 3.5, 0, 0],
"opAmp": [1.0, 0.05, 0, 0],
@pachuco
pachuco / pastamasta.c
Created September 2, 2021 17:39
Util to turn text clipboard into keystroke sequence
#include <stdio.h>
#include <windows.h>
//Use: copy text to clipboard and press HOTKEY to type it back
// for those places where system clipboard doesn't reach.
#define HOTKEY VK_SCROLL
#define BLEEP_PITCH 2000
//#define KDELAY 5
@pachuco
pachuco / dynload.h
Last active November 20, 2020 13:59
Easilly create function pointers out of existing function definitions
#pragma once
#include <windows.h>
#define DEFFUN_OBJ(_HMOD, _ERR, _FNAME) __typeof__(_FNAME) *pf##_FNAME = NULL
#define DEFFUN_EXT(_HMOD, _ERR, _FNAME) extern __typeof__(_FNAME) *pf##_FNAME
#define DYNLOAD(_HMOD, _ERR, _FNAME) _ERR = _ERR ? _ERR : !(pf##_FNAME = (void*)GetProcAddress(_HMOD, #_FNAME))
//usage scenario
//You have a header full of function definitions that would result in linking to dll
//But you want to use them as dynamically loaded functions instead.
@pachuco
pachuco / displayswitch.c
Last active June 29, 2022 02:34
Utility to switch displays in winXP
#include <windows.h>
#include <stdio.h>
#include <stdint.h>
#define DEVNAME_LEN 32
#define A2I(x) ((uint8_t)(x-48))
static DEVMODEA dmActive;
static DEVMODEA dmWanted;
static char nameActive[DEVNAME_LEN];