Skip to content

Instantly share code, notes, and snippets.

@twobob
twobob / MultiplayerSpawnerExtender.gs
Created February 27, 2026 23:07
if you need to pass extra stuff to spawn
extends MultiplayerSpawner
# Example of packing multiple data points into the single allowed argument
func trigger_player_spawn(id: int, spawn_pos: Vector2, player_name: String):
var spawn_data = {
"id": id,
"position": spawn_pos,
"name": player_name
}
# Call spawn with the single dictionary argument
@twobob
twobob / spec_ops_header_bye_bye.js
Created February 26, 2026 04:49
https://specterops.io header remover bookmarklet
javascript:void%20function(){var%20a=document.getElementById(%22rs-so-web-redesign-header%22);a%26%26(a.style.display=%22none%22);var%20b=document.querySelectorAll(%22article%22);for(var%20i=0;i%3Cb.length;i%2B%2B){b%5Bi%5D.style.setProperty(%22margin-top%22,%220%22,%22important%22)}}();
@twobob
twobob / convert_to_ogg.cmd
Created February 23, 2026 17:52
if ffmpeg is in your path this allows a right click to convert on windows
@echo off
ffmpeg -hide_banner -loglevel error -y -i "%~1" -vn -c:a libvorbis -q:a 6 "%~dpn1.ogg"
@twobob
twobob / acemusic_mp3_dl.js
Created February 19, 2026 01:49
adds a download button to acemusic.ai and also converts the mp4 to mp3 on the way down - client side
javascript:void%20function(){var%20a=Math.max;function%20b(a,b=%22%23222%22){let%20c=document.getElementById(%22ace-dl-status%22);c||(c=Object.assign(document.createElement(%22div%22),{id:%22ace-dl-status%22}),c.style.cssText=%22position:fixed;bottom:20px;right:20px;padding:10px%2014px;border-radius:8px;font:600%2013px/1.4%20system-ui;z-index:2147483647;box-shadow:0%204px%2012px%20rgba(0,0,0,.35);max-width:340px;word-break:break-word%22,document.body.appendChild(c)),Object.assign(c.style,{background:b,color:%22%23fff%22}),c.textContent=a,clearTimeout(window.__aceStatusTimer),window.__aceStatusTimer=setTimeout(()=%3Ec.remove(),6e3)}function%20c(a){if(!a||%22string%22!=typeof%20a)return!1;const%20b=a.toLowerCase();return%20b.includes(%22ace-music.s3%22)%26%26b.includes(%22/app/user/works/%22)%26%26b.includes(%22awsaccesskeyid=%22)%26%26b.includes(%22signature=%22)}function%20d(a){const%20b=(a||%22%22).split(%22%3F%22)[0].toLowerCase().match(/\.(aac|m4a|mp3|wav|ogg|mp4)$/);return%20b%3Fb[1]:%22mp4%22}function%20
@twobob
twobob / ConsoleSnippet.js
Last active February 19, 2026 01:45
Bookmarklet to add a "download the last URL played as a file" button temporarily to the acemusic.ai UI - V2 with mp3 conversion
javascript:void%20function(){var%20a=Math.max;function%20b(a,b=%22%23222%22){let%20c=document.getElementById(%22ace-dl-status%22);c||(c=Object.assign(document.createElement(%22div%22),{id:%22ace-dl-status%22}),c.style.cssText=%22position:fixed;bottom:20px;right:20px;padding:10px%2014px;border-radius:8px;font:600%2013px/1.4%20system-ui;z-index:2147483647;box-shadow:0%204px%2012px%20rgba(0,0,0,.35);max-width:340px;word-break:break-word%22,document.body.appendChild(c)),Object.assign(c.style,{background:b,color:%22%23fff%22}),c.textContent=a,clearTimeout(window.__aceStatusTimer),window.__aceStatusTimer=setTimeout(()=%3Ec.remove(),6e3)}function%20c(a){if(!a||%22string%22!=typeof%20a)return!1;const%20b=a.toLowerCase();return%20b.includes(%22ace-music.s3%22)%26%26b.includes(%22/app/user/works/%22)%26%26b.includes(%22awsaccesskeyid=%22)%26%26b.includes(%22signature=%22)}function%20d(a){const%20b=(a||%22%22).split(%22%3F%22)[0].toLowerCase().match(/\.(aac|m4a|mp3|wav|ogg|mp4)$/);return%20b%3Fb[1]:%22mp4%22}function%20
@twobob
twobob / audio.gd
Last active February 3, 2026 23:20
loading and playing from a list of sounds with timed Xfade. provides a very basic test UI for the task. When the fancy meta options are too much for your needs.
extends Node3D
# Enhanced 3D Audio Player with crossfade, debug UI, and auto-setup
# Audio players for crossfading
var audio_player1: AudioStreamPlayer3D
var audio_player2: AudioStreamPlayer3D
var current_player: AudioStreamPlayer3D
var next_player: AudioStreamPlayer3D
# Playlist configuration
@twobob
twobob / commands_for_windows.cmd
Last active January 28, 2026 01:03
counts words passed from stdio in go, learning script
taskkill /F /IM counter.exe /T 2>$null
del /F counter.exe
go build -o counter.exe counter.go
echo yeah baby | counter.exe
2
@twobob
twobob / UnityGuidRegenerator.cs
Created January 27, 2026 23:42 — forked from ZimM-LostPolygon/UnityGuidRegenerator.cs
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {
@twobob
twobob / jam.strudel
Created January 27, 2026 20:53
strudel file for a rando xylo player with beats
setcpm(60/4)
addVoicings('cookie', {
7: ['3M 7m 9M 12P 15P', '7m 10M 13M 16M 19P', '3M 6M 9M 13M 15P', '7m 9M 13M 16M 20P'],
'^7': ['3M 6M 9M 12P 14M', '7M 10M 13M 16M 19P', '3M 7M 10M 14M 17M', '6M 10M 14M 17M 21M'],
m7: ['8P 11P 14m 17m 19P', '5P 8P 11P 14m 17m', '3m 7m 10m 14m 17m', '5P 10m 14m 17m 19P'],
m7b5: ['3m 5d 8P 11P 14m', '5d 8P 11P 14m 17m', '3m 5d 10m 14m 17m', '8P 12d 15P 17m 21m'],
o7: ['3m 6M 9M 11A 15P', '3m 5d 8P 11A 14d', '6M 9M 12d 15P 18d'],
'7alt': ['3M 7m 10m 13m 15P', '3M 6m 10m 13m 16m', '7m 10m 13m 16m 18A'],
'7#11': ['7m 10m 13m 15P 17m', '3M 7m 11A 14M 17m', '7m 11A 14M 17m 19P'],
@twobob
twobob / beats.py
Last active January 19, 2026 18:58
I need some breaky beats. Now. no deps
import struct
import math
import random
import os
# --- MIDI CONSTANTS ---
PPQ = 960
# General MIDI Map
KICK = 36