Microsoft Automatic Update Reboots

After loosing some data thanks to the nice Microsoft autmatic update reboot. I've decided to disable these stupid reboots. Who ever invented this "great" feature should be kicked very hard!!

Disable Reboots for This Run

Execute this at the commandline:

net stop wuauserv

Or a bit more user friendly

net stop "automatic updates"

Much Better is to disable the updates

Start, Run "gpedit.msc" to bring up the group policy editor. Then navigate to the folder

Local Computer Policy   ( Dutch versions: Beleid voor lokale computer)
Computer Configuration ( Dutch versions: Computerconfiguratie )
Administrative Templates ( Dutch versions: Beheersjablonen )
Windows Components ( Dutch versions: Windows-onderdelen )
Windows Update

There are two settings and both will work, so it's your choice. Either enable No auto-restart for schedule Automatic Updates installations or set Re-prompt for restart with scheduled installations to a long time interval, like 1440 minutes.

I found the information above on the following URL:

http://www.codinghorror.com/blog/archives/000294.html

Frustrating PHP 4 Objects

Today I tried the following:

function getObject()
{
$object = new Object();
return $object;
}
getObject()->executeMethod();

Well the code above works perfectly ...
All great, the app worked, so I've committed the project to Subversion.
Upload it to our production server..

Crash!
Well the production server runs PHP4.
Our development server runs PHP5.

In PHP4, You first must put the result of the method call in a variable...

$obj = getObject();
$obj->executeMethod();

*sigh* Sometimes I hate PHP!

Great method to_json

A very nice method to convert a Ruby array to Javascript.

print { 'key1' =>  'value1', 'key2' => [ 1,  2, 3 ] }.to_json
outputs:  { key1: 'value1', key1: [ 1, 2, 3 ] }

RSync Hangs when rsyncing via SSH

I've got an automatic backup script that makes a daily copy of my server to an offsite location. I use rsync for this. I've noticed last week that nothing the sync never completed...

Btw. The offsite location (a SuSE Linux 9.3 server) initiates and rsync over SSH with my FreeBSD 6.2 server.

After some debugging I noticed rsync is hanging in the middle of the backup!?
I found several articles on the internet about this problem. But I'm still searching for a solutions for my problem... :(

Well every time it hangs on:

/somepath/wordpress/xmlrpc.php is uptodate

WordPress.. Coincidence?!? ;-)

---

11 august 2007 - Well it was a false alarm. Rsync is just extremely slow... :-(

Prototype automatic Spinner

I found the following code on the internet. By using this code, a spinner is showed automaticly if an Ajax request is running. Very nice!

// registreer een algemene spinner
Ajax.Responders.register({
  onCreate: function() {
  if (Ajax.activeRequestCount > 0)
    Element.show('spinner');
  },
  onComplete: function() {
  if (Ajax.activeRequestCount == 0)
    Element.hide('spinner');
  }
});

Didn't know prototype had this global register method. I should take a better look at the API!