20 May 2007 - 20:29Forum Youtube Linker makes youtube links more useful

I wrote a little script that generates bbcode for linking to Youtube videos. It was inspired by the way GTalk and Orkut take Youtube URLs and show a screenshot and description etc.

It spits out forum bbcode that’ll look like this:

Yoji Biomehanika clip @ Sensation Black 2004

Youtube thumbnailYoutube thumbnailYoutube thumbnail
Yoji drops a sick track @ sensation black 2004Dark By Design – Blackout (yoji biomehanika mix)
http://www.youtube.com/watch?v=YfIPt5Ai5P0

It was basically a way for me to teach myself regular expressions in php. A few of my friends have already found it useful, so give it a shot if you post on any bbcode-enabled forums.

You can also set up a bookmarklet and point it to javascript:(window.location = ‘http://portfolio.itas.ca/~mackenzied/uchoob.php?url=’+location.href);
or drag this into your bookmarks/toolbar: Link to this Youtube video

2 Comments | Tags: code, video, web

8 May 2007 - 19:43[How to] create an offline WAMP demo kiosk in Vista

Today I was asked to put together a fully-roamable version of a demo website on a laptop with Vista basic. This way, you can demo your site with a working db to a client while you’re out on a yacht with no wifi, for example. It’s fairly simple, but there are a few stupid things you need to do to get it working in Vista.

Objective: To create an instance of an existing website with Apache and MySQL that runs completely off localhost, so demonstrations can be conducted without a network connection.

For this project, I chose to use the very-awesome Apache2Triad. Apache2Triad takes care of PHP and MySQL with remarkable ease in XP, but we’re not using XP today.

Download and install the “Edge” release, 1.5.4 from http://sourceforge.net/project/showfiles.php?group_id=93507 . This will take care of MySQL, but the Apache services won’t start properly in Vista. To fix that, you’ll have to install Apache 2.2.4 over top.
Get the MSI installer of Apache 2.2.4 from http://httpd.apache.org/download.cgi , and do a ‘custom’ install into the same path as your Apache2Triad installation. UAC will ask you for allowance, and a blank message box with nothing but an OK button came up (a cmd window came up to tell me that the Apache service was already installed, and that I could press esc to quit, but I just ignored it). Click to allow the UAC, and OK on the mystery window. When prompted, put in localhost for the host and server names. You can leave the email address blank if you want. The latter installation will add a shortcut to the Startup folder in your start menu, you can remove that.
After a reboot, Apache and MySQL should both start automatically.

Try navigating to localhost in your browser. The second time you installed Apache should have a message telling you that “It works!”. Navigate to your site root, (C:\apache2triad\htdocs by default) and paste in a copy of your demo site.

Check out http://localhost/phpmyadmin , and use the Import feature to recreate your database(s) from SQL dump files. (Oh, by the way, go make SQL dump files out of your database with Phpmyadmin’s “Export” if you haven’t already.) Click the Privileges tab in Phpmyadmin and create the accounts you need.

Navigate to http://localhost/ again and try out your site. If all went well, you should now have a working copy of your website that you can take with you and demo for clients anywhere.

1 Comment | Tags: how to, internet, software, tech