Skip to content

Instantly share code, notes, and snippets.

@parkerlreed
parkerlreed / fnirsi-fnb58.py
Last active November 15, 2024 02:19
FNIRSI FNB58 Bluetoth data logger - Requires bleak - Currently prints voltage, amperage, and wattage: more may be possible
import asyncio
import struct
import sys
from bleak import BleakClient
# Bluetooth device address and attributes
DEVICE_ADDRESS = "98:DA:B0:08:A1:82" # Replace with your device's Bluetooth MAC address
WRITE_CHARACTERISTIC = "0000ffe9-0000-1000-8000-00805f9b34fb"
NOTIFY_CHARACTERISTIC = "0000ffe4-0000-1000-8000-00805f9b34fb"
@parkerlreed
parkerlreed / loader.py
Last active November 3, 2024 07:46
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__()
@parkerlreed
parkerlreed / remote.py
Last active October 20, 2024 18:50
PyQT6 WebOS remote using PyWebOSTV
#!/usr/bin/env python
from pywebostv.discovery import * # Because I'm lazy, don't do this.
from pywebostv.connection import *
from pywebostv.controls import *
from PyQt6.QtWidgets import QApplication, QWidget, QGridLayout, QPushButton
from PyQt6.QtCore import Qt, QTimer
import sys
class RemoteControl(QWidget):
def __init__(self):
@parkerlreed
parkerlreed / dvd-saver
Last active September 29, 2024 07:43
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 / webgl-dl.sh
Last active September 27, 2024 05:46
Itch.io WebGL downloader
#!/usr/bin/env bash
# Configuration
AUTH_TOKEN="my-itch-auth-key"
USER_AGENT="butler/v15.21.0 itch/26.1.9 (linux)"
API_BASE_URL="https://api.itch.io"
GAME_URL="$1"
GAME_ID="$(curl -s "$GAME_URL" | grep -oP '"id":\K\d+')"
GAME_NAME="$(basename "$GAME_URL")"
# Functions
@parkerlreed
parkerlreed / fullscreen-spice
Last active September 16, 2024 05:50
Cockpit auto launch remote-viewer from web console - Tested with Firefox auto saving to Downloads folder
[virt-viewer]
type=spice
host=127.0.0.1
port=5900
delete-this-file=0
fullscreen=1
[...............................GraphicsConsole]
@parkerlreed
parkerlreed / betteradbcopy
Last active September 21, 2024 05:13
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'"
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.5.0 present.
Table at 0x9AA81000.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: American Megatrends International, LLC.
Version: RC71L.333
Release Date: 11/06/2023
@parkerlreed
parkerlreed / wifi_microscope_dump.py
Created November 6, 2023 20:02 — forked from sspathak/wifi_microscope_dump.py
Modified version of czietz's code for capturing images from wifi microscope. Added compatibility with iwobac microscope
# Proof-of-concept code for reading data from a Wifi microscope.
# See https://www.chzsoft.de/site/hardware/reverse-engineering-a-wifi-microscope/.
# Copyright (c) 2020, Christian Zietz <czietz@gmx.net>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
[ 1607.865744] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1624.505179] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1639.012936] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1654.585264] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1654.588382] amdgpu: [VBLANK]:crtc:0, vupdate-vrr:0, planes:1
[ 1654.593953] [SCALER]:resource_build_scaling_params pipe 0:
Viewport: height:1440 width:2560 x:0 y:0 Recout: height:1440 width:2560 x:0 y:0 HACTIVE:2560 VACTIVE:1440
src_rect: height:1440 width:2560 x:0 y:0 dst_rect: height:1440 width:2560 x:0 y:0 clip_rect: height:1440 width:2560 x:0 y:0
[ 1654.594717] amdgpu: [PFLIP]:crtc:0[00000000bd7287f3], pflip_stat:AMDGPU_FLIP_NONE, vrr[0]-fp 0
[ 1654.596864] [BANDWIDTH_CALCS]:dce112_validate_bandwidth: start