Skip to content

Instantly share code, notes, and snippets.

View Dobby233Liu's full-sized avatar

Liu Wenyuan Dobby233Liu

View GitHub Profile
/* ==UserStyle==
@name 个人空间变宽
@namespace dobby233liu.github.io
@version 0.9.15
@license BSD-0-Clause
@author Liu Wenyuan
@homepageURL https://gist.github.com/Dobby233Liu/f91b843fca90fd983f95ff9cd38e2410
@supportURL https://gist.github.com/Dobby233Liu/f91b843fca90fd983f95ff9cd38e2410#comments
@updateURL https://gist.github.com/Dobby233Liu/f91b843fca90fd983f95ff9cd38e2410/raw/space-widen.user.css
==/UserStyle== */
from pydub import AudioSegment
from itertools import islice
def batched(iterable, n):
i = 0
while i < len(iterable):
yield iterable[i:i+n]
i += n
THRESOLD = 3000
song = AudioSegment.from_file("icepalace_boss loopfix2.flac")
newsong = song.empty()
/* ==UserStyle==
@name 动态列表变宽加强版
@namespace dobby233liu.github.io
@version 1.1.6
@license BSD-0-Clause
@author Liu Wenyuan
@homepageURL https://gist.github.com/Dobby233Liu/3f08f12a2c675f8b847dfbbb6ce34452
@supportURL https://gist.github.com/Dobby233Liu/3f08f12a2c675f8b847dfbbb6ce34452#comments
@updateURL https://gist.githubusercontent.com/Dobby233Liu/3f08f12a2c675f8b847dfbbb6ce34452/raw/opus-widen-dyn-list.user.css
==/UserStyle== */
// ==UserScript==
// @name Highlight Position Fix
// @namespace http://tampermonkey.net/
// @version 2024-08-10
// @description try to take over the world!
// @author You
// @match https://t.bilibili.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @grant none
// ==/UserScript==
#pragma author Dobby233Liu
#pragma description Arc System Works Rockin' Pretty archive
#pragma endian little
struct file<auto data_start> {
char name[64];
u32 size_uncompressed;
u32 size_compressed;
u32 data_offset;
u8 data[size_compressed] @ data_start + data_offset;
meta:
id: gm_iff_audo
file-extension:
- win
- dat
imports:
- /media/wav
- /media/ogg
title: "GameMaker: Studio WAD (sound-related chunks only, bytecode 14+)"
license: CC0-1.0
sFontFn = "Fonts\方正像素.TTF"
Set objShell = CreateObject("Shell.Application")
Set objFs = CreateObject("Scripting.FileSystemObject")
Set objBaseDir = objShell.Namespace(objFs.GetParentFolderName(WScript.ScriptFullName))
nWinFontNsId = &H14&
objShell.Namespace(nWinFontNsId).CopyHere objBaseDir.ParseName(sFontFn)
@Dobby233Liu
Dobby233Liu / makeloop.py
Created March 1, 2024 15:02
SATS 2013 intro/loop matcher
from glob import iglob
from objprint import op
import os
import re
DEALL_REGEX = re.compile(r"(.*)(?:[iI]ntro|[lL]oop).*\.ogg$")
def neutralize_sep(i):
return i and i.replace(os.sep, "/") or i
@Dobby233Liu
Dobby233Liu / LICENSE
Last active February 18, 2024 23:30
This overcomplicated sine distortion shader for LÖVE contains everything I need and you possibly want
Copyright (c) 2024 Liu Wenyuan
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
@Dobby233Liu
Dobby233Liu / Scripts.rvdata2-exporter.rb
Last active February 16, 2024 13:52 — forked from FiXato/Scripts.rvdata2-exporter.rb
Script to export the scripts inside the Scripts.rxdata data file to Scripts as plain text Ruby files. Deals with the invalid characters that the edgy thing that's Undertale Zero Genocide inserts in its script names.
#! /usr/bin/env ruby
# encoding: utf-8
# Script to export the scripts inside the Scripts.rxdata data file to Scripts as plain text Ruby files.
# Based on FiXato/Scripts.rvdata2-exporter.rb https://gist.github.com/FiXato/5323361
require "fileutils"
require "zlib"
class Exporter
def self.export_scripts