Skip to content

Instantly share code, notes, and snippets.

@troopermax
troopermax / mount-storage-profiles.sh
Created January 16, 2026 23:24
Enable separate profiles on ROCKNIX for different users/testing/debugging/etc
# WARNING! This uses features not officially supported by ROCKNIX and may need to be modified for your use
# USE AT YOUR OWN RISK!
#
# ROCKNIX mount storage script (rename as mount-storage.sh on boot partition)
# This hooks into and borrows from the ROCKNIX init script heaviliy:
# https://github.com/ROCKNIX/distribution/blob/next/projects/ROCKNIX/packages/sysutils/busybox/scripts/init
# Example key codes
BTN_TL=310
BTN_SOUTH=304
@troopermax
troopermax / mount-storage-kali.sh
Last active January 15, 2026 04:21
Kali rootfs for ROCKNIX devices
# WARNING! This uses features not officially supported by ROCKNIX and may need to be modified for your use
# USE AT YOUR OWN RISK!
#
# ROCKNIX mount storage script (rename as mount-storage.sh on boot partition)
# This hooks into and borrows from the ROCKNIX init script heaviliy:
# https://github.com/ROCKNIX/distribution/blob/next/projects/ROCKNIX/packages/sysutils/busybox/scripts/init
#
# Debootstrap instructions inspired heavily by macromorgan's Debootstrap Development Image gist:
# https://gist.github.com/macromorgan/c776e3027b1ce0ebaedebf7d1863cd38
# WARNING! This uses features not officially supported by ROCKNIX and will need to be modified for your use
# USE AT YOUR OWN RISK!
#
# ROCKNIX mount storage script (rename as mount-storage.sh on boot partition) for Anbernic RG Arc (decrypt+btrfs options)
# This hooks into and borrows from the ROCKNIX init script heaviliy:
# https://github.com/ROCKNIX/distribution/blob/next/projects/ROCKNIX/packages/sysutils/busybox/scripts/init
echo "Decrypting storage... "
# cryptsetup seems to need this directory
# Example of adding additional GRUB boot options to allow booting with different KERNEL/dtb/SYSTEM combinations
# Extra entries not relevant to Flip 2 removed and load/save environment stuff disabled/commented out
# Derived from the included grub.cfg generated here:
# https://github.com/ROCKNIX/distribution/blob/5e67640658d9e687f153df1483765048b1bd0dfc/projects/ROCKNIX/devices/SM8250/bootloader/grub#L7https://github.com/ROCKNIX/distribution/blob/5e67640658d9e687f153df1483765048b1bd0dfc/projects/ROCKNIX/devices/SM8250/bootloader/grub#L7
insmod part_gpt
insmod part_msdos
#load_env
if [ "${saved_entry}" ]; then
set timeout="5"
# WARNING! This uses features not officially supported by ROCKNIX and will need to be modified for your use
# USE AT YOUR OWN RISK!
#
# ROCKNIX mount storage script for Retroud Pocket Flip 2 (decrypt+btrfs options)
# This hooks into and borrows from the ROCKNIX init script heaviliy:
# https://github.com/ROCKNIX/distribution/blob/next/projects/ROCKNIX/packages/sysutils/busybox/scripts/init
echo "Decrypting storage... "
# cryptsetup seems to need this directory
@troopermax
troopermax / ufu-rocm.sh
Created October 19, 2022 05:01
Ubuntu from Ubuntu! Script to run from live image to create new customized live image. (This version has ROCM)
#!/bin/bash
ROOT=$(realpath $(dirname ${BASH_SOURCE[0]}))
FSDIR=$ROOT/sfs-root
ISODIR=$ROOT/iso-root
DATE=$(date "+%y%m%d")
FILENAME="$(lsb_release -si | tr '[:upper:]' '[:lower:]')-$(lsb_release -sd | cut -d\ -f 2).${DATE}-rocm-$(dpkg --print-architecture).iso"
VOLNAME="ROCM${DATE}"
# Build ISO if no arguments
@troopermax
troopermax / ufu.sh
Last active October 19, 2022 05:00
Ubuntu from Ubuntu! Script to run from live image to create new customized live image.
#!/bin/bash
ROOT=$(realpath $(dirname ${BASH_SOURCE[0]}))
FSDIR=$ROOT/sfs-root
ISODIR=$ROOT/iso-root
DATE=$(date "+%y%m%d")
FILENAME="$(lsb_release -si | tr '[:upper:]' '[:lower:]')-$(lsb_release -sd | cut -d\ -f 2).${DATE}-ufu-$(dpkg --print-architecture).iso"
VOLNAME="UFU${DATE}"
# Build ISO if no arguments
@troopermax
troopermax / wordlehacks.js
Created January 28, 2022 22:30
Wordle Hacks!
// Wordle: https://www.powerlanguage.co.uk/wordle/
// Please play/give credit to the author!
// Below is just me poking at it a little bit with some tips/javascript
// Use Incognito mode for a fresh session!
// Modify your system time to replay Wordles from different dates!
// Javascript examples below developed/tested using Chrome browser
// Can be entered into the address bar after going to the Wordle site
// (Beware when copying/pasting, it may drop the javascript: prefix)
@troopermax
troopermax / AutoLogonSteam.bat
Last active January 22, 2022 01:35
Windows commands to add a new user that is automatically logged in upon startup and goes straight to Steam Big Picture mode! (Change User/password in the net user/reg add DefaultUserName/DefaultPassword commands, reboot and it should login and initialize the new account, after which you can delete Winlogon shell from Default or it will apply to …
echo start "STEAM" "C:\Program Files (x86)\Steam\Steam.exe" -bigpicture > C:\Users\Public\STEAMSHELL.BAT
reg load "HKU\Default" "C:\Users\Default\NTUSER.DAT"
reg add "HKU\Default\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /d C:\Users\Public\STEAMSHELL.BAT /f
reg unload "HKU\Default"
net user /add User password
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /d User /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /d password /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 1 /f
@pause