Skip to content

Instantly share code, notes, and snippets.

View GitterDoneScott's full-sized avatar

GitterDoneScott

View GitHub Profile
import pudb; pudb.set_trace()
@GitterDoneScott
GitterDoneScott / gist:9dcab4e33600d2860890258b7b397267
Created March 1, 2021 18:16
Repairing/restoring a plex database using a SQLite3 docker image
# Ensure permissions on /opt/plex_config_local are correct
docker run --rm -it --entrypoint /bin/sh --mount src=/opt/plex_config_local,target=/opt/plex_config_local,type=bind keinos/sqlite3:latest
cd /opt/plex_config_local/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/
# Follow these steps https://support.plex.tv/articles/201100678-repair-a-corrupt-database/
# If the database is corrupt, change the last line of the export (dump.SQL) to 'COMMIT;'
@GitterDoneScott
GitterDoneScott / gist:812f93f158ad10cabe1d8035eab380c8
Created April 24, 2021 23:45
wget scrape of a Confluence Wiki - This isn't perfect becuase it gets some duplicate pages
wget \
--header="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36" \
--header="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" \
--header="Accept-Language: en-us,en;q=0.5" \
--header="Accept-Encoding: gzip, deflate" \
--header="Cookie: JSESSIONID=<Paste your session ID here>" \
--cipher 'DEFAULT:!DH' \
--no-check-certificate \
--page-requisites \
--html-extension \
@GitterDoneScott
GitterDoneScott / gist:88805cd6397e6204557bebe902c3dccb
Created January 20, 2022 13:36
Remove location/gps metadata from images
exiftool -overwrite_original -gps:all= *.jpg
@GitterDoneScott
GitterDoneScott / gist:f41c97b46fe72769a26ce0b9cfda02b6
Last active December 11, 2024 22:32
containerized yt-dlp command to download and clean Youtube transcripts and output the results to stdout. The purpose of this gist is to use the resulting output for text generation AI processes.
docker run --rm ghcr.io/jauderho/yt-dlp:latest --quiet --no-warnings --ignore-config --skip-download --write-subs --write-auto-subs --sub-lang en --sub-format ttml --convert-subs srt --exec before_dl:"echo %(title)q" --exec before_dl:"cat %(requested_subtitles.:.filepath)#q | sed '/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9] --> [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]$/d' | sed '/^[[:digit:]]\{1,3\}$/d' | sed 's/<[^>]*>//g' | sed '/^[[:space:]]*$/d' " <YouTube video URL>