Skip to content

Instantly share code, notes, and snippets.

View docblades's full-sized avatar

Christian Blades docblades

View GitHub Profile
@docblades
docblades / mkvinfo_parser.py
Created January 28, 2011 00:46
Parses the output from MKVinfo
#!/usr/bin/python
# Created by Christian Blades <christian dot blades at docblades dot com>
from xml.etree.cElementTree import Element, ElementTree
from urllib import quote_plus as quote
def _getData(line):
name, text = None, None
div = line.find(':')
@docblades
docblades / .gitignore
Created January 22, 2011 01:27
Transcode, instead of completely convert, an mkv into an mp4 so that the PS3 will play it. Keeps video intact, but changes audio from to aac. Requires mkvtoolnix, python-argparse, ffmpeg, libfaac and gpac.
*.pyc
@docblades
docblades / torrents-from-rss.py
Created January 16, 2011 05:06
Takes rss url(s) as an argument, and extracts torrent urls from them.
#!/usr/bin/python
import xml.dom.minidom as minidom
from urllib import urlopen
import argparse
parser = argparse.ArgumentParser(description="Given a URL to an RSS torrent feed, extracts the urls.")
parser.add_argument('url', nargs='*', help='url of an RSS feed')
def getText(nodeList):
@docblades
docblades / flexget_seen_list.py
Created January 15, 2011 07:44
Takes a file as input and executes 'flexget --seen' on each line. Useful if you're just starting to use flexget and don't want to redownload a large number of files you've already seen.
#!/usr/bin/python
import fileinput
import subprocess
for line in fileinput.input():
print line
args = ['/usr/local/bin/flexget', '--seen', line]
subprocess.call(args)
@docblades
docblades / cleaner_linkedin.js
Created September 22, 2010 06:52
Userscript that cleans up that big, nasty "Stay In Touch" box from LinkedIn's home screen
// ==UserScript==
// @name Cleaner LinkedIn
// @namespace http://github.com/docblades
// @description Cleans up a few annoyances from LinkedIn's home screen
// @include http://*.linkedin.com/nhome/
// ==/UserScript==
tohide = document.getElementById("yui-gen4");
tohide.style.display = "none";