Archive

Archive for the ‘Featured’ Category

Creating a MediaWiki API Instance Outside Installation Directory

January 11th, 2009

I’m in the process of writing mediawiki2wordpress—a plugin to allow WordPress to access and display content from a MediaWiki installation. I spent a bit of the evening figuring out how to get MediaWiki to let me trick it into thinking I was making a standard request.

The method I explain here gives you access to the MediaWiki API class as opposed to the standard MediaWiki rendering class. Most of this code came from MediaWiki’s api.php which you can find in MediaWiki 1.13.

Here’s what the API output will look like for the Foobar page on Wikipedia (in XML).

I spent quite a bit of time poking around in the MediaWiki /includes directory and trying different hack-ish methods before this page that had exactly what I needed! It did need updating, but I was happy to oblige. I even had this whole post written up using a sloppier approach before finding the FauxRequest class that I explain below.
Read more…

Featured, Guides, Photography, Programming, Wordpress , , , , ,

Quicksilver Trigger: “Show Current Track” in iTunes

January 8th, 2009

A while back I throw together this AppleScript to trigger Quicksilver to not only go to iTunes, but to automatically focus on the current track. (Note: When iTunes is already the front window, the command to do this is ⌘L.

Features

  • Brings iTunes to the front if it isn’t already the front window
  • Highlights the track that is currently playing (if one is playing)
  • If iTunes is already the front window, this script will hide the window (similar to using ⌘H

Read more…

Computers, Featured, Guides, Programming , , , ,

Setting Up Apache, MySQL and PHP on OS X Leopard

January 3rd, 2009

mampI recently had to setup MySQL on Mac OS X Leopard (I was using 10.5.6). I can never find a guide that gets Apache, MySQL and PHP working using the binaries that come packaged with Leopard. I also don’t like using pre-packaged installers like XAMPP and MAMP. This guide is intended for advanced users as very little explanation is given for each step.

Please add a comment if you have any suggestions for improvement.

Read more…

Computers, Featured, Guides , , , , , ,