phil has a blog

Classic Shell - Old start menu and Explorer for Windows 7

Classic Shell is a collection of features that were available in older versions of Windows but not anymore. It brings back the classic start menu that Windows 7 doesn’t support, adds a toolbar for Windows Explorer in Vista and Windows 7 like the one in Windows XP and adds couple more smaller features.

Bash - remove spaces and turn spaces to underscores

for f in *; do
     file=$(echo $f | tr A-Z a-z | tr ' ' _)
     [ ! -f $file ] && mv "$f" $file
done

New Bonobo Album is called Black Sands, out 29 March 2010

Tracklist
01 Eyes Down
02 Kiara
03 All In Forms
04 The Keeper 5. Polack
05 Animals
06 Sun Will Rise
07 Kong
08 The Things That I Do
09 Edu
10 Six By Seven

Linux check disk space available

df -h

http://to./ Worlds Shortest URL Shortener

Using http://www.to./

www.to/ubuntu
www.to/phil
www.to/blog
www.to/what
www.to/you
www.to/do
www.to/tu
www.to/p

Using just to. and putting the domain after it:
http://to./phildawson.co.uk

goes to:

to./ppaav

Next time the server goes dead...

/etc/init.d/mysql start
/etc/init.d/apache2 start
/etc/webmin/start
/etc/init.d/proftpd start

Demux .mkv video to extract audio into .ac3 / .mp4 (.m4a)

Using MKVExtractGUI (+ mkvtoolnix)

Demux .mp4 video to extract audio into .mp4 (.m4a)

Using YAMB, a front end to MP4Box

Bonobo - The Keeper (featuring Andreya Triana)

Out on the 18th October 2009.

Dan Bull - Dear Lily

Augmented reality apps

sshfs for Mac OS X

1. Download package, install and restart

http://www.pqrs.org/tekezo/macosx/sshfs/index.html

2. Mount

mkdir -p ~/sshfs/servername
/Applications/sshfs/bin/mount_sshfs username@server.com:/home/username ~/sshfs/servername

Shrink Googles ridiculously large searchbox back to normal

http://userscripts.org/scripts/show/57449

UK Postcode to coordinates function with Google APIs

http://code.google.com/apis/maps/signup.html

<?php $key = ''; ?>
<script src="http://maps.google.com/maps?file=api&v=2&key=<?=$key?>" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=<?=$key?>"type="text/javascript"></script>
<script type="text/javascript">

var localSearch = new GlocalSearch();

function findCoordinates(postcode, callbackFunction) {

	if (postcode == '')
		return;
  
	localSearch.setSearchCompleteCallback(null,
	function() {
		if (localSearch.results[0]) {
			var resultLat = localSearch.results[0].lat;
			var resultLng = localSearch.results[0].lng;
			callbackFunction(resultLat,resultLng);
		}
		else
		{
			alert("Postcode not found!");
		}
	});  
    
	localSearch.execute(postcode + ", UK");
}
		
function updateInputs(lat, lon)
{
	document.getElementById('lat').value = lat;
	document.getElementById('lon').value = lon;
}

</script>	
	
<p><label>UK Postcode: <br /><input class="text" type="text" id="postcode" name="postcode" size="7" value="" /></label> 
<input type="button" onclick="findCoordinates(document.getElementById('postcode').value, updateInputs); return false;" value="Find Latitude and Longitude coordinates" /></p>
<p><label>Lat: <input type="text" id="lat" name="lat" size="10" value="" /></label> 
<label>Lon: <input type="text" id="lon" name="lon" size="10" value="" /></label></p>

[solution] Moodle: Course info - An error occurred while backing up course start && The backup did not complete successfully

Disable PHP Safe Mode.
If you manage your server with Plesk, go to Domains > [domain] > Web Hosting Settings and uncheck at the end.