Skip to content

Instantly share code, notes, and snippets.

View itsthejb's full-sized avatar

Jonathan Crooke itsthejb

View GitHub Profile
@itsthejb
itsthejb / plex-trailers.sh
Last active January 29, 2024 14:39 — forked from jdpace/plex-trailiers.sh
Plex trailers
#!/bin/bash
# downloads all missing trailers - it goes through all your movies and matchs them up with an entry
# in plex, grabs the imdb id from plex, and then parses the trailer url from the imdb site, then passes
# that to youtube-dl to download the trailer, it skips entries that dont have a matching imdb entry
# or if the trailer already exists
# must have 'sqlite3' and 'youtube-dl' packages (apt-get install sqlite3 youtube-dl)
# set 'mpath' and 'pms' accordingly
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <media path>"
@itsthejb
itsthejb / clean-sims.rb
Last active February 17, 2016 07:59 — forked from jfro/clean-sims.rb
Quick script to remove stale simulator device folders unused by Xcode, lists invalid devices if run without flags
#!/usr/bin/ruby
require 'fileutils'
require 'optparse'
xcodePath = %x{xcode-select -print-path}
puts "Checking simulator devices against Xcode: #{xcodePath}"
options = {}
OptionParser.new do |opts|