Skip to content

Instantly share code, notes, and snippets.

View defensem3ch's full-sized avatar

DEFENSE MECHANISM defensem3ch

View GitHub Profile
@defensem3ch
defensem3ch / botb_userscript.js
Last active February 1, 2023 22:31
BotB userscript
// ==UserScript==
// @name botb custom + donload grabber
// @author DEFENSE MECHANISM
// @version 0.4
// @namespace http://battleofthebits.org/
// @description Alternate layout and css for battleofthebits
// @updateURL https://github.com/defensem3ch/userscripts/raw/main/botb%20custom.user.js
// @downloadURL https://github.com/defensem3ch/userscripts/raw/main/botb%20custom.user.js
// @homepage https://defensemech.com
// @match https://battleofthebits.org/*
@defensem3ch
defensem3ch / concat.py
Last active January 28, 2022 02:42
Concatenate wav files into one evenly-spaced wav file (128-file limit)
# Concatenate wav files into one evenly spaced wav file
# Requires sox and PySox https://github.com/rabitt/pysox
# License: Public domain
import sox, os
def combine_files(folder, files, out_filename, sample_rate, channels, bit_depth):
combine = sox.Combiner()
combine.convert(sample_rate, channels, bit_depth)
out_files = [f"{folder}/{file}" for file in files]
@defensem3ch
defensem3ch / bgb-tv.sh
Created January 4, 2021 15:38
BGB-TV Bash FFmpeg script to generate CRT-stylized output from raw AVI and WAV files from BGB
#!/bin/bash
# A collection of FFmpeg filterchains which can be used to create a stylised
# 'CRT screen' effect on given input, specialized for raw AVI and WAV output
# from BGB Gameboy emulator.
#
# Includes basic demonstration FFmpeg command which takes "$1" input
# of video and audio files without extensions
#
# Requires: