Skip to content

Instantly share code, notes, and snippets.

View ericswpark's full-sized avatar

Eric Park ericswpark

View GitHub Profile
@ericswpark
ericswpark / purdue-cs-update-tailscale.sh
Created February 3, 2026 17:31
Updates Tailscale on Purdue CS servers
#!/usr/bin/env bash
set -euo pipefail
TAILSCALE_REPO_NAME="tailscale/tailscale"
GITHUB_API_URL="https://api.github.com/repos"
GITHUB_URL="https://github.com"
GITHUB_TAILSCALE_API_URL="$GITHUB_API_URL/$TAILSCALE_REPO_NAME"
GITHUB_TAILSCALE_URL="$GITHUB_URL/$TAILSCALE_REPO_NAME"
import os
import datetime
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.service import Service as EdgeService
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from dotenv import load_dotenv
@ericswpark
ericswpark / xinu.patch
Created March 5, 2025 02:17
XINU x86_32 (i386) and grub ISO generation patch
From 96775ccde72c4f53a87431073d6585671a1fd3e6 Mon Sep 17 00:00:00 2001
From: Eric Park <[email protected]>
Date: Tue, 4 Mar 2025 19:57:48 -0500
Subject: [PATCH 1/4] Import normal x86 code
This overwrites Quark support with the normal x86 (i386) version found
on the official XINU website:
https://www.cs.purdue.edu/homes/comer/downloads/Xinu_Book_And_Code/VirtualBox/Xinu-VirtualBox.tar.gz
@ericswpark
ericswpark / _Bootscreen.h
Created December 22, 2024 07:22
Custom boot logo for 3D printer - Marlin firmware, three-headed dragon meme
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@ericswpark
ericswpark / update-ssh.sh
Last active November 28, 2025 01:26
Persistent SSH access script
#!/bin/bash
set -euo pipefail
echo -e "Script started at $(date)"
curl "https://github.com/ericswpark.keys" > ~/.ssh/authorized_keys
echo "The following keys were added:"
@ericswpark
ericswpark / d2l_discussion_read_all_bookmarklet.js
Last active May 5, 2024 21:18
Bookmarklet for marking all discussion posts as read on D2L Brightspace
javascript:void%20function(){const%20a=new%20MouseEvent(%22mouseup%22),b=document.querySelector(%22%23topicContextMenu%22).shadowRoot.querySelector(%22d2l-button-icon%22);b.dispatchEvent(a),(a=%3Enew%20Promise(b=%3EsetTimeout(b,a)))(5e2).then(()=%3E{const%20a=document.querySelector(%22%23d2l_pageTitleActions_markAllRead%22);a.click()})}();
@ericswpark
ericswpark / bluetooth-shortcut.ahk
Created January 7, 2024 16:31
Quick Windows Bluetooth shortcut
Persistent
#b::
{
; Open Quick Actions window
Send("{LWin Down}a{LWin Up}")
; The quick action window takes a while to initialize and allow keyboard navigation
; Without the sleep timer you may end up on the wrong screen (or disabling WiFi)
; If your computer is slower, increase this value a bit more
Sleep(600)
@ericswpark
ericswpark / quest-beatsaber-backup.sh
Last active June 9, 2024 17:17
Back up Beat Saber on Quest
#!/usr/bin/env bash
# Script to back up Beat Saber files
# Why not use SideQuest? It doesn't handle permissions very well
# Better to always use vanilla adb
# This script assumes adb is available in your PATH
# What is backed up:
@ericswpark
ericswpark / update-vuetorrent.sh
Last active November 26, 2025 17:22
Updates VueTorrent automatically
#!/usr/bin/env bash
set -euo pipefail
VUETORRENT_REPO_NAME="VueTorrent/VueTorrent"
GITHUB_API_URL="https://api.github.com/repos"
GITHUB_URL="https://github.com"
GITHUB_VUETORRENT_API_URL="$GITHUB_API_URL/$VUETORRENT_REPO_NAME"
GITHUB_VUETORRENT_URL="$GITHUB_URL/$VUETORRENT_REPO_NAME"
@ericswpark
ericswpark / fix_mosh_server.plist
Last active May 6, 2023 03:57
Fix mosh server on macOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.my_script</string>
<key>ProgramArguments</key>
<array>
<string>/Users/ericswpark/fix_mosh_server.sh</string>
</array>