Skip to content

Instantly share code, notes, and snippets.

# USE AT YOUR OWN RISK!!!!
#
# Requires eyed3 and plexapi libraries, written & tested in python 3.9
from plexapi.myplex import MyPlexAccount
import eyed3
LIB = 'INSERT LIBRARY NAME'
# Counters
insync = 0
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 6, 2025 14:15
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@blacktwin
blacktwin / plex_theme_songs.py
Last active April 16, 2024 02:47
Download theme songs from Plex TV Shows.
'''
Download theme songs from Plex TV Shows. Theme songs are mp3 and named by shows as displayed by Plex.
Songs are saved in a 'Theme Songs' directory located in script's path.
'''
from plexapi.server import PlexServer
# pip install plexapi
import os
@ssmereka
ssmereka / plexDatabaseBackupScript.sh
Last active March 21, 2025 16:18
Plex Media Server database backup script.
#!/bin/bash
# Backup a Plex database.
# Author Scott Smereka
# Version 1.0
# Script Tested on:
# Ubuntu 12.04 on 2/2/2014 [ OK ]
# Plex Database Location. The trailing slash is
@hofmannsven
hofmannsven / README.md
Last active April 30, 2025 15:25
Git CLI Cheatsheet
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2025 05:25
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'