Today I wrote a little plugin for watching Confreaks Ruby presentations in XBMC.
As luck would have it, Jonathan Beluch has been working on xmbcswift2 over the last month or so, which he describes as “A micro framework to enable rapid development of XBMC plugins”. Although the library is still under development, the documentation is very complete.
Check out the xbmc-confreaks source, or download the zip file ready to be installed directly into XBMC. I’ve only tested it with the latest stable release of XBMC 11.0 Eden.
Sometimes Rails and PHP applications must live side by side in harmony, which can mean sharing session data between them. Here’s one way this can be achieved with very little modification on the PHP side. First make sure your PHP application is using memcached for session storage:
If you’re interested in seeing how the PHP data gets serialized, take the value of the PHPSESSID cookie and perform a GET request in a memcached telnet session:
$ telnet localhost 11211
Connected to localhost.
Escape character is '^]'.
VALUE a29ajb8go3bkm6r6k2qu4hv3d5 0 298
There are a few Ruby libraries out there which can speak the language of PHP serialization. I’ve chosen Thomas Hurst’s php-serialize. Note that I’ve linked to my fork which also supports . characters in array keys. Add that to your Gemfile, and then include the following middleware in your Rails application.
Now you can use this session store in session_store.rb: