Skip to content

Instantly share code, notes, and snippets.

@chazlarson
chazlarson / auto_encfs_creation.exp
Created April 25, 2018 19:53 — forked from inokii/auto_encfs_creation.exp
Simple demonstration of automated EncFS creation using the expect program.
#!/usr/bin/env expect
# Simple demonstration of automated EncFS creation using the expect program.
# EncFS: an Encrypted Filesystem for FUSE. https://vgough.github.io/encfs/
if {[llength $argv] < 2} {
send_user "Usage: auto_encfs_creation.exp rootDir mountPoint\n"
exit 1
}
@chazlarson
chazlarson / osx_bootstrap.sh
Created June 10, 2019 20:56 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@chazlarson
chazlarson / app.domain.tld_location
Created June 30, 2019 17:11 — forked from fma965/app.domain.tld_location
Organizr auth working on Cloudbox
# FILE - /opt/nginx-proxy/vhost.d/app.domain.tld_location e.g sonarr.cloubox.com_location
auth_request /auth-2;
# optional failsafe basic auth
satisfy any;
auth_basic "Failsafe Authentication";
auth_basic_user_file /path/to/htpasswd;
## Full group list
@chazlarson
chazlarson / plex_cleanup.rb
Created April 20, 2022 17:52 — forked from mblythe86/plex_cleanup.rb
Clean unused posters/art/banners from Plex
#!/usr/bin/env ruby
# At least for movies, it looks like it copies the 'selected' stuff into the
# _stored/ folder. It also seems to use the _combined/ folder for access.
# so, I shoud be able to delete anything that's not those two.
# And after that, in the _combined folder, I can/should delete any broken links
# and remove them from <art> and <posters> in Info.xml.
# remove <reviews> from Info.xml too, since it seems to be unused.
# As far as I can tell, extras.xml can just be deleted?
# Same for Artists
@chazlarson
chazlarson / share_unshare_libraries.py
Last active September 16, 2022 20:54 — forked from JonnyWong16/share_unshare_libraries.py
Automatically share and unshare libraries for Plex users
# Run this script using "share" or "unshare" as arguments:
# To share the Plex libraries:
# python share_unshare_libraries.py share
# To unshare the Plex libraries:
# python share_unshare_libraries.py unshare
import requests
import sys
from xml.dom import minidom
@chazlarson
chazlarson / stop_4k_transcodes.py
Created May 6, 2025 04:04 — forked from tobiasglen/stop_4k_transcodes.py
Stop-Emby-transcodes-automatically
# this requires your content naming scheme includes the resolution in the file name
# --> (Show Title - s01e02 - Episode Name - WEBDL-2160p - (h265 EAC3 Atmos) - GROUP.mkv)
# the script will then first check locally to make sure the ffmpeg transcode process is transcoding video (audio and container is allowed)
# and makes sure "2160p" is in the file name, if both cases are true then the script will kill the process and show the user an error message
import os
import re
import requests
import time
import logging