Skip to content

Instantly share code, notes, and snippets.

View ericswpark's full-sized avatar

Eric Park ericswpark

View GitHub Profile
@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 November 18, 2023 03:41
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 January 29, 2024 18:32
Updates VueTorrent automatically
#!/usr/bin/env bash
set -e
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>
@ericswpark
ericswpark / movie_optimize.py
Created April 23, 2023 13:40
Script to optimize movie files (4K or large file size)
import os
import time
import subprocess
import argparse
# Set the path to the directory containing the movies
directory = 'Movies/'
# Name to append at the end of optimized files
@ericswpark
ericswpark / unraid-mosh-install.sh
Last active February 18, 2023 23:29
Install mosh on unRAID
# Switch to extras directory
cd /boot/extras
# Download all packages required
wget https://slack.conraid.net/repository/slackware64-current/mosh/mosh-1.4.0-x86_64-4cf.txz
https://slack.conraid.net/repository/slackware64-current/protobuf/protobuf-21.12-x86_64-1cf.txz
# Install all downloaded packages
installpkg mosh-1.4.0-x86_64-4cf.txz
installpkg protobuf-21.12-x86_64-1cf.txz
@ericswpark
ericswpark / cloudflare_ddns.md
Last active October 29, 2022 03:43
Updates DNS entry on Cloudflare

cloudflare_ddns

Script to automatically update A DNS entry on Cloudflare

Requirements

curl and jq must be installed.

Setup

@ericswpark
ericswpark / torvpn_docker_compose.yml
Created September 8, 2022 03:16
Qbittorrent with gluetun on Docker Compose
version: "3"
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=mullvad
- VPN_TYPE=wireguard
@ericswpark
ericswpark / mount_smb.sh
Last active July 30, 2022 14:31
Script to easily mount SMB shares on Linux
#!/usr/bin/env bash
# You must have cifs-tools installed
set -e
# Set variables here
SERVER_HOSTNAME="serverhostnamehere"
USERNAME="usernamehere"
@ericswpark
ericswpark / bitwarden-totp.py
Created September 12, 2021 16:12
Bitwarden TOTP finder in Python
import json
accounts = []
print("Reading exported JSON...")
with open("bitwarden-export.json", "r", encoding="utf8") as export_file:
vault = json.load(export_file)
vault = vault["items"]
for item in vault: