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
#!/usr/bin/printf %.0s%.0s%.0s%.0s%.0s%.0sThis is a utility which cannot be used standalone.\nUsage: source dotload [appname]\n
# dash compatible barebones conf loader
#
# making this separate for the sake of not copy pasting this across
# utilities i will make that allow configuration (usually not (lol))
[ -z "$1" ] && {
echo 'dotload: No configuration name provided.'
return 1
}
local conf="$1"
; 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 October 28, 2024 04:12
Group duplicates of files into hardlinks, check similarity using BLAKE2/SHA256 and matching file size, primarily for Windows/Cygwin/MSYS2 | Jump to comments: https://gist.github.com/donnaken15/f95e8a143bb330fcf7d6268a4d6929e8?permalink_comment_id=5166431#gistcomment-5166431
#!/bin/zsh
# I'M ACTIVELY FORGETTING HOW MY OWN SCRIPT WORKS!!!!!!!!!!!!!!
[ $# -lt 2 ] && [[ ! "$1" == *[\*\?]* ]] && {
[ $# -eq 1 ] &&
echo 'you must specify more than one file to be deduped' &&
echo
echo 'dedupe [input files]'
echo '- replace multiple unchanging copies of'
echo ' the same files with hardlinks to save space'
echo '- as of now, it is recommended to execute this'
@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"