27 Mar 2010

A living, breathing Hac

The Hackintosh lives and breathes. For the technically minded, which you probably are if you're reading this, here is the spec so far:

Gigabyte G31M-ES2L v2.0 motherboard (although as this is a Hac, we should call it a logic board)
Intel E6300 2.8 Dual Core (not the older 6300 1.8 c2d) overclocked to 3.15GHz
Onboard network (doesn't work)
Onboard graphics (limited functionality)
2GB DDR2 800MHz RAM
+ other bits and pieces that were lying around.

I've finally got it reasonably stable using iAtkos 7, but as mentioned, no network. Apparently the earlier v1.x board has a different LAN chip that does work.

The display res has only one choice - 1024x768. Not much good, but I'll be putting in a double head card when I have the money as this will be replacing a double-headed G4.

I got the sound working using the Apple HDA kext (and Azalia enabled in the BIOS)
Other options that I can remember are:

Cheesy bootloader (I can't remember what it's called, but it begins with an X and looks like a russian version of cheesy - not Chameleon, anyway). It looks really good at startup, whereas Chameleon looks like some early Suse Linux experiment. It boots quickly, too.
Mostly a random selection of other stuff.

Sleep and restart don't work yet. About this Mac was reporting the CPU correctly, but now it thinks it's 4 GHz, even though I unclocked it back to 2.8.

When I get it fine-tuned a bit more, I'll report in detail which install options I selected.

22 Mar 2010

CakePHP redirect destinations can sometimes be a little unexpected

In CakePHP controllers CRUD methods there is a lot of this as a way of reaching a default page:
$this->redirect(array('action'=>'index'));


It's okay for a small application, but when things start to get larger, like in a CMS, you'll find that the return path can be a little unexpected. To make everything more predictable, I now write this in the action method to which I want to return:
$this->Session->write('LastAdminPage', DS.$this->params['url']['url']);


And this wherever I need to make the return, like in a CRUD method on the controller or on a cancel button in the view:
$this->redirect($this->Session->read('LastAdminPage'));

21 Mar 2010

My new Hac

The time has come to try building a 'Mac' from scratch. We're talking Hackintosh here. With Apple's move to Intel-based computers, several wily people have devised ways of installing the latest Mac operating systems - Leopard and Snow Leopard - on run-of-the-mill PC hardware.

Well, I say run-of-the-mill, but it does need to be reasonably up-to-date. I have acquired a Gigabyte GA-G31M-ES2L motherboard already (for £29) and I'm awaiting delivery of the E6300 dual core processor and 2GB of memory. This will give me a slightly below current spec Mac at a cost of around £120. Okay, I'll be using some stuff I have around already like a case, a hard disk and so on, but with an iMac currently running at around £900 I think it's a pretty good alternative.

I've no idea how stable it'll prove to be, but I'm looking forward to being able to run Ubuntu and (sadly) Windows inside OS X. It will make life a lot easier and my desk a lot less cluttered. It might even perk up the family once the replaced G4 MDD moves down the line (a superb, if noisy, machine).

I'll post more as I build

19 Mar 2010

Yeah, yeah...

...why didn't I build my own blog? After all, CakePHP even comes with a build-a-blog-tutorial. I just don't seem to be able to find the time.

I've just spent the last few months building a Joomla-killer of a CMS. Okay, it's tailor made for our company, but it's very open and flexible. Modules are easy to code and incorporate, page building and navigation is drag and drop and the whole thing hangs together with a modified preorder tree traversal algorithm (MPTT) - Google it. Best of all, it's built with CakePHP. It's easy for designers to learn and easy for programmers to code. Hopefully we'll open source it when we can think of a name for it. That way, more modules will be written and shared. Life needn't be so drupal.

Anyway, back to the yeah yeah, I will, one day, build my own blog. Just not yet.

Fixing Internet Explorer Javascript Errors: line 1 char 1 code 0

I've found that this is usually something header-ish and to do with the actual loading of the js rather than a bug within the script. Today, I've just spent an hour tracking down the problem. Firefox said "problem? what problem?"

The solution: the js (jQuery in this case) was being loaded twice. That kind of thing happens when all the pages on a website are composite and constructed on the fly.