Skip to content

Instantly share code, notes, and snippets.

View EldonMcGuinness's full-sized avatar

Eldon McGuinness EldonMcGuinness

View GitHub Profile
class Variable {
obj: any;
constructor() {
this.obj = JSON.parse( MakerWebhooks.makeWebRequestQueryJson[0].ResponseBody );
}
get( name: string ) {
if ( !(name in this.obj) ){
{"0":[
android,
baby,
Tool,
gloves,
soap,
controller,
mirror,
dumbbell,
monitor,
@EldonMcGuinness
EldonMcGuinness / backupPlex.sh
Created February 24, 2024 00:56
Backup Plex
#!/bin/bash
ALL=false
DB=false
if [ -z $1 ]; then
exit
fi
if [ -z $2 ]; then
ALL=true
@EldonMcGuinness
EldonMcGuinness / renameMovies
Last active January 27, 2024 17:30
renameMovies
#!/bin/bash
#Version 1.16
function guessEdition {
TEMP=$(echo $1 | sed -E 's/.*((special|limited|uncensored|imax|deluxe|criterion|collector|remastered|ultimate|international|german|dircut|uncut|director|alternate|theatrical|extended|unrated|final)).*/\1/gI')
TEMP=$(echo $TEMP | tr '[:upper:]' '[:lower:]')
if [ "$TEMP" != "" ]; then
case $TEMP in
special) TEMP="Special" ;;
@EldonMcGuinness
EldonMcGuinness / diskStandBy
Last active October 24, 2023 13:48
diskStandBy
#!/bin/bash
###
# How to use: Set this up as a Cron job and have it call at a regular interval.
# Example Cron time: */5 * * * *
###
#This needs to mach the name you gave the script in the unraid UI
SCRIPT_NAME=driveStandBy
@EldonMcGuinness
EldonMcGuinness / gist:d43d4ec8200db0b10c07b3f722505048
Last active July 23, 2023 01:53
PMM Colors Based on Status
=================
status.yml
=================
overlays:
airing_shows:
variables: {key: airing, weight: 40, text: AIRING, last: 14, back_color: <<back_color_<<key>>>>}
template: [name: standard, name: status]
returning_shows:
variables: {key: returning, weight: 30, text: RETURNING, back_color: <<back_color_<<key>>>>}
@EldonMcGuinness
EldonMcGuinness / adobe-cc-2019-host.txt
Created April 6, 2021 11:41
Adobe CC 2019 activation host block
0.0.0.0 activate.adobe.com
0.0.0.0 practivate.adobe.com
0.0.0.0 ereg.adobe.com
0.0.0.0 wip3.adobe.com
0.0.0.0 activate.wip3.adobe.com
0.0.0.0 3dns-3.adobe.com
0.0.0.0 3dns-2.adobe.com
0.0.0.0 adobe-dns.adobe.com
0.0.0.0 adobe-dns-2.adobe.com
0.0.0.0 adobe-dns-3.adobe.com
@EldonMcGuinness
EldonMcGuinness / google-to-radicale
Created January 16, 2020 01:10
Copy a calendar from google into radicale
GOOGLE_CAL="ics url"
LOGIN_CAL="user:pass"
DEST_CAL="url to radicale calendar"
curl "$GOOGLE_CAL" | curl -u "$LOGIN_CAL" -X PUT "$DEST_CAL" --data-binary @-
# If you're looking to share a calendar then use symlinks
#ln -sf /path/to/src /path/to/dest
#chown radicale:radicale /opt/radicale /etc/radicale -fR
#find /opt/radicale/ -type d -exec chmod 0750 "{}" \;
#find /etc/radicale/ -type d -exec chmod 0750 "{}" \;
@EldonMcGuinness
EldonMcGuinness / localization.php
Last active November 26, 2019 23:21
Simple localization script
<?php
class Localization {
private $localization_directory = null;
private $language = null;
private $localization_array = null;
private $test_data = '{
"00000000": "Hello",
@EldonMcGuinness
EldonMcGuinness / gist:d5edb240c9fc3fccc2a73bacc9eaa244
Last active November 9, 2019 16:32
Download Ubuntu (and perhaps other) Linux ISOs to a watch directory as they are posted to a website
#! /bin/bash
WATCH_DIR=$1
URL=https://ubuntu.com/download/alternative-downloads
cd "$WATCH_DIR"
for i in $(curl -sq "$URL" -- | grep -hoE 'http.+?torrent'); do wget -q $i; done