Archive for the ‘Web’ Category

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.

Perth Sites in the Webby’s

Tuesday, April 10th, 2007

The Perth International Arts Festival website, done by the clever starfish at, um, Clever Starfish has received a nomination for Best Events Website. They are up against some big names, including the BBC, Mercedes Benz and Lollapalooza, so this is great news. Congrats to Kay and team.

And in the Honorees section for News Sites there is PerthNorg, run by Bronwen Clune. Once again it’s a fantastic site that is really pushing up against some of the established players in the market, and (I’m assuming) a fraction of the budget.

So, as someone said on twitter, “Go Team Perth!”

_Update: Cross posted at Spin Technologies