Archive for May, 2011

Remote Desktop Optimization for Firefox 4

by Craig Mayhew on May.30, 2011, under General

Firefox 4 has added some eye candy that greys out the webpage when an alert appears. This looks nice but is very slow over a remote desktop connection as it forces the entire window to be sent again to the client.

To fix, just add this to the end of userChrome.css


tabmodalprompt {
background: transparent !important }

The file should be found here: C:\Users\$username\AppData\Roaming\Mozilla\Firefox\Profiles\$letters.default\chrome\userChrome.css

If it doesn’t exist then copy and rename userChrome-example.css to userChrome.css

Leave a Comment :, more...

CUDA Development in Visual Studio 2008

by Craig Mayhew on May.30, 2011, under Code

When I started developing in cuda I had a bit of a nightmare setting up the development environment. This youtube video saved the day. Many thanks to Yuber Núñez for taking the time to make it.

1 Comment :, , more...

Automatically reboot minecraft on crashes

by Craig Mayhew on May.01, 2011, under Code

The latest version of minecraft has been extremely unstable for me, so I’ve written this quick script to automatically check if minecraft is running – and reboot it within 30 seconds if it isn’t. You will need php installed for this script to work.

  1. Install php on the minecraft server.
  2. Save this code to a file named “rebootCheck.php”

    <?php
    //options
    $url = 'localhost';//localhost or an ip address
    $port = 25565;//25565 is minecrafts default port
    $pauseLength = 20;//time between killing minecraft and booting it again
    //end options

    $fp = @pfsockopen($url, $port);
    if (!$fp) {
      echo 'SERVER DOWN! Rebooting it.',"\r\n";
      //kill anything with javaw.exe in the name
      `Taskkill /IM javaw.exe`;
      //take a nap, while minecraft shutsdown
      sleep($pauseLength);
      //boot minecraft
      `C:\Users\user\Desktop\minecraft alpha\Minecraft_Server.exe`;
    } else {
      echo 'SERVER UP :)';
    }
    ?>

  3. Add a scheduled task to run every 5 minutes and run the following command. Notice here that I have put php within the minecraft directory, you may not have php there and may need to adjust the directory accordingly.
    “C:\servers\minecraft alpha\php\php.exe” “C:\servers\minecraft alpha\php\scripts\check.php”
3 Comments :, more...

Visit our friends!

A few highly recommended friends...