Skip to content

Instantly share code, notes, and snippets.

View fruzyna's full-sized avatar

Liam Fruzyna fruzyna

View GitHub Profile
@fruzyna
fruzyna / episode-renamer.py
Created November 15, 2025 04:02
Used to rename episodes recorded on Jellyfin to a "Episdoe SXXEYY" format using TMDB API to look up names
import json
from sys import argv
from pathlib import Path
from urllib.request import urlopen, Request
if len(argv) == 1:
print('Requires an episode group ID. Try https://developer.themoviedb.org/reference/tv-series-episode-groups')
exit()
@fruzyna
fruzyna / match.py
Created November 4, 2025 01:55
Renames a given directory of images based on the FRC match that they were taken during
#!/bin/python3
from requests import get
from pathlib import Path
from shutil import copyfile
from datetime import timedelta
from datetime import datetime as dt
from argparse import ArgumentParser
from PIL import Image, UnidentifiedImageError
@fruzyna
fruzyna / vh113.py
Created February 22, 2025 14:35
Automatically configures the VividHosting VH-113.
import json
import requests
ip = '192.168.69.1'
data = {
'blueVlans': '40_50_60',
'channel': 13,
'channelBandwidth': '40MHz',
'redVlans': '10_20_30',
@fruzyna
fruzyna / LedController.java
Created November 19, 2024 02:00
A sample LED Controller subsystem for the WildStang fall software class.
package org.wildstang.sample.subsystems;
import org.wildstang.framework.io.inputs.AnalogInput;
import org.wildstang.framework.io.inputs.DigitalInput;
import org.wildstang.framework.io.inputs.Input;
import org.wildstang.framework.subsystems.Subsystem;
import org.wildstang.hardware.roborio.outputs.WsSpark;
import org.wildstang.sample.robot.WsInputs;
import org.wildstang.sample.robot.WsOutputs;
@fruzyna
fruzyna / pwa-update.js
Created February 24, 2024 20:49
Listen for updates from the serviceWorker. Ask the user to switch when either an update finishes installing or if there is a version installed on page load. Then reload the page.
if ('serviceWorker' in navigator)
{
navigator.serviceWorker.register('pwa.js')
.then(reg => {
// check to see if an update is already waiting
if (reg.waiting) {
// store registration
let update = reg.waiting
// ask the user if they want to switch

openpgp4fpr:824F1189076E59EE525D10487BD5DEC4CD3AEC8A

@fruzyna
fruzyna / monitor
Created December 4, 2022 22:00
A bash script to control my monitors
#!/bin/bash
NUM_MONITORS=3
PRIMARY=1
BASE_CMD="sudo ddcutil setvcp --display"
SET_CMD=""
PAUSE=0
BRIGHTNESS_CODE=0x10
@fruzyna
fruzyna / nochat.js
Last active March 5, 2022 14:19
Remove TBA GameDay Twitch Chat
// Use to remove the Twitch chat from The Blue Alliance GameDay page.
// Liam Fruzyna 2022-03-05
// To use open the browser console (ctrl + shift + i)
// Then page the below text into the bottom next to '>'
let parent = document.getElementById('content').children[0]
parent.removeChild(parent.children[2])
parent.children[2].style.marginRight = 0
@fruzyna
fruzyna / common.css
Last active June 17, 2025 23:01
Custom additions to Vivaldi styles to hide title bar, auto hide the vertical tab bar, and show only the clock from the status bar
/* /opt/vivaldi/resources/vivaldi/style/common.css */
/* Remove header */
:-webkit-any(.native, .maximized)#browser #header {
min-height: 0 !important;
}
/* Auto hide vertical tab bar */
div#browser:not(.fullscreen) > #main > .inner > div:not(#webview-container):not(#panels-container), #tabs-tabbar-container {
width: 30px !important;
transition: width 0.25s;
}
@fruzyna
fruzyna / generate.sh
Created July 10, 2021 14:41
Generate wireguard configs for a single server many client config
#!/bin/bash
# configuration
host=HOST_NAME
hostif=HOST_INTERFACE
ip=IP_RANGE # 192.168.0
addr=HOST_EXTERNAL_IP
iaddr=HOST_INTERNAL_IP
port=HOST_PORT
dns=DNS_SERVER