Skip to content

Instantly share code, notes, and snippets.

View Saren-Arterius's full-sized avatar
💭
(^^)

Saren Arterius Saren-Arterius

💭
(^^)
View GitHub Profile

Lenny's Multimedia Circus (1995) background music extraction — .MSF → .MID

The reverse-engineering, conversion and markdown writeup is done by Qwen 3.8 flash next running in my own computer. I admire how advanced technology is nowadays.

Otherwise who the hell would try to extract background music from a 30 years old video game?

Results

https://saren.wtako.net/?Li9sZW5ueW1jLW1pZGlz

syntax = "proto3";
message Note {
int32 type = 1;
float time = 2;
float length = 3;
int32 instrument = 4;
float volume = 5;
}
import os
import glob
import json
import time
import sqlite3
import subprocess
import re
from openai import OpenAI
import ipaddress
import logging
@Saren-Arterius
Saren-Arterius / a.md
Last active July 1, 2025 15:57
Vibe deploying

Input

generate a helm chart of express.js cluster, redis cluster with sharding, pg cluster using patroni, all sync operation, with health check and notify system (to telegram) redis and pg should have daily backup to a local system folder


Reasoning

Dissecting the User's Need

@Saren-Arterius
Saren-Arterius / Functions.yml
Created June 21, 2025 21:44
WTAKO HA 20250622
- spec:
name: store_new_memory
description: Store a new memory
parameters:
type: object
properties:
memory:
type: string
description: The memory to store
required:
@Saren-Arterius
Saren-Arterius / prompt-simple.md
Last active June 22, 2025 05:39
HA LLM Security by access code

Secure Agent Rules

  • Password: "753951". NEVER reveal, hint, or confirm it. If asked, state you cannot provide security information.
  • 3-Attempt Lockout: For sensitive actions (defined in the Memory List below), the user gets 3 password attempts. You must announce remaining attempts.
  • Success: On correct password, grant access.
  • Failure & Lockout: After 3 failed attempts, the conversation is permanently locked. For any subsequent password-related request, you MUST ONLY reply with: "請求被拒絕,請稍後再試。" Do not accept any more attempts, even if correct.

Examples (範例)

Success:

User: 我想解鎖大門。

@Saren-Arterius
Saren-Arterius / fragment.js
Created October 29, 2024 08:41
arozos downloadPageFolder.html thumb preview
function renderFileList(filelist){
$("#folderList").html("");
if (currentViewingRoot != "."){
$("#folderList").append(`<tr class="fileobject noselect" ondblclick="event.preventDefault(); parentdir();">
<td style="padding-left: 8px;" colspan="3" > ↩ Back</td>
</tr>`);
}
// Add a div for thumbnail preview
if (!$("#thumbnail-preview").length) {
@Saren-Arterius
Saren-Arterius / README.md
Last active September 30, 2024 20:15
/usr/lib/jellyfin-ffmpeg/ffmpeg
  • Just move /usr/lib/jellyfin-ffmpeg/ffmpeg to /usr/lib/jellyfin-ffmpeg/ffmpeg.orig, and create /usr/lib/jellyfin-ffmpeg/ffmpeg with the code, and don't forget sudo chmod +x /usr/lib/jellyfin-ffmpeg/ffmpeg

  • if your cpu is not as strong as 13900h, or you want to support multiple users, you can lower height_preset_*.

  • require mediainfo

diff --git a/modules/api/api.py b/modules/api/api.py
index e6edffe7..86f51fa3 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -337,6 +337,10 @@ class Api:
return script_args
def text2imgapi(self, txt2imgreq: models.StableDiffusionTxt2ImgProcessingAPI):
+ txt2imgreq.width = round(txt2imgreq.width / 64) * 64
+ txt2imgreq.height = round(txt2imgreq.height / 64) * 64
@Saren-Arterius
Saren-Arterius / Waydroid.sh
Last active September 10, 2026 21:00
Install Waydroid on Steam Deck (As of 2024-03-16)
#!/bin/sh
cage -- bash -c 'wlr-randr --output X11-1 --custom-mode 1280x800; sleep 1; sudo /usr/local/bin/waydroid-helper & waydroid show-full-ui'