Monthly Archives: February 2009

Force Eject a CD/DVD in Apple Leopard

Today I had to help a friend force eject a stuck DVD in his iBook, there are a couple of methods we tried and I thought that hey may be helpful for others.

I would recommend trying to eject your stuck CD/DVD in this order;

1) Hold the ‘Eject’ Key for up to 30 seconds.

2) Stop the CD/DVD spinning

Stop the CD/DVD from spinning by gentle pushing in a thin piece of cardboard ( not to soft, nor hard ), thin packaging cardboard from like a battery or toy packet.
This will stop the CD as it is always spinning slightly, then hold the EJECT key for 8-10 seconds.

3) Restart holding the Mouse Button

Restart your mac, and once the machine chimes, hold the mouse button down ( external mouse or trackpad button ). This should eject the DV/DVD in up to 8 seconds.
If not, restart your mac again.

4) Restart in to Single User Mode

Restart your machine, and hold down the ‘Command ( apple )‘ + ‘O ( o for orange )‘ + ‘F ( f for fred )‘ keys.
This will boot you in to single user mode.

Type the following Command:

eject cd

Then press the ‘enter’ key

This should eject the CD/DVD.

Once the CD is ejected, type;

mac-boot

Then press the ‘enter’ key to boot back in to your Mac OS.

Force Eject a CD/DVD in Apple Leopard

Force Eject a CD/DVD in Apple Leopard

‘BounceBox’ Mootools Effects Class

I sat down to further my Javascript skills a couple of weeks ago and re-wrote a small peice of code that I used on DreamCatcher, A School Careers Application to create ‘Slide Down’ boxes for the Contact Form, Login Form and an Introduction Movie.

I rewrote it using less code and working out heights and sizes more dynamically, but yesterday I decided that I wanted to write a Mootools Javascript Class, something I have never attempted. So here is the first version 1.0. A simple Javascript class for Mootools 1.2+ to display a sliding box with a nice tranisiton and with/out an overlay layer.

This Class requires no CSS styles other that cosmetic formatting, and can be called via DOM READY or an Event. If the BounceBox is open, then your ESC key will close the BounceBox.

I have tested it, and works on;

Safari ( Mac & Win )
FireFox 3 ( Mac & Win )
IE 6 & 7

This is a free Release and I welcome any and all bugs and suggestions.

Now Version 1.2

View the Example at http://bouncebox.lendrum.co.nz or Download;

Version 1.2 [download id="10"]
Version 1.1 [download#8]
Version 1.0 [download#7]

BouceBox Preview

BouceBox Preview

Safari's CSS Support for multiple backgrounds on the same Style

I was browsing just now and fond something pretty interesting, Safari supports multiple background image declarations for the same style tag.

	.box {

		background:
		/*	Upper-left	*/	url(./corners_01.png),
		/*	Upper-right	*/	url(./corners_02.png),
		/*	Lower-left	*/	url(./corners_03.png),
		/*	Lower-right	*/	url(./corners_04.png),
		/*	Icon		*/	url(./icon.png),
		/*	Gradient	*/	url(./gradient.png);

		background-position:
		/*	Upper-left	*/	0% 0%,
		/*	Upper-right	*/	100% 0%,
		/*	Lower-left	*/	0% 100%,
		/*	Lower-right	*/	100% 100%,
		/*	Icon		*/	0.6em 0.6em,
		/*	Gradient	*/	0% 100%;

		background-repeat:
		/*	Upper-left	*/ 	no-repeat,
		/*	Upper-right	*/	no-repeat,
		/*	Lower-left	*/	no-repeat,
		/*	Lower-right	*/	no-repeat,
		/*	Icon		*/	no-repeat,
		/*	Gradient	*/	repeat-x;
	}

Adium Chat Client Message Theme – Kermit the Frog

I use Adium for Chatting on my Mac. It is a great little App that allows you to connected with multiple Account types like MSN, Yahoo, Google Chat ( or gmail ), MySpace, Facebook and more… all in the one cool customisable messenger.

Today I looked at writing my own Message Theme as a quick learning exercise.

I have released the theme for free and you can download both Adium and any themes at Adium Extras.



.


Torrent Downloading Laws in New Zealand ~ Update

If you download anything via torrents, you should read this article. It is a pretty clear explanation of the upcoming Torrent Laws for ISP’s and users here in New Zealand including the ’3 Strike’ policy.

http://torrentfreak.com/code-aims-to-quell-new-zealand-3-strikes-fears-090204/

The thing about torrents is that not every one uses them to download Copyright Application, music or movies.

I use Torrents and A Torrent Application called Vuze to download FREE content such as video tutorials, TV Adverts, HomeMade or Festival Movie Releases, Music Video Clips and all sorts of content that people have released openly.

I have even worked with a multiple office/location firm that shared its files via a Secure P2P network, this worked well as it pulls files from all locations, increasing speeds and reducing bandwidth usage.

It will be interesting to see what happens over the next 18 months…

Virtual Web Hosting on OSX Leopard

Recently I brought a new iMac for my home development, music, movies, games and general play things. For work I develop Web Applications and with my ISP I have a static IP address, so I decided to set up a small testing webserver. Since Apple has built in PHP and Apache2, this was pretty much a couple simple steps.

I used my post about Installing PHP5 and mySQL on Mac OSX Leopard to recompile PHP and mySQL, then I started setting up my Virtual Hosts.

Heres what I did from a fresh Install of Leopard;

Step One: Enable Apache Web Sharing

Open your System Preferences, then Select the Sharing option.

Enable the Web Sharing checkbox.

Enable Apache Web Sharing

Enable Apache Web Sharing

Step 2: Install PHP and mySQL

Download and install PHP 5 and mySQL 5 and install using my guide @ Installing PHP5 and mySQL on Mac OSX Leopard.

Step 3: Enable Virtual Hosts

Next you have to tell apache that we are going to use ‘Virtual Hosts’ and not just the default document server.

I am going to explain how to edit this in TextMate, but if you don’t use TextMate ( and why not? ) in a later post I can explain how to use Terminal and PICO to do the changes.

Open TextMate, and go to teh file menu, and select Open…

Check the Show Hidden Files checkbox and navigate to

/private/etc/apache2/

and select the httpd.conf file.

Open your Apache httpd.fonfig file

Open your Apache httpd.config file

Now if you press the Apple ( Command ) + L kets which will bring up the Go to Line dialog box. Go to line 465.

TextMate 'Go to Line'

TextMate 'Go to Line'

You will see the Virtual Hosts Include line.

Remove the # so that the file will now be included when Apache runs.

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Save and close the file. You will be asked for your password.

Step 4: Create your Virtual Hosts

Still in TextMate go to the File Menu and Select Open…. This time you want to navigate to the Virtual Hosts file.

/private/etc/apache2/extra/httpd-vhosts.conf
Open your Virtual Hosts Config File

Open your Virtual Hosts Config File

The first line to edit in this file is to remove the :80 on the NameVirtualHost *:80.

NameVirtualHost *:80

becomes

NameVirtualHost *

For each site you you are going to be serving, you need to add a VirtualHost block.



    ServerAdmin your@email.com
    DocumentRoot "/Library/WebServer/Documents/mysite.com"
    ServerName mysite.com
    ServerAlias www.mysite.com
    ErrorLog "/Library/WebServer/logs/mysite.com_error"
    CustomLog "/Library/WebServer/logs/mysite.com_access" common




    ServerAdmin your@email.com
    DocumentRoot "/Library/WebServer/Documents/mysite2.com"
    ServerName mysite2.com
    ServerAlias www.mysite2.com
    ErrorLog "/Library/WebServer/logs/mysite2.com_error"
    CustomLog "/Library/WebServer/logs/mysite2.com_access" common




    ServerAdmin your@email.com
    DocumentRoot "/Library/WebServer/Documents/mysite3.com"
    ServerName mysite3.com
    ServerAlias www.mysite3.com
    ErrorLog "/Library/WebServer/logs/mysite3.com_error"
    CustomLog "/Library/WebServer/logs/mysite3.com_access" common

Save this file, using your Admin Password.

Step 5: Restart Apache

Now we need to restart the Apache Web Server, you can do this the same as Step 1, disable Web Sharing then re-enable it.

Virtual Hosting Summary

Now you should be able to host more than one domain successfully on your Mac. Things to note are you must be pointing the A Record for your domain DNS Records to your IP Address, and you must point port 80 of your Router or internet gateway to your Mac Internal IP address, I would recommend. using a static Internal IP Address for this machine.

SPAW WYSIWYG was showing HTML characters not HTML

I noticed when installing the SPAW Editow recently that on the Design tab in SPAW, the HTML was showing as converted HTML Symbols like &lt; and &gt; rather than < and >.

After a bit of playing, i found this hidden piece of information on the SPAW FAQ’s.


You should use getHtml() method instead of show(). It returns the code which you can store into variable and use whenever you need it.

SPAW getHTML() Rather than show()

SPAW getHTML() Rather than show()