TOOL FOR TESTING API'S ON A MAC

api testing mac I wasn’t able to find anything that I liked. I basically wanted a front end for curl with bookmarks. Check out my cleverly named Api Tester. No docs yet, but I hope it’s self explanatory. Click the plus on the bottom left to add a bookmark. It’s freeware. Or, just download.

UNSUBSCRIBING FROM EBAY EMAILS IS INSANE

Ebay deserves a lot of credit for building a massive system that never seems to be down. Great. But you know what? That doesn’t excuse them for creating some really stupid interfaces or being complete assholes. At the bottom of an email they sent, I saw this gem next to unsubscribe: Please note that it may take up to 10 days to process your request. Ten days. Ten days? Wow.

GETTING PHPSH TO WORK ON A MAC

I had an issue getting phpsh to work on my mac - I kept getting the following error: Traceback (most recent call last): File “./phpsh”, line 20, in import readline OK, seems easy enough. So I compiled python with readline support. ./configure –prefix=/usr/local/python –enable-readline I change the PATH variable in my .bash_profile to point to the /usr/local/python directory first, and source’d it to get the new PATH settings. Still get the same error.

OB_START() CAUSES PHPSH TO HANG, SORT OF

If you manually call ob_start() at the beginning of your script, you might notice that you are unable to use phpsh. By commenting it out, I was able to fix the issue. I don’t think it technically hangs, it just sits there with the data in a buffer waiting to be flushed.

REGEX COACH MAC SUBSTITUTE

For a while I had to use a Windows box for my development. Fortunately, I was able to make a good case for my company to switch me to a MacBook Pro. One of the tools that took me a while to track down was a regex testing app. On Windows, I was a big fan of Regex Coach, which is a great app. I was happy to find QuRegExmm. It’s not nearly as feature rich as Regex coach, but it seems to be good enough for me, since I really only want to test regular expressions, not really do anything else with it.

'PHP: AN ARRAY OF MONTHS'

I’ll be honest, this isn’t very useful. The goal was to have an array of months in the least amount of code. for($i = 1; $i <= 12; $i++) $months[$i] = date(‘F’, strtotime("{$i}/01/2000"));

READING RAW POST DATA IN PHP

Perhaps you’d like to just sent XML over post, and not have xml=your_nodes_and_stuff_here. No sweat. $xml = urldecode(file_get_contents(‘php://input’)); Enjoy. This can now be called with: curl -d "some_xml_here" http://yoursite.com/pagename

ALTERING TABLES IN MYSQL CLUSTER 5.0.45

I’m setting up my first mysql cluster, and just wanted some clarification on a few things. In the manual, it says: Online schema changes. It is not possible to make online schema changes such as those accomplished using ALTER TABLE or CREATE INDEX, as the NDB Cluster engine does not support autodiscovery of such changes. (However, you can import or create a table that uses a different storage engine, and then convert it to NDB using ALTER TABLE tbl_name ENGINE=NDBCLUSTER.

'APACHE: URLENCODED SLASH BREAKS MULTIVIEWS?'

If you have a URL like the following, and you’re using multiviews: /login/15/return_page%2F50 it won’t work. FYI, the last part is a return page. In this instance, lets just pretend it’s a return page that’s supposed to get hit after a successful login. Using Apache 2.2.3.

MOTOROLA RAZR AND 406 NOT ACCEPTABLE

In trying to get a site working on cell phones, I got a “406 Not acceptable” only on the Motorola RAZR. The site loaded fine on my Treo 755 and every Blackberry I’ve tried. It seems that the RAZR doesn’t handle Multiviews very well, or at all for that matter. If you’re using Multiviews and Apache, you’ll have to specify the full URL: so /login.php rather just /login.