Skip to content

Instantly share code, notes, and snippets.

@hazcod
hazcod / apache-plex-reverse-proxy.vhost
Last active December 9, 2023 19:02
Apache2 reverse proxy vhost configuration for Plex. Rerquires modules ssl, proxy, wstunnel
This current configuration is based of at least Server Version 1.16.5.1488 and Web Version: 3.108.2.
This updated config file allows the playing of trailers and TV Show theme music where as the previous one did not.
## Requirements
1. Apache version > 2.4
2. A bunch of mod's enabled (proxy, ssl, proxy_wstunnel, http, dir, env, headers, proxy_balancer, proxy_http, rewrite)
3. Protocols h2 http/1.1 needs apachectl -V 2.4.17 and higher...
## Apache .conf file
@webbson
webbson / telegrambot.php
Last active June 14, 2020 12:18
Telegram bot for Sonarr/Radarr
<?php
function processMessage($message) {
$groupchat = '-XXXX'; // Group chat id
// process incoming message
$message_id = $message["message_id"];
$chat_id = $message["chat"]["id"];
$response = array("chat_id" => $chat_id);
$plextoken = "YYYY"; // Plex token
$plexbaseurl = "https://ASFASFASF.plex.direct:32400"; // PLEX DIRECT URL
@JonnyWong16
JonnyWong16 / update_all_metadata.py
Last active June 10, 2024 04:52
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@phit
phit / webhookRelay.js
Last active February 21, 2022 11:44 — forked from brussell98/webhookRelay.js
Make slack Grafana webhooks discord compatible
const express = require('express'),
bodyParser = require('body-parser'),
request = require('unirest'),
app = express();
function HEXToVBColor(rrggbb) {
return parseInt(rrggbb, 16);
}
app.disable('x-powered-by');
@JonnyWong16
JonnyWong16 / plex_discord_rpc.py
Last active May 26, 2023 03:01
Discord Rich Presence for Plex
import asyncio
import json
import os
import struct
import sys
import time
from plexapi.myplex import MyPlexAccount
### EDIT SETTINGS ###
@JonnyWong16
JonnyWong16 / update_history_grouping.py
Last active October 17, 2018 19:44
Updates history grouping in the Tautulli database with the new logic on v2.1.12.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates history grouping in the Tautulli database with the new logic on v2.1.12.
# Author: /u/SwiftPanda16
# Requires: requests
import requests
### EDIT SETTINGS ###
@spuniun
spuniun / A_Facebook_Group_Notification_Script_for_Taultulli.md
Last active July 10, 2020 16:25
Tautulli notification script for Facebook Groups

Since GraphAPI was revoked, no apps are getting approved and posting via email was shutdown, I pulled together a Tautulli notification python script for Facebook Groups using HTTP POST.

@metaMMA
metaMMA / plexDVR_notify_sonarr.py
Last active January 13, 2024 07:32
Notify Sonarr that a plexDVR recording has been added to the library, so that it can update it's database and rename the file.
#!/usr/bin/python
#The main purpose of this script is to notify Sonarr that a plexDVR recording has been added to the library, so that it can update it's database and rename the file.
#This script will find the Sonarr 'series ID' of a TV show (taken as an argument when running the script). It will take that 'series ID' and use it to rescan the directory of the show and rename any eligible files (if the show has the specified tag in Sonarr).
#For each tv series that will contain plex DVR files, go into the "edit series" page of that series in Sonarr and add a "tag" that will be associated with these show from the DVR.
#This script can be used in many ways, but one way is to add this script as a 'notification agent' in Tautulli settings. From the "Configuration" tab, input the folder in which the script is saved, then select the script file. Under the "Triggers" tab, select 'Recently Added'. Under the "Conditions" tab, add " 'Media Type' 'is' 'episode' ". The name of the TV Show will be passed as the argume
@dirtycajunrice
dirtycajunrice / get_folder_size.sh
Created December 11, 2018 00:01
Get folder size(s) in bytes in telegraf
#!/bin/bash
echo "["
du -bs "$@" | awk '{if (NR!=1) {printf ",\n"};printf " { \"directory_size_bytes\": "$1", \"path\": \""$2"\" }";}'
echo
echo "]"
@ErkHal
ErkHal / Thingiverse speed downloader.user.js
Last active April 21, 2024 12:16
UPDATED 18.10.2023: TamperMonkey script that allows you to download Thingiverse files without the pop-up and 5 second wait time.
// ==UserScript==
// @name Thingiverse speed downloader
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Just straight up download the .zip and not having to wait for 5 secs or be stopped by anti-adblock. Thanks to Deses, scoutman57, kohrar and quantumfrost for updates !
// @author ErkHal
// @include https://www.thingiverse.com/thing:*
// @exclude https://www.thingiverse.com/thing:*/edit*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js