Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# bmw-bootmod3-knock-event-context-extractor.sh
#
# BMW Bootmod3 Knock Event Extractor – Direct, Reliable, Context-Rich
#
# USER PARAMETERS – Set these at the top for clarity
INPUT_FILE="input.csv" # Path to BM3 datalog CSV file
OUTPUT_PREFIX="output-knock-random" # Output file prefix
BUFFER_PERCENT=10 # Buffer as percent of total lines (e.g., 10 for 10%)
// ==UserScript==
// @name Plex Redirect Script
// @namespace https://example.com/
// @version 1.0
// @description Automatically redirects users from the Plex homepage (www.plex.tv) to the Plex web app (app.plex.tv).
// @author Your Name
// @match https://www.plex.tv/*
// @grant none
// ==/UserScript==
/*
* ESP32-H2 GPS Parser
* Description:
* This script reads NMEA sentences from a GPS module connected to an ESP32-H2 board,
* parses the data using the TinyGPS++ library, and outputs clean, human-readable GPS data
* such as latitude, longitude, date, time, altitude, speed, number of satellites, and HDOP.
*
* Features:
* - Real-time GPS data parsing and display.
* - Clear and organized serial output.
@ParkWardRR
ParkWardRR / install_searxng.sh
Last active May 26, 2025 04:46
This script automates the installation and setup of SearXNG using Podman on AlmaLinux. It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary configuration files, and run the SearXNG container with the correct port mapping.
#!/bin/bash
# Filename: install_searxng.sh
# Description: This script automates the installation and setup of SearXNG using Podman on AlmaLinux.
# It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary
# configuration files, run the SearXNG container with the correct port mapping, and set up a systemd service
# to ensure the container starts automatically on system boot.
# Update system
sudo dnf update -y
#!/bin/bash
# =============================
# Script: YouTubeRelayService.sh
# Description: This script is designed to fetch and serve YouTube live streams,
# especially useful for bypassing YouTube geo-blocks by running on a lightweight VPS.
# It can be particularly effective for continuous streams such as 24-hour live streams.
# This script is intended to bootstrap an Ubuntu host.
# =============================
@ParkWardRR
ParkWardRR / EbookChunkSplitter.py
Created January 30, 2024 01:36
Ebook Chunk Splitter - python
"""
Script: Ebook Chunk Splitter
Description: This script takes an input text file of an ebook and splits it into smaller chunks based on a specified character limit. It ensures that paragraphs are not split and creates an output directory with the split chunks of the ebook.
Input: Replace `<input_file>` with the path to the input text file of the ebook.
Output: Replace `<output_folder>` with the path to the output directory where the split ebook chunks will be stored.
"""
import os
import datetime
@ParkWardRR
ParkWardRR / freq_analysis.sh
Created December 23, 2023 07:56
freq_analysis.sh
#!/bin/bash
: '
File: freq_analysis.sh
This is a Unix shell script designed to provide a frequency analysis based on the output from software-defined radio (SDR) scans. The script reads from specified CSV files that contain the SDR scan data, recognizes the frequencies with the highest signal strength, and presents a list of the top frequencies.
This script serves as a preliminary tool for users looking to explore frequency ranges for the SDRTrunk application. Its primary tasks include sorting the frequencies based on signal strength and outputting potential frequency ranges for further analysis and use in SDRTrunk.
Note: Ensure the SDR scan CSV files are placed in the appropriate directory (default: /tmp/sdrOut); adjust the CSV_DIR variable in the script according to your setup. This script is geared towards educational and research applications. Compliance with all applicable laws pertaining to radio frequency use is strongly advised.
@ParkWardRR
ParkWardRR / sdr-scan.sh
Created December 22, 2023 20:31
sdr-scan.sh
#!/bin/bash
: '
This script, named sdr-scan.sh, is designed to scan specific frequency ranges using a compatible Software-Defined Radio (SDR) such as RTL-SDR. The default ranges are set to scan segments commonly used by Walkie Talkie communications and trunked radios. These values can be changed by editing the RANGES array in the script.
User configurable variables:
- BANDWITH: Specifies the frequency range for each FFT.
- SAMPLING: Specifies the interval at which the frequency scan is performed.
- GAIN: Sets the tuner gain. Please note, high gain values may reduce the Signal to Noise Ratio (SNR).
@ParkWardRR
ParkWardRR / gist:91f9d2641e2b3f5ef08e8bec77d8167d
Created November 7, 2023 06:06
cleanUpOldVideos_Duration_Orientation.py
"""
This Python Script is designed to scan a given directory for video files with
certain extensions (.mp4, .avi, .flv, .wmv, .mov), and then delete the video files
that meet the following two criteria:
1. The video is less than 10 minutes long.
2. The video is in portrait mode (height greater than width).
The script is designed to work in a multi-threaded manner for improved speed, utilizing all available CPU cores.
@ParkWardRR
ParkWardRR / mount_cifs.sh
Created October 27, 2023 22:24
This script helps to mount a CIFS network share on Ubuntu/Mint/Debian OS
#!/bin/bash
# Description:
# This script helps to mount a CIFS network share on Ubuntu/Mint/Debian OS
# Attempt to mount a network share using cifs protocol.
# Takes a server share address and target mount point as input, and writes the values to /etc/fstab
# Update the .smbcredentials file with CIFS username and password
# Template for .smbcredentials: