Skip to content

Instantly share code, notes, and snippets.

View ericswpark's full-sized avatar

Eric Park ericswpark

View GitHub Profile
@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: