Blog

 

Updated documentation for the Amazon S3 PHP class

I've just finished a massive overhaul of the S3 PHP Class documentation.

This update includes examples for every method (none of which have been tested). If you find any errors or inconsistencies, please drop me a line.

15 Aug 2009 
1 comment

 
 

Controlling Amarok 2 with LIRC

I picked up a Media Center remote while I was in the US and wanted to set up LIRC to control Amarok.

It's fairly simple since all you need to do is map the LIRC controls to qdbus commands and use a bash script to control volume and position seeking.

First, if you haven't already, you need to install LIRC. On Debian/Kubuntu you can install it with apt-get install lirc.

Once you've done that, make sure you're using the correct driver by testing input with 'irw'. The output should look like this (the driver I'm using is mceusb - yours might be different):

don@desktop:~$ irw
000000037ff07be9 00 Play mceusb

If you don't get any output from irw you need to take a step back and get the correct driver working for your remote first. I had to reboot for the driver to work.

After you have installed the driver, save lirc-amarok to $HOME/.lirc/amarok, open it in your favourite text editor and replace mceusb with the driver you are using (irw output will show the driver you are using):

Then, save lirc-amarok.sh to $HOME/bin/lirc-amarok.sh and chmod +x $HOME/bin/lirc-amarok.sh to make it executable.

The lirc-amarok.sh script isn't loaded by LIRC automatically so you need to run it yourself. Either when starting your desktop or by editing your Amarok menu entry to run "lirc-amarok.sh && amarok %U" - which will load it only when you open Amarok.

21 Jun 2009 
No comments

 
 

20 Feb 2009 
5 comments

 
 

Wordpress plugin for Amazon S3

I've created a very simple Wordpress plugin for Amazon S3 which uses my Amazon S3 PHP class.

Currently it allows you to upload files to an S3 bucket and insert them into your post when adding media.

Please note that PHP 5 and the CURL extension are required.

Download the latest version of the plugin.

To install place s3uploader.php into your wp-content/plugins/ directory. After activating the plugin you will need to configure your AWS credentials under Settings - Amazon S3 and select the bucket you would like to upload to.

Planned features for upcoming releases
  • Image resizing
  • Bucket browsing functionality under the media library
Changelog
  • 0.2 (2009-03-07):
    Some improvements and support for file downloads and flash movies
  • 0.1 (2009-02-16):
    Initial release

16 Feb 2009 
2 comments

 
 

Tracking file downloads with Google Analytics and Prototype

Using Prototype's CSS-style selectors you can easily track file downloads with Google Analytics:

                      Event.observe(window, 'load', function() {    $$('a[href$=".zip"]', 'a[href$=".pdf"]').each(function(anchor) {
        anchor.observe('click', function(event) {
            if (pageTracker) pageTracker._trackPageview(anchor.getAttribute('href'));
        });
    });
});

16 Jul 2008 
No comments

 

Latest tweets

Hmm. http://yfrog.com/nc1lgj # 24th July 2010

Code obfuscation is cheesy. # 3rd June 2010

@easydns congrats! it's about time :) # 11th May 2010

Home | Blog | About | Contact | Copyright © Donovan Schönknecht Top