Tech Thought

Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX

Entries for the ‘Tech’ Category

Safari 3.1 Problems with GMail – Shift Key & Command Key (Mac)

Safari 3.1 was released today, and I (along with many others) have noticed problems with GMail.  When typing a message, if you press either the “Shift” key or the “Command” key on the Mac, focus jumps to the subject or the addresses of the message.  I haven’t confirmed this behavior on Windows yet, however it’s [...]

Comments (15)

Google Releases ‘Google Sky’, Backyard Astronomy Changed Forever

Google today released Google Sky, an inverted version of their Google Maps/Google Earth creations.  Whilst this feature has been available for a number of months in Google Earth, it has now been released as a standalone website ala Google Maps.

Comments (1)

Firefox 3 Beta 4 Released

The great people at the Mozilla Foundation have just released the Beta 4 of Firefox 3 for download.  This is the latest incarnation of the now hugely popular Firefox browser and is a major milestone as this release is likely to be very close to the final version of Firefox 3.  It contains a heap [...]

Comments (1)

Landcare Australia CarbonSmart Program Launched

Landcare Australia today launched their CarbonSmart website allowing Australians to purchase Carbon Offsets directly from Landcare: I was involved in the development of the calculator that is used to determine your CO2 emissions.  It utilises a number of Web 2.0 technologies, mainly AJAX using prototype.  Glenn McGrath (aussie cricket legend) was involved in promoting the [...]

Leave a Comment

How-To: Remote Desktop Between Windows & Mac

Sometimes it’s really useful to be able to have direct access to a remote computer.  Particularly if you are helping someone who isn’t technical (and its a nightmare trying to help them over the phone).  However accessing a remote computer can be a fiddly exercise if you are trying to negotiate corporate or home firewalls, [...]

Leave a Comment

SVN: How to Ignore a File

To ignore a file or directory inside a SVN repository use the following command: svn propset svn:ignore <filename> This also works for directories. 

Leave a Comment

How-To: Capture ‘return key’ from a field with Protoype.js

Prototype provides an excellent abstraction mechanism for event handling in javascript. I needed to capture when a user hit the ‘return key’ inside a text box, and then perform a specified action. Using the observe function and the KEY_RETURN constant, you can easily detect when this is done. Simply place the following code in a [...]

Comments (4)

Installing Crypt::Blowfish on Windows from PPD

I have had a requirement to encrypt in Perl and decrypt in Php. As a result, I’ve been looking at ways to get this to work. There are a number of people who have managed to get this working using the Crypt::Blowfish module in perl and mcrypt_cbc function in Php. That’s great unless you are [...]

Comments (1)

How-To: Connect HUAWEI E220/E270/E272/E169G/E160/E180 Modem with Mac OS X 10.5 (Leopard)

digg_url = ‘http://digg.com/apple/How_To_Setup_3G_USB_Modem_for_Mac_OS_X_Leopard’; I’ve been trying to get my USB Broadband Modem to work with Leopard for the past few days. Unfortunately the instructions that come with the modem from 3 (my network provider in australia) are out-of-date and don’t work. So here are the steps to get the modem working: 1. Ignore the instructions [...]

Comments (401)

Help Us Help the Earth Campaign goes live!

I’ve been working on a water calculator for the past few weeks and it has just gone live! Check it out here: http://www.helpushelptheearth.com.au/ This is a partnership between Landcare Australia, Banrock Station Winery and WSP. The water calculator helps Australian’s determine their water usage, potential water savings and determine how much they water they could [...]

Leave a Comment

Stopping firefox auto-completing fields on a form

Firefox has a very handy (or very annoying) feature which pre-populates fields on a form if you have previously entered data on the form and then reload the page. Sometimes you don’t want this to happen! To stop it, do the following: More information is available from mozilla here.

Leave a Comment

AJAX Loading Image

Building an AJAX based web site?  Want to let your users know that something is happening in the background?  The best way to do this is with an AJAX loading image.  I use the site http://www.ajaxload.info/ which allows you to generate spinners as required and is very handy.

Leave a Comment

Converting CSV files to Mysql – Free Online Tool

I often require the ability to convert simple spreadsheets into data in a database. As far as I could tell, there is no easy way to do this without writing your own code or paying $40 for a windows application. So I wrote a free online CSV to SQL converter which converts CSV files to [...]

Leave a Comment

Problem Importing CSV files into Mysql Database

Today I spent sometime trying to import data which originated in an Excel File into a table in my Mysql database using the import interface provided by phpMyAdmin.  I kept receiving error messages due to a column mismatch in the first row of the data.  After trying many different solutions, it turned out that the [...]

Leave a Comment

Credit Card Numbers for testing eCommerce Systems

Recently I've been evaluating ecommerce systems for a client.  As a result i've need to test the payment systems for each – however I didn't want to use my own personal credit card when creating orders.  Thankfully, there are test numbers available to facilitate exactly this.  The following is a list of valid example credit [...]

Leave a Comment

Javascript debugging with Firebug

I've recently been developing a new web based application which relies heavily on AJAX and prototype.js.  Unfortunately, developing advanced javascript applications often requires much inserting of manual alerts in lieu of watch variables and proper debugging.  Now, I've started to use Firebug which is an excellent debugging tool for firefox.  It provides a raft of [...]

Comments (1)

Debugging objects in Javascript with prototype.js

Often when coding complex javascript you’ll wish you had the ability to debug objects or arrays that you are working on – much like Data::Dumper in Perl or var_dump in php (see previous posts on these topics). Prototype.js provides an easy way to do this using the .inspect() method for hashes and arrays: var myComplexHash [...]

Leave a Comment

SilverStripe – An excellent Web 2.0 CMS

I’ve been evaluating a number of CMS for a client recently. These include Xoops, Joomla and now SilverStripe . Joomla is great if you have an ‘intranet’ type site you need to build, where you need features such as Document management, News articles and advanced eCommerce functionality. Joomla’s advantage in these cases is its massive [...]

Leave a Comment

Returning an Excel file from a PHP script

I needed to return an Excel file from a PHP script I wrote.  The simplest way to do this is to create a page consisting of a single table and then setting the headers correctly.  Excel will read the HTML table and convert it automatically into an excel spreadsheet – much easier than writing out [...]

Leave a Comment

Mysql: Defaulting a DATE field to current date

I recently came across the Mysql TIMESTAMP field type.  I’ve seen this datatype for years, however have never really used it – until now.  I’ve been looking for a way to set a fields value to the current date/time by default.  You can’t do this with DATETIME field types in mysql, however you can do [...]

Leave a Comment