This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stereo_vol_zero_middle(panning): | |
assert panning >= -1 and panning <= 1 | |
left, right = 1, 1 | |
if panning < 0: | |
right = right - abs(panning) | |
elif panning > 0: | |
left = left - abs(panning) | |
return left, right |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |