Skip to content

Instantly share code, notes, and snippets.

View kingthrillgore's full-sized avatar

Cameron Kilgore kingthrillgore

View GitHub Profile
@kingthrillgore
kingthrillgore / remove_dated_podcasts_by_dir.sh
Created June 17, 2016 10:58
Removes podcasts on my NAS based on how old they are
#!/usr/bin/env bash
DIRECTORIES=("The Joe Rogan Experience" "The Adam Carolla Show" "Le rendezvous Tech" "Podcast Beyond" "Channel 33" "On Point with Tom Ashbrook Pod" "Security Now MP3" "The Nerdist" "Les Podcasts Gameblogfr" "The Game Informer Show" "Radical Personal Finance" "Giant Bombcast" "The Dave Ramsey Show" "The Clark Howard Podcast" "APM Marketplace" "Pardon My Take" "On the Media" "This Week in Google" "Le journal de 09h" "World Business News" "Business Daily" "BBC World Service Newshour" "On Point with Tom Ashbrook Pod" "The Starters" "Channel 33" "Tech News Today" "This Week in Tech MP3" "PRIs The World from BBCPRIWGBH");
IFS=""
for i in ${DIRECTORIES[@]}
do
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.mp3" -exec rm {} \;
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.ogg" -exec rm {} \;
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.mov" -exec rm {} \;
@kingthrillgore
kingthrillgore / strip_audio_from_files.sh
Created October 25, 2015 03:26
A bash script I wrote to remove audio from dash cam videos. Part of a larger system.
#!/bin/bash
# So I got this dashcam and I run this script to remove audio because the
# camera itself is really badly designed. It does exactly as advertised for
# videos encoded as AVI.
# Usage: Run inside directory with AVI files that need to have audio removed
# ffmpeg is required. Duh.
# Copyright (c) 2015 Cameron Kilgore
<?xml version='1.0' encoding='utf-8' ?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Certificate Year='2000' State='NC' ID='012345'>
<YearOfDeath>2000</YearOfDeath>
<MonthOfDeath>02</MonthOfDeath>
<DayOfDeath>20</DayOfDeath>
<Sex>F</Sex>
<AgeUnits>1</AgeUnits>
<Age>033</Age>
<?xml version='1.0' encoding='utf-8' ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Certificate Year='2000' State='NC' ID='012345'>
<YearOfDeath>2000</YearOfDeath>
<MonthOfDeath>02</MonthOfDeath>
<DayOfDeath>20</DayOfDeath>
<Sex>F</Sex>
<AgeUnits>1</AgeUnits>
<Age>033</Age>