Skip to content

Instantly share code, notes, and snippets.

View shinmai's full-sized avatar
😫
coping admirably

Shi Saaristo shinmai

😫
coping admirably
View GitHub Profile
@shinmai
shinmai / main.cpp
Last active March 15, 2025 12:19
lightweight Win32 temperature monitor using LibreHardwareMonitor and lhwm-wrapper
/*
Requires:
1. LibreHardwareMonitorLib.dll from https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/
2. lhwm-wrapper.dll, lhwm-cpp-wrapper.lib & lhwm-cpp-wrapper.h from https://gitlab.com/OpenRGBDevelopers/OpenRGBHardwareSyncPlugin/-/tree/master/dependencies/lhwm-cpp-wrapper/
Link with lhwm-cpp-wrapper.lib, dwmapi.lib & mscoree.lib from .NET Framework 4.x
No config, manually adjust location, text size & style, monitored values and update delay in UpdateOverlay() and the code for the update thread in WinMain()
*/
#define WIN32_LEAN_AND_MEAN
@shinmai
shinmai / image-handler.js
Created February 21, 2025 09:42
Reddit/Imgur style image serving beautifier as Netlify Edge Function
// netlify/edge-functions/image-handler.js
import mime from "https://esm.sh/mime/lite"
/**
* Checks if client's request headers have an Accept header with text/html,
* and if the client _is_ asking for a web page, serves one, otherwise serves the image file.
*/
export default async (request, context) => {
const url = new URL(request.url)
if (request.headers.get("accept")?.includes("text/html")) {
/**
* @name BrutalHonesty
* @author @shi.rip
* @description Replaces subtext with brutal honesty
* @version 0.0.3
*/
/*
CHANGELOG
0.0.1 - 250131 - initial version
@shinmai
shinmai / NoAFK.plugin.js
Last active September 14, 2024 18:36
BetterDiscord plugin to try to stop being AFK
/**
* @name No AFK
* @description Try to stop being AFK
* @version 0.0.1
* @author shi
* @authorId 142594671078539264
* @website https://shi.wtf/
* @source https://gist.github.com/shinmai/a1d92b4b5a84b78c9aa70b5559731135/raw//NoAFK.plugin.js
*/
@shinmai
shinmai / SanitiseFilenames.plugin.js
Created May 21, 2024 08:35
BetterDiscord addon/plug-in to sanitise filenames when uploading
/**
* @name Sanitise Filenames
* @description Hide filenames!
* @version 0.0.1
* @author shi
* @authorId 142594671078539264
* @website https://shinmai.wtf/
* @source https://gist.github.com/shinmai/a8ad7842ef30f7c82b01f37ff233b86f/raw/SanitiseFilenames.plugin.js
*/
@shinmai
shinmai / SushUp.plugin.js
Last active September 19, 2024 07:31
BetterDiscord addon/plug-in to try and keep from accidentally pinging people
/**
* @name Sush Up!
* @description STOP PINGING YOUR FRIENDS!
* @version 0.0.2
* @author shi
* @authorId 142594671078539264
* @website https://shinmai.wtf/
* @source https://gist.github.com/shinmai/4d07a79f4f9ede6659efd470b7662bec/raw/SushUp.plugin.js
*/
@shinmai
shinmai / DontBeABother.plugin.js
Last active April 16, 2024 11:33
BetterDiscord addon/plug-in to help trying to keep from being a nuissance
/**
* @name Don't Be A Bother!
* @description Try to be less cringey on Discord
* @version 0.0.2
* @author shi
* @authorId 142594671078539264
* @website https://shinmai.wtf/
* @source https://gist.github.com/shinmai/78df3b2237345d8b273eca671e2135bb/raw/DontBeABother.plugin.js
* @updateUrl https://gist.github.com/shinmai/78df3b2237345d8b273eca671e2135bb/raw/DontBeABother.plugin.js
*/
@shinmai
shinmai / wipe-it-on-a-sock.user.js
Last active April 14, 2024 11:57
Replace Pateron dot com cumstain with an actual logo 🤯
// ==UserScript==
// @name replace cumstain with a logo
// @namespace wtf.shinmai.userscripts
// @version 0.0.4
// @description Replace the Patron dot com cumstain with an actual logotype, for fun
// @author @shinmai - shinmai.wtf
// @match https://www.patreon.com/*
// @icon https://i.imgur.com/jmpscwv.png
// @updateURL https://gist.github.com/shinmai/fbb442875139033f690716044b3814b4/raw/wipe-it-on-a-sock.user.js
// @downloadURL https://gist.github.com/shinmai/fbb442875139033f690716044b3814b4/raw/wipe-it-on-a-sock.user.js
@shinmai
shinmai / LHF-autoplay.user.js
Last active January 8, 2024 21:00
Low Hanging Fruit: the Soundgasm Gaylewdst Userscript
// ==UserScript==
// @name Low Hanging Fruit: the Soundgasm Gaylewdst Userscript (autoplay)
// @namespace rip.aapo.userscript
// @version 0.0.2
// @description sometimes you need more than one 🤔 (it hacks a simple playist into Soundgasm)
// @author @shinmai - shinmai.wtf
// @match https://soundgasm.net/u/*/*
// @updateURL https://gist.github.com/shinmai/487d2de059d8b4ae0b90cfab21e0d75e/raw/LHF-autoplay.user.js
// @downloadURL https://gist.github.com/shinmai/487d2de059d8b4ae0b90cfab21e0d75e/raw/LHF-autoplay.user.js
// @grant none
@shinmai
shinmai / sndgsm.user.js
Last active December 5, 2023 18:33
soundgasm page reTITler
// ==UserScript==
// @name soundgasm page reTITler
// @namespace rip.aapo.userscript
// @version 0.0.2
// @description change soundgasm audio pages' title to show uploader username and audio title
// @author @shinmai - shinmai.wtf
// @match https://soundgasm.net/u/*/*
// @grant none
// @updateURL https://gist.github.com/shinmai/dab42de2e205b897f9548bd0e01ff9e1/raw/sndgsm.user.js
// @downloadURL https://gist.github.com/shinmai/dab42de2e205b897f9548bd0e01ff9e1/raw/sndgsm.user.js