Author Archive

How To: Hackintosh a Dell Mini 9 Into the Ultimate OS X Netbook

How To: Hackintosh a Dell Mini 9 Into the Ultimate OS X Netbook

A very good how-to about how you can convert a Dell Mini 9 into the perfect Mac OS X netbook. Something I definitely want to try someday!

There are a lot of netbooks on which you can install and run OS X, but if you're mindful of the handy comparison chart those lads at Boing Boing Gadgets have compiled, you'll know that the Mini 9 is about as ideal a platform as you'll find for a Hackintosh ultraportable: Everything from wi-fi, sound and the function keys down to the optional integrated mobile broadband card and the SD card reader are supported and work as they should. No hardware compromises at all. It's awesome.


10 Ways to Improve Your Web Page Performance

10 Ways to Improve Your Web Page Performance

“Why focus on front-end performance? The front-end (i.e. your HTML, CSS, JavaScript, and images) is the most accessible part of your website. If you’re on a shared web hosting plan, you might not have root (or root-like) access to the server and therefore can’t tweak and adjust server settings. And even if you do have the right permissions, web server and database engineering require specialized knowledge to give you any immediate benefits”


PHP5 and objects

When you cloned an object in PHP 4 and changed one of the variables, this was only changed in the copy. You would have to explicitly tell PHP to make a reference by using the & sign.

In PHP 5 this was changed. When you do anything with an object it is always a reference. You can however change this by using the lesser known clone construct.

Take for example the following situation:

<?php
class Console
{
	public $hello;
}

$console = new Console();
$console->hello = 'world';

$clone = $console;
$clone->hello = 'clone';

echo '$console: ' . $console->hello;
echo '$clone: ' . $clone->hello;
?>

In PHP 4 this would output

$console: world
$clone: clone

However in PHP 5 this will output

$console: clone
$clone: clone

To create a real clone of the Console class you can use the clone construct like this:

<?php
$console = new Console();
$console->hello = 'world';

$clone = clone $console;
$clone->hello = 'clone';

When you see the output now, it’s actually what you’d expect it to be:

$console: world
$clone: clone

Plesk and PHP’s open_basedir restriction

When you get a fatal error from PHP which is saying that the open_basedir restrictions are in place it simply means that it’s not possible to include or open files outside these directories.

However, this can be solved by changing the ‘open_basedir‘ ini using the ini_set() function or when you’re hosted on a Plesk server by creating a vhost.conf file in the conf directory using the following contents:

<Directory VHOST_DIR/httpdocs>
php_admin_value open_basedir "VHOST_DIR/httpdocs:/tmp:VHOST_DIR/ADD_DIR"
</Directory>

Change VHOST_DIR to the directory of your domain, and ADD_DIR to the directory you wish to add. After this run the following command to reload the configuration for the webserver.

/usr/local/psa/admin/sbin/websrvmng -v -a

However, chances are that this is not possible for your account at which point you have to ask your hoster to either disable or add the directory the open_basedir directive for your account.


Installing .deb files on Debian and Ubuntu

On Debian and Ubuntu (that’s because Ubuntu is based on the Debian distribution) you can use apt-get to install or update applications on your Linux machine. However, sometimes you’ll have to download a .deb file or you get one from a CD-rom or other media.

To install a .deb file you need to be the root user of the box and use the dpkg command.

dpkg -i filename.deb

Dpkg can also be used to:

  • dpkg –unpack: unpacks the file but doesn’t install it
  • dpkg –configure: shows the configuration options which are available for the package
  • dpkg –remove: removes (uninstall) a package from the system

To get more information from a package file (such as the version of the application) you can use the dpkg-deb command in the following way:

dpkg-deb –show filename.deb

Even more (less used) commands can be found in the manual pages of the dpkg command.


Force a restore of an iPod Touch

If you’ve tried to jailbreak your iPod Touch and it miserably failed you can try to force a restore of your iPod Touch by doing the following:

While the iPod is connected to your computer:

  1. Hold the Home and sleep button until the iPod turns off.
  2. Keep holding until the iPod turns back on with the Apple Logo.
  3. Once the Apple logo appears, let go of the sleep button, but keep holding the home button.
  4. After some 20 seconds or so, the Apple logo will turn to the iTunes + Cable image. You can let go of the home button now and iTunes will restore.

Copyright © 1996-2010 Re:morse.nl. All rights reserved.
iDream theme by Templates Next | Powered by WordPress