Click On Tyler Hall

How to Share Your Virtual Hosts on the Local Network

Sunday, August 30 2009

One of the major new features of VirtualHostX 2.0 is the ability to share your virtual hosts over the local network. Its implementation has caused some confusion among users (my fault), so I wanted to take a few minutes to explain how local sharing works and how to use it.

VirtualHostX is great for testing your development sites locally on your Mac, but what happens when you want to show those sites to someone else or test them on a Windows machine? Prior to version 2.0 you had two choices. You could, one, ask that person to step over to your screen or, two, manually edit the hosts file on their Mac (or virtual machine), which totally defeats the purpose of VirtualHostX.

Local network sharing tries to bridge this gap by using Bonjour to advertise your virtual host on the network. It’s exactly the same thing as Apache’s mod_bonjour extension, but, sadly, that doesn’t play nice on Mac OS X. (If someone knows how to make it work, let me know :-)

There are two caveats to this method. One, since VirtualHostX is doing the service advertising, it only works as long as VHX is running. Sorry. Fortunately, VHX doesn’t use many resources, so just close the main window and forget it’s there :-) The other catch is that it makes your URL’s ugly. Instead of the beautiful URL you chose like

http://mysite.dev

the people on your network will see something ugly like

http://your.ip.address:9002

In practice, this shouldn’t affect your development if you structure your site properly, i.e. don’t hardcode the domain name in your HTML.

Now that I’ve explained how it works and what to expect, how do you use it?

It’s simple. Just check the “Share over local network” box and click “Apply Changes”. (You have to click Apply Changes because VirtualHostX needs to modify your virtual host to make sharing work.) Then, in Safari on another Mac, select your site from the Bonjour section of the Bookmarks menu. If all goes well, you should be able to view your site.

But what about in other web browsers that don’t have Bonjour built-in? Well, for Firefox, you’ll need to install the BonjourFoxy extension. In Internet Explorer, you need to install Bonjour for Windows from Apple. Both plugins are quick to install and easy to use.

Questions about this feature? Feel free to contact me any time.

Snow Leopard Compatibility

Friday, August 28 2009

Just a quick note letting everyone know that both VirtualHostX 2.0 and Incoming! are compatible with Snow Leopard. I’ve been testing them against 10.6 for most of the summer and all the issues I noticed have been fixed. That said, please email me if you do run into any problems – fixing them will be my top priority.

VirtualHostX Sale on MacUpdate

Wednesday, August 19 2009

Just a heads up, tomorrow (Thursday 8/19) VirtualHostX 2.0 is being featured on MacUpdate Promo. This is a one day only sale for an extremely awesome price. You’ll have to check out the site tomorrow to see the deal. It’ll be a great opportunity to grab a couple licenses for the rest of your office or small business.

Shine – An Indie Mac Dashboard

Thursday, August 6 2009

Two years ago, shortly after I released VirtualHostX 1.0, I wrote about Appcaster – a web dashboard for Mac developers I built that manages my application updates, payment processing, etc. With the release of VHX 2.0 and Incoming!, I decided it was time to rewrite Appcaster as the original code was hurried and hastily patched over the last few years.

Today I’m happy to officially announce Shine, a revamped version of Appcaster re-written from the ground up. The goal of Shine (more on the name in a bit) was to provide clean, easy to use dashboard for indie Mac developers and also to build a stable foundation that provides for future improvement down the road.

I chose the name Shine because, at it’s heart, it’s a complimentary product to Andy Matuschak’s Sparkle project. (Inevitable tagline: Your app already Sparkles, now make it Shine.) The core functionality, like Appcaster before it, is to automatically generate appcast feeds for your product updates. But it does a whole lot more, too.

Shine Screenshot

Shine handles order processing using PayPal’s IPN service. That includes generating the license information (using either Aquatic Prime or your own, custom scheme), emailing it to the user, and managing the database of orders. It also computes aggregate stats based on your users’ Sparkle update requests, collects user feedback (bug reports, feature requests, questions), and automatically stores your application updates in Amazon S3.

In short, Shine manages my entire Indie Mac developer workflow.

The code is based on two of my other open source projects: the Simple PHP Framework and YUI App Theme. SPF provides a clean, lightweight, active record pattern to model the data, and yui-app-theme is an admin area CSS template built on top of the YUI Grids framework. Combining these two projects let me build Shine in record time (about 24 working hours).

The code for Shine is free to use (MIT license) and available on GitHub. Feel free to email me with any questions or feedback.

(Thanks to Steven Degutis of Thoughtful Tree software for his feedback on this project.)

Incoming! – A New Twitter Search Client For Your Mac

Thursday, July 23 2009

For the last few months I’ve been hard at work on a new type of Twitter client for Mac, and today I’m excited to release the first public beta of Incoming!.

Incoming! is different from every other Twitter client – it’s wholly focused on searching Twitter. You can’t even sign-in if you wanted to. It’s a tool for following your favorite topics, catching breaking news, and seeing what users are saying about your brand and your products.

Think of it as an RSS reader for Twitter. Create a search, add the terms you’re looking for, and watch the tweets start rolling in.

But with all those tweets there’s bound to be a lot of noise – Incoming! helps you filter through the tweets that don’t matter and zero in on the users who do. Our Influencer score lets you pinpoint the most influential users within the topic you’re researching. This doesn’t mean you should ignore everyone else, but it does let you find the most authoritative voices and respond to them first.

Incoming! (the exclamation mark is part of the name) is filled with advanced features for all you marketing types out there, too. You can flag tweets for followup, keep track of the ones you’ve replied to, and even mark them as good or bad. It’s a great way to see what the prevailing opinion is of your brand. And, once you’re done, you can export your results to Excel and easily calculate word of mouth impressions to share with a client.

Did I mention that Incoming! speaks different languages? If you come across a Tweet in a foreign language, Incoming! can translate it for you with one click.

Incoming! also extracts every link and photo from your tweets. This lets you see an aggregated view of the most popular links and photos. Watching a breaking news story? Instantly find the best news link brought to you by the wisdom of the crowd. Following the Iranian election? View photos from the streets of Tehran as they’re posted.

Incoming! does this all – and more – with a sleek UI built exclusively for Mac OS X Leopard.

Now that the marketing speak is out of the way, it’s your turn. Incoming! is in beta, so please download and let me know what you think. Now’s the perfect time to send in your feature requests and tell me about the parts you don’t like, so I can build the best Twitter search client possible, for you.

VirtualHostX 2.0

Sunday, July 19 2009

Today I’m thrilled to announce that VirtualHostX 2.0 is available. It’s been a long time coming (probably too long), but I’m glad it’s now available for everyone to download. Aside from a new icon and a polished UI, VHX 2.0 offers many refinements and a few major improvements.

VirtualHostX Screenshot

First on the list is Bonjour sharing of your virtual hosts. This means that your virtual hosts can be seen by other users on your local network. All they need is a Bonjour capable browser like Safari or Firefox (with the BonjourFoxy plugin).

Shared hosts will appear with a special sharing icon in the sidebar so you can easily see what you’re sharing with the world.

In addition to working with Apple’s built-in web server, version 2.0 also adds improved support for MAMP and compatibility with XAMPP. You can choose which of the three web servers to use from VHX’s Preferences window.

Finally, VirtualHostX now offers finer grained control over your web server. You can manually start, stop, and restart, check its current status, and also scan for problems with your config files.

VHX 2.0 is available for $15. Existing users can upgrade for $5.

Moving From WordPress to Chyrp

Monday, July 13 2009

I’m in the process of moving this blog (and the whole site) over to Chryp and off of WordPress (which has served faithfully for two years). I plan on going into the details of why after the switch. But, in the mean time, I thought there may be other people looking to switch. I’ve posted a small PHP script to GitHub which imports your WordPress posts into Chyrp. Maybe it’ll be useful to someone else.

Download wordpress2chyrp here.

Sosumi – A MobileMe Scraper

Monday, June 22 2009

Sosumi is a PHP script that scrapes MobileMe and exposes Apple’s Find My iPhone functionality to the command line or your own web application. This lets you pull your phone’s current location and push messages and alarms to the device.

Like my previous blog post that dealt with AT&T’s Family Map service, my goal was to connect my iPhone with Fire Eagle by Yahoo!. There are a few iPhone Fire Eagle updaters available, but they’re all limited by Apple’s third-party application restrictions. Sosumi gets around those restrictions by running every few minutes on your own server rather than the device itself. In my case, I’ve setup a cron job to run the script every fifteen minutes and push my location to Fire Eagle.

Until Apple releases a location API for MobileMe (not likely, and not their job), this will have to do.

Grab the code on GitHub.

Example:

$ssm = new Sosumi('username', 'password');
$location_data = $ssm->locate();
$ssm->sendMessage('Daisy, daisy...');

Persistant Location Updates From iPhone to Fire Eagle

Monday, April 20 2009

Location Based Services are hot. They add an extra layer of usefulness on top of the web sites and products we’re already using. The trick is keeping your location updated in the cloud as frequently, comfortably, and securely as possible.

Fire Eagle fulfills the security requirement — brokering your whereabouts only to parties you’ve authorized. And iPhone applications like Sparrow and Voila make it a cinch to update Fire Eagle on-the-go. But they’re limited to manual updates as they can’t run in the background. (And you wouldn’t want them to because of the drain GPS has on battery life.)

For me, the holy grail has always been a way to update your location persistently from iPhone. And until Apple offers their own solution (fingers crossed) I’d like to present mine. It’s a dirty hack (the best always are), and has the added benefit of working with any AT&T phone — not just iPhone.

To do this, we’ll be scraping AT&T’s new Family Map service and then pushing the data we retrieve into Fire Eagle ourselves.

(Family Map is an overpriced add-on to your monthly plan that lets you track the phones on your account using AT&T’s website. It’s limited, but surprisingly good considering it came from within the bowels of a cellphone company.)

There will be three parts to this hack.

  1. Scraping our location data from AT&T’s website.
  2. Pushing that data to Fire Eagle.
  3. Making the script run automatically.

Let’s get started.

Scraping the Data

The Family Map website uses Microsoft’s VirtualEarth maps plus some other AJAXy fanciness. I briefly poked around to see if there were any JSON or XML data sources I could hijack but didn’t see anything. Instead, I opted to directly scrape their mobile website as it’s plain vanilla HTML.

I won’t go into the details of scraping the data (you can see the code for yourself), but it was pretty simple. Login, send a “locate my phone” request, wait for the data, and parse out our coordinates.

Pushing Data to Fire Eagle

Fire Eagle is an excellent API to work with. They’ve got a clear spec and tons of example code. The only tricky part is handling the initial OAuth setup. I’ve included a simple web page (setup.php) you can use to do the authentication. It’s based on Fire Eagle’s PHP API kit example.

Once OAuth is setup, it’s only one line of code to publish our location.

Making it Automatic

Running this script automatically will vary depending on your setup. In my case, I’ve created a cron jon that runs the included update.php script every five minutes.

Download the Code

And that’s it. This code is only a few hours old, but it seems to work well so far. I watched as Fire Eagle was updated with my location this morning on the way to work. That said, it’s definitely not user friendly — clearly something only someone familiar with a command line would want to setup. But if you’re interested in developing a friendlier solution, let me know and perhaps we can work together.

Grab the code from GitHub.

Google Voice Dialer

Thursday, March 26 2009

Last year I posted a PHP script that lets you dial phone numbers using Grand Central. I updated it this morning to support Google Voice as well.

The syntax is the same

$gv = new GoogleVoice('you@gmail.com', 'password');
$gv->call($your_number, $their_number);

You can grab the code from my google-voice-dialer project on GitHub.

On Tyler

Originally from Nashville, I'm an engineer working for Yahoo! in San Francisco and paying my way with PHP and Cocoa.