Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
import xml.etree.ElementTree as ET
import requests
import re
import sys
from datetime import date
from dateutil.parser import parse
from dateutil.rrule import rrule, DAILY
# suppresses SSL warning
@macbookandrew
macbookandrew / backup-to-Glacier.sh
Last active March 3, 2024 13:36
Ubuntu incremental encrypted backups to S3/Glacier
#!/bin/bash
#
# Note, to pull a file from s3 use "s3cmd get s://bucket/file destinationfile"
# You must have the proper .s3cfg file in place to decrypt the file.
# You may also use "gpg encryptedfile" and supply the encryption code if you download
# from the web interface. Good luck.
# The bucket should be set to transfer to Glacier. To retreive, you need to initiate a
@knzconnor
knzconnor / lsof.bash
Created October 9, 2012 17:11
lsof command to find all things listening on ports
lsof -Pnl +M -i4 | grep LISTEN
@colinux
colinux / subtitles-renamer.sh
Created January 27, 2011 23:21
Rename subtitles files according to tv shows names found in a directory
#!/bin/bash
# Renames subtitles files according to tv shows names found in a directory
# Acceped syntaxes for season/episode are: 304, s3e04, s03e04, 3x04 (case insensitive)
#
# Usage:
# Put this gist somewhere in your $PATH, like /usr/local/bin/subtitles-renamer
# Chmod +x it
# cd ~/YourHolidaysTvShowsWithSubtitles
# subtitles-renamer