Skip to content

Instantly share code, notes, and snippets.

@parkerlreed
parkerlreed / betteradbcopy
Last active July 10, 2026 21:11
betteradbcopy - Multi-threaded SCP to/from Android device over USB/WiFi with Termux
#!/bin/bash
# Make sure to have OpenSSH setup in Termux as well as setting a password with `passwd`
# Requires https://github.com/upa/mscp and adb platform tools on your local machine
init_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:\$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; sshd'"
adb forward tcp:8022 tcp:8022;
}
stop_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:\$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; killall sshd'"
.
├── archived
│   ├── applegamebox.net
│   │   ├── 1942_Pacific_Front_Premium_v1.2.0.ipa
│   │   ├── 2013 Infected Wars 1.1.2.ipa
│   │   ├── 2K DRIVE 1.7.ipa
│   │   ├── 300 Dwarves HD 1.2.ipa
│   │   ├── 33rd Division 1.0.3.ipa
│   │   ├── 3D_City_Run_2_v1.1_applegamebox.net.ipa
│   │   ├── 3D_Quad_Bikes_v1.1_applegamebox.net.ipa
#!/usr/bin/env python
import sys
import os
import re
import requests
import subprocess
from datetime import datetime, timezone
import shlex
# Relaunch in Konsole if not already in a terminal
.
├── archived
│   ├── add_files_to_aria2_rpc.sh
│   ├── applegamebox.net
│   │   ├── 1942_Pacific_Front_Premium_v1.2.0.ipa
│   │   ├── 2013 Infected Wars 1.1.2.ipa
│   │   ├── 2K DRIVE 1.7.ipa
│   │   ├── 300 Dwarves HD 1.2.ipa
│   │   ├── 33rd Division 1.0.3.ipa
│   │   ├── 3D_City_Run_2_v1.1_applegamebox.net.ipa
@parkerlreed
parkerlreed / dvd-saver
Last active March 26, 2026 06:00
Script to read tracks from corrupted/unfinalized DVD media
#!/bin/bash
# Device to read from
device="/dev/sr0"
# Get the current date and time
current_date_time=$(date +"%Y%m%d_%H%M%S")
# Function to parse the track information
parse_tracks() {
@parkerlreed
parkerlreed / firmware.patch
Created March 4, 2026 13:35
Meshtatic firmware patch for AG3335 to keep GPS on and output full messages to USB serial
diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp
index 2beaeb127..ac70a3630 100644
--- a/src/gps/GPS.cpp
+++ b/src/gps/GPS.cpp
@@ -644,13 +644,14 @@ bool GPS::setup()
// 1 1 1 1 0 0
}
// Configure NMEA (sentences will output once per fix)
- _serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON
- _serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF
@parkerlreed
parkerlreed / image_switch.sh
Created February 22, 2026 17:18
UNO Q IODD
#!/bin/bash
set -euo pipefail
. /home/arduino/.venv/bin/activate
python3 /home/arduino/uno.py "Unmounted -----"
MEDIA_DIR="/home/arduino/msd_media"
STATE_FILE="/home/arduino/.msd_cycle_last" # stores last served full path
EXTS=("iso" "img") # cycle these extensions
G=/sys/kernel/config/usb_gadget/msd
@parkerlreed
parkerlreed / loader.py
Last active February 16, 2026 18:24
Lists ISOs in given folder and allows you to turn the Steam Deck into a flash drive - Currently requires passwordless sudo for rmmod and modprobe to be setup
#!/usr/bin/env python
import os
import subprocess
from PyQt6.QtWidgets import (
QApplication, QMainWindow, QVBoxLayout, QPushButton, QWidget, QMessageBox, QScrollArea, QVBoxLayout
)
class IsoLoaderApp(QMainWindow):
def __init__(self, iso_directory):
super().__init__()
System Information:
OS Version:
Linux Distribution: Steam Runtime 2 (soldier)
Kernel Version: 6.11.11-valve27-1-neptune-611-g60ef8556a811 #1 SMP PREEMPT_DYNAMIC Thu, 08 Jan 2026 10:09:09 +0000
Hardware Info:
Machine Type To Be Filled By O.E.M. B450M/ac R2.0 To Be Filled By O.E.M.
CPU Type AuthenticAMD x86_64
CPU Info AMD Ryzen 7 1800X Eight-Core Processor
CPU Speed 3600 MHz
#!/usr/bin/env python3
import struct
import sys
import serial
PORT_DEFAULT = "/dev/ttyUSB0"
BAUD = 115200
ROTATE_ID = 0x28 # fixed/reused
ROTATE_OPCODE = 0x08