Archive

Posts Tagged ‘tip’

Convert .dmg to .iso

January 7th, 2008 No comments


hdiutil convert /path/to/filename.dmg -format UDTO -o /path/to/savefile.iso

For Mac OSX only of course

Categories: work Tags: , , , ,

handy Javascript debugging function

November 21st, 2007 No comments

Actually taken from the JS v1.4 Guide and modified to be a little more useful:

function showme(obj, obj_name) {
   var result = ""
   var null_list = "";
   obj_name = (obj_name != '')? obj_name: 'obj';
   for (var i in obj) {
		if(obj[i] != null && obj[i] != '')
			result += obj_name + "." + i + " = " + obj[i] + "\n";
		else
			null_list += i + ", ";
   }
   return result + "\n NULL propertys: \n" + null_list;
}

Pass it an object you want to see the properties of and it will show them to you. Like so:

alert(showme(item[i]));
Categories: work Tags: , , , ,

Webby Awards judging criteria

June 6th, 2007 No comments

The Webbys were just on and Erika was a jduge and attended the ceremony. If you want win a webby award you have to try and scrore high the following:
Read more…

Apache, mod_rewrite on Mac OS X

March 8th, 2007 1 comment

Here a quick list of things to remember when trying to debug Apache on Mac OS X (10.4.8 anyway):
Read more…

Categories: work Tags: , , , , ,

Regular Expression to remove HTML tables

September 12th, 2006 5 comments

Just figured out this regular expression to remove all tables from a HTML document:

</?table[^>]*>|</?tr[^>]*>|</?td[^>]*>|</?thead[^>]*>|</?tbody[^>]*>

Extremely useful for cleaning up prehistoric mark-up with a text editor that supports regular expression find-and-replace searches.

And to go all the way, this one removes font tags too:

</?table[^>]*>|</?tr[^>]*>|</?td[^>]*>|</?thead[^>]*>|</?tbody[^>]*>|</?font[^>]*>