Skip to content

Instantly share code, notes, and snippets.

View Dobby233Liu's full-sized avatar
😵‍💫

Liu Wenyuan Dobby233Liu

😵‍💫
View GitHub Profile
from lxml import etree
import glob
from pathlib import Path
SOUND_DIR = "sound/"
AUDIO_DIR = SOUND_DIR + "audio/"
unused_audio = list(map(lambda x: x.replace("/", "\\"), glob.iglob(f"{AUDIO_DIR}/*")))
for sound_info_file in Path(".").glob(f"{SOUND_DIR}*.sound.gmx"):
@Dobby233Liu
Dobby233Liu / use_external_audio.py
Created January 21, 2024 14:12
XPath is something
from lxml import etree
import glob
def externalize(sound_info_file, streamed=True, bitrate=96, stereo=True):
sound_info_file = sound_info_file + ".sound.gmx"
sound_info = etree.parse(sound_info_file)
sound_info.find("/compressed").text = "1"
sound_info.find("/streamed").text = streamed and "1" or "0"
sound_info.find("/bitRates/bitRate").text = str(bitrate)
sound_info.find("/types/type").text = stereo and "1" or "0"
// heavily modified version of https://copyprogramming.com/howto/using-mailslots#reading-from-a-mailslot
#include <iostream>
#include <Windows.h>
#define csMe "WinlogMonitor"
#define csMailslotName "WinLog"
int main()
{
@Dobby233Liu
Dobby233Liu / isex.user.js
Last active July 20, 2024 13:39
Discord CDN timebomb informer: Prints to the console about the issued/expires search parameters in Discord attachment URLs
// ==UserScript==
// @name Discord CDN timebomb informer
// @namespace https://dobby233liu.github.io
// @version 1.0.0c
// @description Prints to the console about the issued/expires search parameters in Discord attachment URLs
// @author Liu "Dobby233Liu" Wenyuan
// @match https://media.discordapp.net/attachments/*
// @match https://cdn.discordapp.com/attachments/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant none
@Dobby233Liu
Dobby233Liu / parseml.py
Last active September 15, 2023 13:01 — forked from urschrei/parseml.py
(Attempt to) extract (everything) from EML files (specified in command args), and write them to (a well-named) output subdir
#!/usr/bin/env python
"""
2020 update:
- More iterators, fewer lists
- Python 3 compatible
- Processes files in parallel
(one thread per CPU, but that's not really how it works)
hacked to dump everything
import sys
import os
from lib import enc_key, map_out, decrypt
in_file = len(sys.argv) > 1 and sys.argv[1]
while not in_file or not os.path.exists(in_file):
in_file = input("in: ")
in_file = os.path.relpath(in_file)
out_file, des_magic = map_out(in_file)
@Dobby233Liu
Dobby233Liu / README.md
Last active August 23, 2023 10:20
Two CRT shaders hastily ported for love2d
Wild Pasta
Betty: Imao you are loser.
:frisk_gulag: I am very piss. Frisk's LV is 5 now
Funnyman EX
Frisk is now a 5 year old.
Betty outta die without the evil black stuff.
Wild Pasta
a few minutes later
@Dobby233Liu
Dobby233Liu / quotev-speedrun.user.js
Last active July 19, 2025 14:00
QUOTEV SPEEDRUN: ANSWERS EVERY QUIZ WITH RANDOM ANSWERS, BECAUSE I DON'T CARE AND NEITHER SHOULD YOU
// ==UserScript==
// @name QUOTEV SPEEDRUN
// @version 1.2.2a
// @author Liu Wenyuan
// @namespace https://dobby233liu.neocities.org
// @description ANSWERS EVERY QUIZ WITH RANDOM ANSWERS, BECAUSE I DON'T CARE AND NEITHER SHOULD YOU
// @match https://www.quotev.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=quotev.com
// @grant none
// @require https://unpkg.com/[email protected]/minified/arrive.min.js
<!doctype html>
<html lang="en">
<head>
<title>Undertale text color explaination</title>
<style>
html { background-color: black; }
body {
width: 480px;
margin: 0; padding: 0.8em;
background-color: #5c5c5c; color: white;