Dave's blog

Howto get a Public IP on Vodafone's 3G Network in Australia

Vodafone in Australia offers a pretty good mobile data plan - 5Gb for $39.95 per month. They have recently upped the price to $49.95 p/m.

Unlike 3, vodafone doesn't offer a public IP addresses to their "mobile broadband" customers. Vodafone pitch this as a business product. I don't agree with it, but I can see how you could justify only offering a NAT'd IP address when using your handset to access the internet or maybe even as a tethered modem. Such logic can't be sustained when offering a HSDPA modem as a "mobile broadband" service. If it is mobile "broadband" then it should be similar to a fixed line broadband service.

After discovering VF only offer a handful of gateways for their data customers, I tried finding out about getting a dynamic public IP address.

To cut a long story short, after 4 calls to data support, and about the same to corporate support, I was at a dead end. Consumer data support told me that I needed to talk to Corporate data support, who wouldn't talk to me as I wasn't a corporate customer.

Eventually I gave up and called the TIO, who, as always were great. I then called the Vodafone complaints team who struggled with all the details of broadband, public IPs, gateway IPs, various service acronyms and the terms which I had agreed to.

After a few more phone calls and waits I was finally awarded my dynamic static IP address. They add something to your account to give you access to the full access APN which gives you a public IP and no port restrictions. For the record the APN is "internet", instead of the normal "vfinternet.au", but this won't work unless VF enable it for you. I some how think Vodafone award access as a prize for persistence.

I did a quick check on the vf.au site again tonight and it seems the small print is the same, so if you sign up for the service I think you have good ground for getting a public dynamic IP like I did. It will just take jumping through a few hoops.

Update: The title should have read public not static IP.

We're Growing and Hiring

Dave Hall Consulting has been growing strongly. We currently have a couple of contractors working on various projects. We are about to commence a significant new project and so need more hands on deck.

We are not looking for website developers. If you are a web application developer with at least 2 years commercial PHP experience looking for contract work, email your resume to jobs@davehall.com.au. Make sure you include links to code you have worked on.

You should have FOSS development experience, although some of the work will be proprietary client systems, they will be built on top of FOSS stacks. We are based in Melbourne, but the current team is distributed, so telecommuting is fine. Experience with cross platform JS and CSS is essential. Knowledge of Zend Framework, PHPUnit and YUI are preferred. We value elegant quality solutions, as should you. A good grasp of written and spoken English is a must. Pay, hours and term of contract are all negotiable.

Update: The job has gone. We have one new contractor starting today and another will be starting work on small projects soon.

Evince Blows my Mind!

A couple of days ago I was emailed a scanned invoice as a PDF. I was planning to just print it and file it, as the tax office here still requires dead tree records for 7 years last time I checked. Before printing it on 100% post consumer waste recycled paper, I opened it in evince. Nothing spectacular in any of that.

Then it happened, I accidentally clicked and dragged on the page. All of a sudden evince was highlighting the printed text on the page. This was a bitmap embedded in a PDF. Evince was using OCR to highlight the contents of the page.

There are moments every so often I am amazed by the features talented hackers add to FOSS. This was one of those moments. I will never look at evince the same way again.

evince showing the scanned page

evince showing the scanned page with highlighted text using OCR

I had a similar reaction when properly using the awesomebar in firebox 3 for the first time.

Update After seeing the comment below from Mr X, I checked evince with a few more PDFs and unfortunately evince wasn't doing OCR in real time. The text is embedded in the PDF. Maybe one time this will be possible. Any evince developers reading, please consider this a feature request.

I am still impressed with evince, just a little less impressed than I was.

Internode adds SourceForge.net Mirror

Yesterday Internode annouced that they will be hosting the Australian SourceForge.net mirror. Internode has been a long term supporter of FOSS. They are one of the few ISPs who officially support Linux. They offer their massive mirror, which has terabytes of FOSS, to the world.

The new SourceForge mirror will be available to the world. The Australian mirror was previously hosted by Optus. Optus hosts other mirrors for FOSS projects including ubuntu. Unfortunately their mirrors are not as reliable as many users would like. The Australian sf.net mirror should be rock solid if Internode's past performance is anything to go by.

Like the other content Internode mirrors, the sf.net mirror will be unmetered for node's ADSL customers. This is in addition to a large amount of other unmetered content, such as ABC content, almost 100 streaming radio stations and other services..

I use and recommend internode to anyone who is interested in high quality ADSL services. The support for FOSS is a secondary consideration, as it is pointless having access to it all, but the connection being down all the time.

Offer of the Day

This turned up in my inbox this morning and I thought I would share it with people.

Good day

I have on several occasions received email from some other debian consultants not just you they've all been asking me to introduce debian to every institution in my country; you must understand that though am very interested, we are talking about a number that would almost run into infinity.

It is true that my Government can bear the cost of importing up to 500Million CDs but the fact remains that I personally do not understand the Software or what it's used for, as such I can't propose it to the senate this is one aspect that we have to discuss in detail about, preferably via my private email which am presently using to write you.

Kindly get back to me so we can discuss about this software and it's benefit to the users if it's beneficial then I promise we can impose it on my country just like Microsoft and make money out of it like you proposed but most important is that you get back to me with details.

Best regards

Abubakar Maikafi
Email: [email protected]
Phone: +234-07025419252.

He is obviously after full CD sets of Debian if he wants half a billion CDs. I am not in a position to supply this quanity of discs, but if you are, please feel free to contact Abubakar Maikafi about his needs.

Usually I only get unrelated spam or resumes from Indian coders looking for .NET on Windows work via my Debian Consultants listing. This even slipped past spam assassin and made my morning.

Essential Tools for a PHP Developer

Tobias Schlitt has just posted some slides from his talk entitled "6 essential PHP development tools in 60 minutes". I flicked the 90 or so slides in PDF format, they pretty much mirror my development environment.

Tobias left out 2 must haves from my personal list. Vim, the only editor I can use for any prolonged period of hacking (go easy emacs fanbois). Although not really a PHP tool, Firebug, is an essential tool for any serious modern web application developer,

With this environment hacking on PHP based web apps should be a breeze.

As a side note I am starting to play with git after watching Linus' Google Tech Talk on it, and I am starting to like a it, so maybe soon it will be s/svn/git for me.

Using Gigabyte BIOS Updates on Linux Boxes

Update: Comments suggest that gigabyte are now using 7zip, not rar as their archive format.

Dealing with Gigabyte support can be a frustrating experience. They only offer support via their website. Once they reply to your enquiry which can take several days, you get a response telling you to visit their website to read the response, and you can reply. This process means it can take several weeks to get a clear and final answer.

In my case I was trying to get a fix for what I thought was a flakey BIOS in my Gigabyte GA-M68SM-S2L. Although Gigabyte claim that their QFlash BIOSes can be loaded independently of the OS the box is running, they only supply them as Windows binary self extracting archives. Gigabyte tech support aren't much help, suggesting that users can just extract it on a Windows box. There is an alternative.

The Gigabyte QFlash binaries are simply self extracting rar files. The following steps make it easy to update Gigabyte QFlash BIOSes on a linux box (albeit with non free software).

  • Download the firmware from Gigabyte
  • cd /path/to/gigabyte-fw.exe
  • unrar e gigabyte-fw.exe
  • cp firmware.fw /path/to/usbstick
  • Reboot computer and select flash BIOS from USB

If all goes to plan you should now have a new BIOS and not had to use a Windows machine to do it.

Classic Javascript Games

A post today on the Ajaxian blog about a javascript based version of Super Mario Kart, reminded me of some of the other great classic games ported to javascript. Below is a quick list based on my bookmarks and other stuff kicking around on my laptop.

I wish you luck getting away with slacking off in the office while playing these in the office.

Feel free to suggest others in the comments

A Virtual Host per Project

Not long before my old laptop got to the end of it usable lifespan I started playing with the Zend Framework in my spare time. One of the cool things about ZF is that it wants to use friendly URLs, and a dispatcher to handle all the requests. The downside of this approach, and how ZF is organised, it works best if you use a Virtual Host per project. At first this seemed like a real pain to have to create a virtual host per project. One Saturday afternoon I worked through the apache docs and found a solution - then I found it fantastic. Rather than bore you with more of my views on Zend Framework, I will explain how to have a virtual host model that requires a little work up front and is very low maintenance.

It gets tedious copying and pasting virtual host config files each time you want to start a new project, so instead I let Apache do the work for me.

I added a new virtual host config file called projects to

/etc/apache2/sites-available
. The file contains

UseCanonicalName Off

LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon

<Directory /home/dave/Projects>
Options FollowSymLinks
AllowOverride All
</Directory>

NameVirtualHost 127.0.0.2
<VirtualHost 127.0.0.2>
	ServerName projects

	CustomLog /var/log/apache2/access_log.projects vcommon

	VirtualDocumentRoot /home/[username]/Projects/%1/application/www
	AccessFileName     .htaccess
</VirtualHost>

The important bit is the VirtualDocumentRoot directive which tells Apache to map a hostname to a path. I use an IP address from the 127.0.0.0/8 range for the virtual host, so they aren't accessible to the outside world and I don't have to worry about it changing every time I check locations.

All of my projects live under ~/Projects and each one gets a directory structure that looks something like this.

[projectname]
  |
  +- notes - coding notes, like grep output when refactoring etc
  |
  +- resources - any reference material or code snippets
  |
  +- application - the code for the project
     |
     +- www - document root for vhost

There are usually other paths here too, but they vary from project to project.

To make this work there are few more steps. First enable the new virtual host

$ sudo a2ensite projects

Don't reload apache yet.

Next you need to add the apache module

$ sudo a2enmod vhost_alias

Time to edit your

/etc/hosts
file so you can find the virtual hosts. Add a line similar to this
127.0.0.2 projects phpgw-trunk.project [...] phpgw-stable.project

Now you can restart apache.

$ sudo /etc/init.d/apache2 reload

This is handy for developing client sites - especially using drupal.

Now my

/var/www/index.html
is just an empty file.

I am getting a bit bored with adding entries to

/etc/hosts
all the time. If I get around to adding dnsmasq with wildcard hosts to the mix, I will post a follow up.

This setup is based on my current dev environment (Ubuntu Hardy), but it also works on older versions of Ubuntu. The steps should be similar for Debian and derivatives. For other distros, it should work, just how to make it work may be a little different. Feel free to post tips for others in the comments.

Day 2 at PHP Unconference Hamburg

I arrived back in Bergen late last night after spending another day the PHP Unconference in Hamburg. I even managed to get one speaker to do his talk in English, which made things a lot easier for me.

My brain started to adjust to German a bit more, which made things easier than on day 1. Overall I think I understood about 25% of what was being discussed, which sound like a waste of time, but that 25% was pretty good quality. Also the discussions in the corridors was great too. At the end of the day the language spoken isn't very important when compared to the ideas shared.

For me, the only attraction of web based social networks, is to provide a backup of my addressbook online. FOSS on the other hand is a global "social network" that is real. Events like linux.conf.au, the PHP Unconference in Hamburg, Bar Camp Melbourne and other similar events are a vital part of the networks - they provide the space for us to meet and discuss ideas.

I also used the trip as an opportunity to catch up with Christian Böttger, Release Coordinator for phpGroupWare. Not only did we discuss the project, but we caught up on how business and life in general was going. It is always good to catch up with Christian, I just wish I had more than a couple of hours to spare.

My next couple of events are locked in. Wednesday night is drinks with Johan Gunnarsson from phpGroupWare, at the airport in Copenhagen. Overnight Google emailed me a confirmation for the Google Developer Day 2008 in Sydney on June 18, there is some interesting stuff on there too - less FOSS centric but still seems pretty cool.