Dealing with grids in Photoshop is a pain

With GuideGuide, it doesn’t have to be. Pixel accurate columns, rows, midpoints, and baselines can be created based on your document or marquee with the click of a button. Frequently used guide sets can be saved for repeat use. Grids can use multiple types of measurements. Best of all it’s free. Honestly, if you haven’t started downloading it by now, you’re probably a masochist. Weirdo…

PHP long running script without Ajax

<html xmlns="">
<meta http-equiv="Content-Type"  content="text/html; charset=utf-8" />

$executiontime = 5; // max time for scripting
$sleeptime = 3; // seconds to pauze after execution time limit


	$_SESSION["numbers"] = range(1,100000);
	$_SESSION["genesis"] = microtime(true); // absolute start time
	echo count($_SESSION["numbers"]);


$_SESSION["starttime"] = microtime(true); // 'this round' start time

foreach($_SESSION["numbers"] as $key=>$value){

		// abort and 'reload' upon exceeding execution time
		if((microtime(true) - $_SESSION["starttime"]) > $executiontime){
			echo "<p>" . count($_SESSION["numbers"]) . " items left";			
			echo "<br>This round: " . round((microtime(true) - $_SESSION["starttime"]),2) . " seconds";		
			echo "<br>Total time: " . round((microtime(true) - $_SESSION["genesis"])/60,2) . " minutes";
			echo "<p><strong>Pause script...</strong> Resume in $sleeptime seconds...</p>";
			die ('<meta http-equiv="refresh" content="'.$sleeptime.';URL='.$_SERVER['SCRIPT_URI'].'?continue=1" /></body></html>');
		// do some stuff while execution time is still ok

echo "<br>Completed...: total time " . round((microtime(true) - $_SESSION["genesis"])/60,2) . " minutes";

How to restore a lost bluetooth connection

A few days ago I encountered a strange bluetooth problem on my Windows 7 (64bit business, Dell E6520). While I was working suddenly my Dell bt travel mouse disconnected. Tried to reconnect a few times, but couldn’t get it working.

Swapped batteries, and tried another computer: no problem whatsoever. Began to think that I was facing a hardware problem (again!), but then I realized that the device might have been blocked somehow. And guess what… I went looking for “devices and printers” and the Dell bluetooth mouse was still listed, however not connected. The problem was easily solved by removing the device (right click, remove device) and then establishing a new connection.