Skip to content

Instantly share code, notes, and snippets.

View khaosx's full-sized avatar

Kristopher Newman khaosx

  • Atlanta, Georgia, United States, Earth
View GitHub Profile
@khaosx
khaosx / generic_macos_exclude.txt
Created October 17, 2018 19:22
rsync excludes for MacOS
$RECYCLE.BIN
$Recycle.Bin
.AppleDB
.AppleDesktop
.AppleDouble
.com.apple.timemachine.supported
.dbfseventsd
.DocumentRevisions*
.DS_Store
.fseventsd
@khaosx
khaosx / backup_parental_controls.sh
Created October 19, 2018 23:21
Backs up parental control settings per child
#!/bin/bash
for $kid in kida kidb kidc
do
echo Backing up parental controls for $kid to /Volumes/Storage/Sodium/ParentalControls/$kid.parentalcontrols
dscl . -mcxexport /Users/$kid > /Volumes/Storage/Sodium/ParentalControls/$kid.parentalcontrols
done
exit 0
#! /bin/bash
#
# Calculate bitrate statistics for movies
# Script courtesy of https://www.reddit.com/user/pcpcy
#
# Requires:
# ffmpeg_bitrate_stats (https://github.com/slhck/ffmpeg-bitrate-stats)
# printTable from util.bash (https://github.com/gdbtek/linux-cookbooks/blob/master/libraries/util.bash)
# jq (https://stedolan.github.io/jq/)
#
@khaosx
khaosx / preseed.cfg
Last active March 23, 2020 23:12
Example of preseed.cfg for unattended install of Ubuntu 18.04.4 - minimum disk size is 36864MB
###############################################################################
# preseed.cfg #
# #
# Applies to Ubuntu 18.04 (LTS) #
# Modified from: #
# https://help.ubuntu.com/lts/installation-guide/example-preseed.txt #
# #
# Configures install time choices for Ubuntu 18.04 (LTS) #
# - Partitioning is done in accordance with recommended layout from CIS #
# benchmarks (as of 01/03/2020, v2.0.1) #
@khaosx
khaosx / current_shows_playlist.py
Last active March 2, 2022 12:32
Creates a playlist in Plex with the first unwatched episode of your current shows.
# This script creates a playlist that contains the next unwatched episode of any
# shows you define in a collection.
#
# Requires python 3
#
# Usage:
#
# In Plex, create a collection named "Current Shows". It should contain all the shows
# that you want considered for the new playlist.
#
@khaosx
khaosx / sanitize-media.ps1
Last active December 15, 2020 21:24
Prepare media for transcoding using Don Melton's Other Video Transcoding
# sanitize-media.ps1
#
# Copyright 2020 - K. Austin Newman
# Version: 1.0.5
# Prepare media for transcoding using Don Melton's Other Video Transcoding
#
# Requirements: ffprobe,mkvmerge,remux.rb,jq,mkvpropedit,filebot
# Define user vars
$dirWorkflowRoot = "workflows"
@khaosx
khaosx / hw-convert-media.ps1
Last active June 5, 2021 22:26
Convert media using Don Melton's Other Video Transcoding
########################################################
# hw-convert-media
##################################################-kan-#
<#
.Synopsis
This script will create batch files to convert media using Don Melton's Other Video Transcoding project.
.DESCRIPTION
This script examines all .mkv files located in a specified directory to determine appropriate transcoding options based around Don Melton's Other Video Transcoding project(see links).
@khaosx
khaosx / process-queue.ps1
Created August 6, 2020 14:29
Runs from a scheduled task to process any cmd files for transcoding
# process-queue.ps1
#
# Copyright 2020 - K. Austin Newman
# Version: 1.0
# Runs from a scheduled task to process any cmd files for transcoding
## Define variables
$dirBaseVolName = "Data"
$dirWorkflowRoot = "Workflows"
$dirWorkflowName = "Transcoding"
@khaosx
khaosx / verify-media.ps1
Last active December 22, 2020 03:16
Verifies that all media in source dir has been transcoded
# verify-media.ps1
#
# Copyright 2020 - K. Austin Newman
# Version: 1.0
# Verifies that all media in source dir has been transcoded
# Usage: verify-media <path>
if ( $args.count -eq 0 ) {
write-warning "No source specified. Exiting."
exit
@khaosx
khaosx / find-remuxes-to-convert.ps1
Last active August 26, 2020 14:34
Copies any downloaded remuxes to the holding folder for processing
# find-remuxes-to-convert.ps1
#
# Copyright 2020 - K. Austin Newman
# Version: 1.0
# Copies any downloaded remuxes to the holding folder for processing
#
## Define variables
$dirMediaLibrary1 = "\\carbon\media\movies"