Archive for the ‘Uncategorized’ category

The fastest way to buy Ink Cartridges and Toner Online

December 13th, 2011

I am very happy to announce the launch of  fastsupplies.com.au – the fast, easy way to order Ink Cartridges and Toner online in Australia! A huge selection of genuine and compatible ink and toner, an easy to use website, and our next day delivery policy means buying print supplies online got a whole lot easier.

Fit text string to cell in FPDF

May 19th, 2011

Something I really hate (and am not very good at thoroughly testing) is ensuring that a layout I’ve designed will nicely fit user data of any length. Of course you can easily wrap all text outputting on a webpage or a dynamically generated PDF in a truncate() method, however this crude method isn’t always sufficient.

Today, I was auto generating a PDF certificate (using the PHP PDF generation library: FPDF) and needed the company name and URL to fit nicely on the page. I used FPDF’s handy function GetStringWidth() to acheive a nice little solution to ensuring the string fit on one line of the PDF.

...
	$my_string = 'This is my variable length string!';
	$font_size = 14;
	$decrement_step = 0.1;
	$line_width = 160; // Line width (approx) in mm
...
	$pdf->SetFont('Verdana', 'B', $font_size);
	while($pdf->GetStringWidth($my_string) > $line_width) {
		$pdf->SetFontSize($font_size -= $decrement_step);
	}
	$pdf->Cell($line_width, 10, $my_string, 0, 1, 'C');
...

Win an iPad2

March 24th, 2011

Service Central (where I work) is the best way to find a tradie, and we’ve helped thousands of Australians to find certified businesses for all sorts of work. We’re about to get our quarter of a millionth job posted and to celebrate we’re holding a competition to win an iPad2! Simply guess the date and time the 250,000th job will be posted and win. Also, if you refer a friend and they win the grand prize, you get one too. Enter the Competition Here.

Triple J Hottest 100 2010 Song Previews

January 3rd, 2011

Here’s a list of all songs that you can vote for in Triple J’s Hottest 100 for 2010.

It shows a YouTube preview of each song to help choose your own top 10.

http://www.paulferrett.com/triple-j-hottest-100/2010/

Compare Transport Routes with Transportle!

May 21st, 2010

Transportle is a website myself and two friends made for the Victorian Government’s App My State competition.

It allows you to compare different transport routes in terms of not only time and money, but exercise value and environmental impact.

Check out out and let me know what you think! feedback@transportle.com

Google Ascii Art

April 10th, 2010

Playing with the tool I wrote for my last blog post, I googled “ascii art” and was very impressed by what they do with the Google logo in the search results… Check it out!

ASCII Art Instruction Generator

April 5th, 2010

My sister is making up some activity sheets for school (she is a primary school teacher) and wanted some instructions on how to make ascii art for the children.

So I made an Ascii art instruction generator so the kids can follow each step to make their ascii art.

The generator is here: http://www.paulferrett.com/tools/ascii_gen.php

Fixing Selenium typing errors in Firefox

January 20th, 2010

I recently updated our Selenium Remote Control (RC) testing tool to v1.0.1 so that we could test our site on Google Chrome (and, somewhat tentatively, IE8).  We have been using this tool with varying success for quite some time now, with our tests written in PHP. The update process was generally smooth but one annoying bug persisted – Selenium would no longer type the ‘y’ key in Firefox (2 and 3). As a result many of our tests broke simply because the input typed into a text box did not match what was intended.

» Read more: Fixing Selenium typing errors in Firefox

Installing Facebook Open Platform on Fedora 8

October 3rd, 2009

This is a step by step I wrote ages ago whilst installing Facebook Open Platform on Fedora 8. I did the FBOP working in the end, although found little to no use for it – there were parts missing (mainly the fbml form parser) so I couldn’t get it set up to create a local facebook testing environment, which is what I wanted to do. I haven’t developed a Facebook App for a while, so I’m not sure if they’ve made any ground releasing a more complete version of the open platform.
» Read more: Installing Facebook Open Platform on Fedora 8