Monthly Archives: June 2008

Remapping acer euro key

(note this no longer works if you upgrade the bios — on my todo list to find out what the new char codes are)

My Acer 4250 came with rather annoyingly and pointlessly placed euro + dollar keys ‘inside’ the cursor key area.

Being a script monkey, I figured it would be rather useful to remap these keys to delete + backspace.

After much googling, the answer is to:

a) edit C:\Program Files\Launch Manager\MMKEYBD.CFG

comment out a couple of lines with “;” so that they look like this :

;Key 19 = 1,E0,33,E0,B3,F508,Euro Symbol
;Key 20 = 1,E0,34,E0,B4,F509,Dollar Symbol

this prevents acerware from hijacking these keys for its own purposes!

then download and install www.autohotkey.com

change the default script so that it reads

$SC133::Delete
$SC134::Backspace

add autohotkey to your startup folder, reboot and viola! remapped keys 🙂

Acer 4520 keyboard lag fix

This is how you fix keyboard lag issue on the Acer Aspire 4520 Gemstone.

There are two separate ways that you can fix this issue:

The first fix is quite simple – disable the touchpad. Sorry touchpad users 🙁 Press Fn-F7 to turn it off. Remember you can easily plug in a usb mouse instead, or if you’re the geeky type learn to navigate through windows using hotkeys.

The second fix is to upgrade the BIOS to the latest version. This isn’t anywhere as scary as it sounds.

You want the file FBIOS3630.zip, which you can find here

Unzip the contents and run the file SWinFlash.exe – and point it to the file Z03_3630.WPH

If you’re the highly paranoid type, then before you do this create a factory restore disc via the Acer empowering framework. However this is an official patch, so unless you’ve done something truly strange to your laptop, then there’s no reason why updating the BIOS shouldn’t work.

Don’t ask me how this one made it past Acer QA :/

Dreamweaver mx2004 code color CakePHP template files – .thtml .ctp

You want to get dreamweaver to treat .thtml and .ctp files like php files. There are 2 config files that you’ll need to edit

View hidden file types

C:\Documents and Settings\[user]\Application Data\Macromedia\Dreamweaver MX 2004\Configuration\Extensions.txt

PHP,PHP3,PHP4,TPL,THTML,CTP:PHP Files

C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\DocumentTypes\MMDocumentTypes.xml

<documenttype id=”PHP_MySQL” servermodel=”PHP MySQL” internaltype=”Dynamic” winfileextension=”php,php3,php4,thtml,ctp” macfileextension=”php,php3,php4,thtml,ctp” file=”Default.php” writebyteordermark=”false”>

Duplicating a database using PHP and mysqldump

Note i’m using VPS so there are no restrictions – you will only be able to do this on some shared hosts.

<?php

error_reporting(E_ALL);
include ‘../config/database.php’;
include ‘../vendors/MySQLConnection.php’; // personal wrapper, should be obvious what it’s doing
$config = new DATABASE_CONFIG();
$db_test = new MySQLConnection(
$config->test[‘host’],
$config->test[‘login’],
$config->test[‘password’],
$config->test[‘database’]
);

ob_start();
system(‘mysqldump -h ‘.$config->default[‘host’].’ -u ‘.$config->default[‘login’].’ -p’.$config->default[‘password’].’ --compact --add-drop-table ‘.$config->default[‘database’]);
$s = ob_get_clean();
$a = split(‘;’,$s);
function t(&$s){$s=trim($s);}
array_walk($a,’t’);
foreach ($a as $sql) {
$db_test->query($sql);
}

?>