Skip to content

Instantly share code, notes, and snippets.

View donnaken15's full-sized avatar
🌲
PINE GANG 2⃣1⃣⛷💨😝😱😭💾💾😉📠♿️😇😬😄🔥🔥🔥🙌🌚

Wesley donnaken15

🌲
PINE GANG 2⃣1⃣⛷💨😝😱😭💾💾😉📠♿️😇😬😄🔥🔥🔥🙌🌚
View GitHub Profile
; BASIC TEST
mov r0, #123 ; multicand
mov r1, #0xFF00 ; multiplier
bl mul ; unsigned
; CYCLE TEST (add vs lsl)
mov r0, #0xA900
mov r1, #39
bl mul
@donnaken15
donnaken15 / TRON_DL.BAT
Created June 13, 2024 22:49
download and extract TronScript using a list of mirrors, and prompt upon error
@if (@CodeSection == @Batch) @then
@echo off
where /q curl || goto fail
where /q grep || goto fail
set ESC=[
for %%H in (
https://bmrf.org/repos/tron
https://mirror.meamod.com/tron
https://bodkov.com
) do ( call :try "%%H" && exit /b )
@donnaken15
donnaken15 / south_park_unaired_pilot_outtakes.diff
Last active June 20, 2024 20:39
Outtaken lines heard in the background of the audio commentary for the unaired South Park pilot
Outtaken voice lines heard in the audio commentary
--- a/south_park_unaired_pilot.txt
+++ b/south_park_unaired_pilot.txt
@@ 1:43 @@ Kick the baby.
Wahh!
-<silver shatter sound effect>
+<metal clonking sound effect>
@@ 5:56 @@ What am I supposed to do, Barbrady?
Just stand here and watch my
cattle get mutilated one by one?
@donnaken15
donnaken15 / prime64_M_rs.asm
Last active June 13, 2024 22:53
further optimized prime counter with reordered code to avoid register stall (actually working :O) and check and compare square root of current number, allocate more than reserved memory will allow
format PE64 console 3.1
entry @f
include 'win64a.inc'
MAX_ITERATIONS = 100000000
section '' import code data \
@donnaken15
donnaken15 / dedupe
Last active June 10, 2024 11:21
Group duplicates of files into hardlinks, check similarity using BLAKE2/SHA256 and matching file size, primarily for Windows/Cygwin/MSYS2
#!/bin/zsh
[ $# -eq 1 ] && {
echo you must specify more than one file to be deduped
echo
}
[ $# -lt 2 ] && {
echo "dedupe [input files]"
echo "- replace multiple unchanging"
echo copies of the same files with
echo hardlinks to save space
@donnaken15
donnaken15 / prime64_M.asm
Created April 3, 2024 06:38
FASM: further optimized prime number counter using array that expands with each prime number found, to not waste extra division ops (i.e. don't % 9, 15, 21, 25, 27, etc)
format PE64 console 3.1
entry @f
include 'win64a.inc'
MAX_ITERATIONS = 100000000
; 1kb EXE 1337
@donnaken15
donnaken15 / prime_ARM.asm
Last active March 17, 2024 09:18
Prime number counter in ARM assembly, based on 2018-2020 code
; wesley's prime number check in ARM
mov r0, #5 ; i
loop mov r1, #3 ; j
check mov r2, r0 ; modulo (cheap)
modl sub r2, r2, r1
cmp r2, r1
bhs modl ; r2 > r1
cmp r2, #0 ; == 0
beq fail ; then not prime
; continue
@donnaken15
donnaken15 / pakdir.cs
Created February 24, 2024 07:13
pakdir, before hardcore EXE optimization
/*
* Created by SharpDevelop.
* User: Wesley
* Date: 2/21/2024
* Time: 3:55 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.IO;
@donnaken15
donnaken15 / perftest.sh
Created November 25, 2023 05:29
Updated FastGH3 audio encoding speed test shell scripts (requires sox, helix, ffmpeg) (put in music/tools folder)
if [ ! "$(dirname "$0")" = "." ]; then
here=$(realpath "$0")/
else
here=$(which "$0")/
fi
here=$(dirname "$here")
TIMEFORMAT=%R
LPARAMS="--cbr -b 128 --resample 44100 -m j"
@donnaken15
donnaken15 / dadabots_tape
Created November 24, 2023 10:19
Tape currently broadcasting neural mathcore
#!/bin/sh
echo Current time: $(date +"%F %H:%M:S")
echo Hit Ctrl+C to stop taping.
AUDIO_FORMAT=233
STREAM_URL=MwtVkPKx3RA
M3U=$(ytdl -f $AUDIO_FORMAT -g "${STREAM_URL}")
SAMPRATE=16000
#BITRATE=80000 -ab ${BITRATE}
ffmpeg -i "${M3U}" -ac 1 -ar ${SAMPRATE} -q 7 -loglevel warning -hide_banner DADABOTS_TAPE_$(date +%F_%H_%M_%S.%N).ogg