Skip to content

Instantly share code, notes, and snippets.

View dillera's full-sized avatar

Andrew Diller dillera

View GitHub Profile
@dillera
dillera / gist:58687299a6f047d4d287355689cbcdee
Created February 18, 2025 16:25
git commits in daterange
$ python ../../scratch/github-summary.py --start 10-01-24 --end 02-17-25
=== Bug Fixes ===
-- Author: mozzwald --
* Mon Jan 20 17:00:49 2025 -0600: FsSD: remove uneeded ternary for debug print
* Sat Jan 4 14:53:15 2025 -0600: atari: new Altirra 850 handler and relocator to fix break key crash. modem now checks filesize of handler and relocator
* Tue Nov 19 16:03:09 2024 -0600: fnSystem: fix SD card detect for non Atari platforms
-- Author: Jan Krupa --
* Fri Jan 3 01:14:58 2025 +0100: [fujinet-pc] fix HSIO with serial port SIO
* Mon Dec 16 18:41:13 2024 +0100: [PC] fix Windows build
@dillera
dillera / tnfsme.swift
Created January 5, 2025 19:44
TNSF OSX APP
import SwiftUI
import Foundation
// TNFSController handles the TNFS process management
class TNFSController: ObservableObject {
@Published var isRunning = false
@Published var sharedDirectory = FileManager.default.homeDirectoryForCurrentUser.path
@Published var statusMessage = "TNFS Service Stopped"
private var process: Process?
@dillera
dillera / gist:7192d884929aac1b9905ab478342dc28
Last active September 15, 2024 13:00
Apple II Disk Type Detection
Apple 2 disk help
1. Format and Size Detection:
• is_woz_format: Checks if the disk image starts with the WOZ signature.
• get_image_size_kb: Retrieves the size of the disk image in kilobytes.
2. Filesystem Detection:
• detect_filesystem: Utilizes the existing autodetection to identify the filesystem and sector order.
3. Recommendation Logic:
• recommend_mounting: Implements the mounting recommendation rules based on image format, size, and filesystem.
@dillera
dillera / openfw.ps1
Created August 10, 2024 13:38
wsl2 Firewall Open Example
# Start SSH Service.
wsl sudo service ssh start
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
import sys
from PIL import Image
import struct
# Define the Apple II HRG palette
palette = [
(0, 0, 0), # Black
(114, 38, 64), # Deep Red
(64, 51, 127), # Dark Blue
(255, 0, 255), # Purple
@dillera
dillera / setup-systemd.bash
Last active June 12, 2024 02:53
BASH commands to save a systemd service file to start the udp_firewall.js script on boot.
cat <<'EOF' > /etc/systemd/system/udp-firewall.service
[Unit]
Description=UDP Firewall Service
After=network.target
[Service]
ExecStart=/usr/bin/node /usr/local/bin/udp_firewall.js
Restart=always
User=root
@dillera
dillera / udp_firewall.js
Created June 12, 2024 02:00
BASH command to save a node script that will listen on port 6677 for IP address from a SubText BBS
cat <<'EOF' > /usr/local/bin/udp_firewall.js
const dgram = require('dgram');
const { exec } = require('child_process');
const PORT = 6677;
const server = dgram.createSocket('udp4');
server.on('listening', () => {
@dillera
dillera / set_iptable_rules.bash
Created June 12, 2024 01:59
A set of commands to setup iptables for the firewall host
cat <<EOF | sudo bash
# Flush existing rules and set default policies
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -t raw -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
@dillera
dillera / udp_capture.py
Created June 7, 2024 14:41
Small Python script to capture UDP traffic and display the payload
import pyshark
import logging
# Set up logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
def packet_handler(pkt):
try:
if 'UDP' in pkt:
src_addr = pkt.ip.src
@dillera
dillera / index.html
Created May 22, 2024 02:00
FujiNet Flasher Auto Manifest
cat <<'EOF' > index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ESP Web Tools with Dynamic Manifest</title>
<style>
#spinner {
display: none;