Skip to content

Instantly share code, notes, and snippets.

@JonnyWong16
JonnyWong16 / select_tmdb_poster.py
Last active September 15, 2024 18:23
Selects the default TMDB poster for movies in a Plex library if the current poster is from Gracenote.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Description: Selects the default TMDB poster if no poster is selected
or the current poster is from Gracenote.
Author: /u/SwiftPanda16
Requires: plexapi
Usage:
* Change the posters for an entire library:
#!/bin/bash
# https://gist.github.com/scrathe
# https://www.reddit.com/r/PleX/comments/vcc95i/database_repair_script_for_common_plex_db_errors/
# what is this? performs the steps outlined in Plex's garbage instructions on how to "Manually Repair the Database" https://support.plex.tv/articles/repair-a-corrupted-database/
# notes
# although this script will backup your Plex DB, i would suggest making your own backup.
# this script assumes you are comfortable with copying/pasting/running random things from the internet.
@natyusha
natyusha / Naty's FFXIV Dawntrail Add-ons, Plugins and Mods.md
Last active September 17, 2024 06:04
All the third party add-ons, plugins and mods I use for FFXIV.

Last Updated: Patch 7.05

The program which most people use for parsing in FFXIV and several other MMOs. For an open source alternative consider using IINACT though configuring it won't be covered here.

Options

  • Main Table Encounters
    • General
      • Uncheck: Number of seconds to wait after the last combat action to begin a new encounter.
      • Uncheck: Number of seconds to wait after the last combat action to pause the encounter duration.

Plugins

@Webreaper
Webreaper / docker-compose.yml
Last active September 21, 2024 17:50
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@arawako
arawako / make_openssl.txt
Last active April 26, 2024 16:00
Steps for compiling openssl in debian buster, testing and creating a .deb package using checkinstall
## Prepare the system
touch /etc/apt/sources.list.d/backports.list
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list
apt update && apt -y upgrade && apt install -y build-essential git checkinstall
# Clone the Source
git clone https://github.com/openssl/openssl.git
# Compile, test and install manually
cd openssl
<?php
/**
* Description: MU-Plugin of CLI command to purge WooCommerce data.
* Plugin URI: https://gist.github.com/crstauf/0917df51455efa1a61058c050565fe72
* Author: Caleb Stauffer
* Author URI: https://develop.calebstauffer.com
*/
if ( !defined( 'WP_CLI' ) || !WP_CLI )
return;
@jsfan
jsfan / bindify.py
Last active August 31, 2023 18:34 — forked from gmr/bindify.py
Convert tinydns zone files to bind
#!/usr/bin/env python
import argparse
import binascii
import collections
import logging
from os import path
import re
from time import time
logger = logging.getLogger(__name__)
@whereisaaron
whereisaaron / pfx-to-crt-and-key.sh
Last active August 15, 2024 17:54
Extract a crt file (PEM), key file, and chain bundle from a PFX file, prompts for password or use PFXPASSWORD environment variable
#!/bin/bash
#------------------
# Extract the key, certficiate, and chain in PEM format from a PFX format file
#
# Must supply the input pfx file
PFX_PATH="$1"
if [ "${PFX_PATH}" == "" ]; then
echo "Must supply pfx file path"
exit 1
@ageis
ageis / systemd_service_hardening.md
Last active September 5, 2024 09:52
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@jasny
jasny / mysql_splitdump.sh
Last active August 24, 2024 22:31
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit