phil has a blog

Force server charset to UTF-8

Add to .htaccess….

AddDefaultCharset UTF-8

yayeveryday.com

Bonobo 'Black Sands' Album Mini Mix

Install latest nvidia drivers on Ubuntu 9.10

    sudo add-apt-repository ppa:nvidia-vdpau/ppa

Valid XHTML with internal JavaScript

‘Any characters within the starting and ending element of a CDATA section are not treated by the XML/XHTML processor as markup, thus preventing a conflict. ’

<script type="text/javascript">
//<![CDATA[




//]]>
</script>

Blinking cursor after install setup screen

I had this problem trying to setup Ubuntu on my new Zotac ION HTPC build. Tried fiddling with the BIOS, then installing from USB, and then tried Arch and Windows 7 CDs installs but they all had the same issue. >_<

The solution:

Don’t install the OS with the mouse plugged into the USB port on the keyboard …

Enable VSync in Borderlands

1. Open WillowEngine.ini

C:\Users\USERNAME\Documents\My Games\Borderlands\WillowGame\Config\WillowEngine.ini

2. Then change UseVsync to True

UseVsync=True

3. Save the file, and Play the game!

PHP simplexml / RSS feed - get content:encoded

$rawXML = @file_get_contents('http://example.com/rss.xml');
$rss = simplexml_load_string($rawXML);
foreach($rss->channel->item as $item) :
	$content = $item->children('http://purl.org/rss/1.0/modules/content/');
	echo $content->encoded;
endforeach;

Speeds of Wireless, USB, Firewire, Ethernet and eSATA

These are all max theoretical, your speeds will be slower.

Wireless g
54Mb/s or 6.5MB/s

Wireless n
300 Mb/s or 37.5MB/s

Gigabit Ethernet
1000Mb/s or 125MB/s

Firewire 400
392.216Mb/s or 49.152MB/s

USB 2.0
480Mb/s or 60 MB/s

Firewire 800
786.432Mb/s or 98.304MB/s

eSATA
2400Mb/s or 300MB/s

USB 3.0
3200Mb/s or 400 MB/s

iSCSI over 100G Ethernet
100,000Mb/s or 12,500 MB/s

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