Archive for the ‘Web’ Category

Gmail and MobileMe – Living Together in Perfect Harmony

Tuesday, July 15th, 2008

I’ve been using Gmail for about 4 years now, and it’s pretty much become the centre of my email life, with my various email accounts being funneled into Gmail. I’ve used it with both the web client, and Mail.app on my Mac via IMAP, and have been pretty happy with both.

With the release of MobileMe and the iPhone 3G I made the decision to move to MobileMe (an Apple fanboi at heart, I wanted to keep it all within the one happy family – particularly seeing as work just bought me a MacBook Air.) But I was really reluctant to stop using Gmail as the repository of all of my email, both received and sent (awesome search, archiving and just to have a backup on another server).

It’s relatively easy to setup forwarding from Gmail through to MobileMe, which you then add to your mail client (Mail.app on the Mac) and the mail will come in as per normal. But this would mean that any sent items won’t appear in Gmail, which in turn means that Gmail is only storing half of the picture. But with adrianlynch doing most of the legwork, we were able to work out a solution.

There are quite a few little things that need to be done in order to fine tune the setup, particularly if you want to use multiple email addresses. I’ll cover those, and then get to the meat of the setup.

Multiple email addresses in Gmail.

Gmail has had the ability to support multiple email accounts for quite a while, and it all works quite well. First of all, sign into gmail, then go to the settings -> Accounts tab. The bet we’re interested in is the “Send Mail As” bit. You can add all of the email addresses you want to have gmail send email for in here. Gmail will send a confirmation email to the address you enter (just to make sure that you are in fact billg@microsoft.com).

Setting up the email forwarding

There are two ways to forward email in Gmail. One is in the Settings -> Forwarding and POP/IMAP tab, which will forward every message to the address you specify. The other way is via a Filter (Settings -> Filters). I prefer to use the filter, because it allows me to get rid of some of the cruft mail that I don’t really ever want to see again (eg, one of my mail accounts flags spam as *SPAM* … if I didn’t setup a filter to not forward this, I’d receive all of those emails in MobileMe, which is sub-obptimal to say the least).

Setting up your computer

Of course, this assumes you’re using a Mac. If not, I’m sure you’re a smart enough person to work it out :)

MobileMe setup

First up, add your MobileMe account. It’s pretty simple. Just enter your MobileMe account details (same as your old .Mac account), and it should all be jake.

If you’ve setup gmail to handle multiple email addresses, enter them all in the “Email Address” field, separated by commas.

Gmail setup

Now, you need to add your gmail account to the system, as an IMAP account. Follow the instructions on the Google Help Center

Once you have added the account Mail.app will probably start downloading all of your mail from Gmail, which could take a fair while. This may or may not be something you want: your choice.

After the mail has all downloaded, go into the Advanced tab for the Gmail account in Mail.app, and uncheck “Enable this account.”

Then, go back into your MobileMe account and set the outgoing SMTP server to smtp.google.com. All of your sent mail will now go through Gmail, which is great for archiving purposes. Because MobileMe is an IMAP server, it will automatically be copied up to the MobileMe server (because it’s storing a copy in your Sent Items folder on your Mac), which means it’s then available on all the computers you use MobileMe with, including your iPhone / iPod Touch.

Why did I enter the multiple email addresses?

If you have multiple email addresses, and you entered them all in the “Email Address” box earlier, you will now have the option to choose which address to send your mail as when you create a new message.

There’s one little gotcha here, and it’s why I mentioned setting up the addresses from within gmail before. If you try to send a message from an email address that Gmail doesn’t “know” about, it will replace the sender email with your Gmail address. This is obviously to stop you spoofing your address, but it took me a little while to work that bit out. So, just make sure that you’ve defined all the addresses that you want to “Send As”

Setting up your iPhone / iPod Touch.

Once you have the above system up and working, you can basically mirror that setup on your iPhone. You need to create both accounts under “Mail, Contacts, Calendars” in the Settings application. Then disable the Gmail account, and set the outgoing SMTP server to gmail in the MobileMe setup.

Push Goodness.

If everything has gone according to plan, you should now have your Gmail “pushing” to your iPhone, and also appearing on your computer. And if you have multiple macs, and have sync turned on for “Mail Accounts” and “Mail Rules and Smart Folders”, then you will shortly have those settings on both of your computers.

Freezing Rails with Git

Thursday, June 12th, 2008

Now that the Ruby On Rails team has moved the codebase over to github, some of the standard rake tasks aren’t working the way that they used to. When it was on SVN, it was possible to type

rake rails:freeze:edge TAG=rel_2-0-1

and the appropriate version would be copied into your vendor/rails directory.

Now if you do that, rake downloads a zip of the edge release. Which is fine and all, but sometimes you don’t want to be on edge … like in any production site.

So, I found a screencast that goes through the process, but I thought I’d actually put the text into a post, mainly for my own reference more than anything else.

$ rails path_to_app

$ cd path_to_app

$ git init

$ git submodule add git://github.com/rails/rails.git vendor/rails

At this point, git will effectively clone the repository, so that you can then choose one of the branches to “freeze” to. Type “git tag” to get a list of all the available tagged branches. Choose the one you want and type

$ git checkout v2.1.0

And that’s it. Slightly more involved than the old way, but still none too shabby.

Ev puts twitter to sleep

Friday, April 18th, 2008

Random chance meant that my twitterific looked like Ev has the power to put twitter to sleep with a single tweet.

How to access US iTunes content on your Apple TV in Australia

Thursday, April 10th, 2008

One of the frustrating things about being an Apple TV owner in Australia is that we are missing out on a fairly major component of the experience: namely renting movies and purchasing TV shows. It’s possible to create a US iTunes account, but generally that’s involved having a US based credit card, which of course, isn’t the easiest thing to come by.

Yesterday, I found this guide to setting up an account, which has some extra steps in it that aren’t entirely necessary, if you’re prepared to actually pay for some content.

Basically, you just need to create an account on the US iTunes store. First, sign out of your iTunes account, (if you already have one of course). Then, at the bottom of the iTunes home page, select the US store

Once you have the US store home page up, click on “Sign In” in the upper right hand corner. Then you will have the opportunity to create a new account. There’s a EULA you have to accept, and then you’ll need to enter some personal information. The next screen is the payment screen. Make sure you choose “None” as your payment option.

You will need to have a US address to enter at this point. The only point to note here is that the Zip Code you enter matches the state that you have selected. Choose “Done” and you should have yourself a US iTunes Account.

All well and good you say, but that doesn’t do me any good if I can’t buy anything does it? True. What you need to do is get yourself a US iTunes Gift Card. You can easily do this by searching eBay for iTunes Gift Card=. Purchase a card. You’ll probably have to pay a small premium on the card, eg I paid US$19 for a US$15 card. Obviously the people selling the card need to make themselves a profit.

Once you’ve got the card, the seller should email you a code, which you just cut and paste into the “redeem” section on the ITMS home page. Then, you’ve got credit on your iTunes account.

So, then you just need to add your account to your Apple TV, change the country in the settings and bingo, you can start renting movies directly from the US. The HD movie quality is excellent, and on my decent ADSL connection (14Mbps) the movie starts playing in almost no time.

Happy watching.

Ideas 4 – Lisa Herrod

Tuesday, February 5th, 2008

Here’s the second video from Ideas 4 from last week. In this one, Lisa Herrod from Scenario Seven gives her “Usability is More Than Skin Deep” presentation.

Once again, there were a few teething issues with the camera. I framed it using Harriet as a guide, but it turns out that Lisa is a little bit taller, which means there’s a little bit of wandering camera action going on for the first minute as I play with the tripod.


Ideas 4 – Lisa Herrod from AWIA on Vimeo.

It was a great night. I wished I could have hung around a little bit longer at the end, but I had to rush home (sick children and such – all is good now) so I missed out on the trip to Fast Eddies.

Ideas 4 – Rachel Cook

Thursday, January 31st, 2008

Last night, AWIA (the Australian Web Industry Association) held one of our semi-regular “Ideas” nights, Ideas 4 to be specific. Rachel Cook (minti.com) and Lisa Herrod(Scenario Seven) each gave fantastic presentations to a great crowd (about 85 people by my rough count).

Here’s Rachel’s talk. There were a few teething issues with the video, mostly to do with lighting and sound (lol), but it’s definitely watchable.


Ideas 4 – Rachel Cook from AWIA on Vimeo.

Lisa’s presentation will be posted next week (there’s an upload limit, and I shot this in HD, so it’s pretty sizeable). I’ll post a link when it’s available.

Can anyone say “X-Box 360″?

Tuesday, January 8th, 2008

Xerox have revised their corporate design, which in current times means a new logo. With a new mission of course, that the obligatory new logo doesn’t say ‘Copier’

And the new logo?

Which immediately made me think of this:

As Myles Eftos said on twitter: “Nothing says ‘copier’ more than pirating someone else’s logo”

LOL.

Connecting to Joyent Accelerator with CocoaMySQL

Thursday, November 15th, 2007

First things first: What’s an accelerator? And why would you care about connecting to it with CocoaMySQL?

Well, basically, an accelerator is kind of like a virtual server, offered by Joyent. Calling it a virtual server is a bit of a misnomer, because it conjures up images of a linux slice, but it’s a bit more than that. Running on OpenSolaris, it’s built from the ground up to offer scalable hosting. You get root access, and the ability to do pretty much whatever you want with it. Out of the box, they are setup to be rather special RubyOnRails/PHP/Python servers, with mySQL all setup and running like a champ.

OK. So where does CocoaMySQL come in? Your accelerator comes with PHPmyAdmin configured by default, but sometimes you want a little more than that you know? And with an app like CocoaMySQL you get a sweet GUI to do all your admin tasks, and nice editing facilities.

Because of the security built into your accelerator, you can’t connect to mySQL from anywhere but your server. Handy for preventing attacks, but slightly painful for server management. So, you need to open up an SSH tunnel, to securely connect to the server. But first of all you need to make some configuration changes on your accelerator.

sudo nano /etc/ssh/sshd_config

change the following parameters to ‘yes’

AllowTcpForwarding yes
GatewayPorts yes

Then you need to restart the ssh daemon, with the following command

sudo svcadm restart svc:/network/ssh:default

The next step is to setup an “SSH tunnel” between your machine and the accelerator, which is basically a direct connection between the two machines. All traffic that flows along this connection is encrypted, reducing the ability for someone to sit there and listen in on what you’re doing.

The command I use for setting up the tunnel is

ssh -2 -f -c blowfish -N -C username@accelerator.ip -L 3307/127.0.0.1/3306

This sets up a connection between port 3306 on the accelerator (specifically the mySQL port) and port 3307 on your local machine. To connect to your mysql server in CocoaMySQL you just connect to port 3307 on 127.0.0.1, which then just sends everything to your accelerator.

And a screenshot of the config screen for CocoaMySQL:

Now, obviously, that ssh command is going to be slightly painful to type in every time you want to connect to your accelerator. So, here’s a handy dandy script and configuration file that makes connecting to multiple servers a breeze. All you need to do is copy the setup in the config file and change the settings for each server. And of course, mirror those settings in CocoaMySQL.

Thanks to Ben Rockwood from Joyent for the tips on the config changes needed on the accelerator

Upgrading to Capistrano 2

Friday, September 14th, 2007

For no other reason than this is something I need to remember on other projects, here is a list of the changes I made when I uninstalled deprec and upgraded to capistrano 2 for deployment.

Things to do

Do this once


gem install mongrel_cluster

then in the application directory


capify .

then remove “require ‘deprec/recipes’ from the deploy.rb file

then put the following in to the deploy.rb file


namespace :deploy do
task :start, :roles => :app do start_mongrel_cluster end
task :stop, :roles => :app do stop_mongrel_cluster end
task :restart, :roles => :app do restart_mongrel_cluster end
end

In The Times Magazine today

Sunday, April 22nd, 2007



In The Times Magazine today

Originally uploaded by Leigh Hicks.

So, this is very weird.

There’s an article in The Times Magazine today about twitter. And for some unknown reason, it has pictures of a bunch of Perth twitterers (twits?), including your humble correspondent.

Strange.