January 2012

Browser and Operating System (OS) Detection with Javascript

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.

Tar - exclude files

How can I keep out certain files when creating a tarball? For example:


How do I execute zyz and abc file while using a tar command?

The GNU version of the tar archiving utility has --exclude and -X options. So to exclude abc and xyz file you need to type the command as follows:

Show SKU in Cart Module - Ubercart

Create a folder in your modules directory named uc_show_sku and add these files.

IE7 Hide Link Text and Leave Link Clickable - IE7 Text-Indent Effect

line-height: 0; 
font-size: 0;
color: transparent;

.htaccess 301 Redirect to Different Domain

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=301,nc]