Wednesday, April 21, 2010

SABnzbd URL Bookmarklet (NZBMatrix)

Here's a simple bookmarklet that will take the URL of the current page you're on and tell SABnzbd to download it. It works great if you're using NZBMatrix and on the page for the post you're wanting to download. Perfect for your mobile browser.

javascript:location.href='http://yourhost:8080/api?mode=addurl&name='+encodeURIComponent(location.href)+'&apikey=yourapikey';  

Be sure to insert your SABnzbd API key and hostname (or IP address) into the bookmarklet's code.

Wednesday, January 20, 2010

Perl Find and Replace One Liner

I'm constantly needing a way to easily change a line in a bunch of configuration files. I thought I'd share the way I do it here.

perl -p -i -e 's/oldstring/newstring/g' *

This allows you to use a regular expression and perform the find and replace.