My track featured on PlanetBadminton Video

June 15th, 2009

My track “Cosmopolitan” features on a PlanetBadminton video – thanks to Simon Pollock.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Tumblr
  • TwitThis

booshtukka Booshtukka, Music

My opinion of Skype on Three

May 14th, 2009

3 asked me to make a video with my thoughts on using Skype with their handsets. I am a big supporter of anything that gives me free phone calls! You can see the video on the 3 Bebo page.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Tumblr
  • TwitThis

booshtukka Skype

Regular Expression to match UK residential telephone numbers

May 13th, 2009

A regular expression to match UK residential telephone numbers. It understands the difference between 02 and 01 numbers, as well as that 076 is not a valid prefix. It will accept all common formats and international numbers.

Examples of accepted numbers:

  • 02081234567
  • 0208 123 4567
  • 0208 123-4567
  • +44 208 123 4567
  • +44 (0) 208 123 4567
  • 01234 567 8900
  • +44 0 1234 567-8900
  • 07712 123 456

Examples of numbers that will not be accepted:

  • 020812345678
  • 123456789
  • 07612 123 4567
  • +33 345 876 1298

This is my first submission to the excellent regexlib.com regular expression library – I’d appreciate if you could vote for it!

/^((\(44\))( )?|(\(\+44\))( )?|(\+44)( )?|(44)( )?)?((0)|(\(0\)))?( )?(((1[0-9]{3})|(7[1-57-9][0-9]{2}))( )?([0-9]{3}[ -]?[0-9]{3})|(2[0-9]{2}( )?[0-9]{3}[ -]?[0-9]{4}))$/

Let me know if I’ve missed anything!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Tumblr
  • TwitThis

booshtukka JavaScript, RegEx

Amber Mac mentions me in an article on Nicecast

May 12th, 2009

Amber Mac recently asked on Twitter if anyone had experience with Nicecast. I chimed in, and she asked if she could quote me in an article she was writing. I was only too happy to oblige, and here is the result.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Tumblr
  • TwitThis

booshtukka Booshtukka, DJing, Music

Centre div in window no matter what – Version 2

April 22nd, 2009

In a previous post I showed you how to center a div on screen regardless of if it was inside an iframe or not. This is the second version, which should work regardless of if the div is in the top level window, an iframe, or a regular frame.

/******************************************************************
	Name: center
	Description: Center a div on page, no matter what!
	Author: AK (www.zeroedandnoughted.com)
	Date: 22nd April 2009
	Version: 0.2
	Dependencies: jQuery
	Notes:
	******************************************************************/
	(function($) {
	    $.fn.center = function() {
	        return this.each(function() {
				var $this = $(this);
				var frameXOffset = 0, frameYOffset = 0, windowHeight = 0, windowWidth = 0;
				//Are we in a frame?
				if (top.document != window.document) {
					var frm = $('iframe',top.document.body);
					if (frm.length == 0) {
						//regular frame
						frm =  $('frame',top.document.body);
					}
					var i=frm.length;
					while (i--) {
						if (frm[i].contentDocument) {
							doc = frm[i].contentDocument;
						} else {
							doc = frm[i].contentWindow.document;
						}
						if (doc === document) {
							//located our frame!
							frameXOffset = $(frm[i]).offset().left;
							frameYOffset = $(frm[i]).offset().top;
							break;
						}
					};
					if (jQuery.browser.msie) {
						windowWidth = top.window.document.documentElement.clientWidth;
						windowHeight = top.window.document.documentElement.clientHeight;
					} else {
						windowWidth = top.window.innerWidth;
						windowHeight = top.window.innerHeight;
					}
				} else {
					//we are not in a frame
					if (jQuery.browser.msie) {
						windowWidth = window.document.documentElement.clientWidth;
						windowHeight = window.document.documentElement.clientHeight;
					} else {
						windowWidth = window.innerWidth;
						windowHeight = window.innerHeight;
					}
				}
				var elHeight = $this.height();
				var newTop = ((windowHeight/2) - (elHeight/2)) - frameYOffset + $(parent.document.documentElement).scrollTop();
				if ((newTop + elHeight) > $(document).height()) {
					newTop = $(document).height() - elHeight;
				}
				$this.css ({
					left: ((windowWidth/2) - ($this.width()/2)) - frameXOffset + $(parent.document.documentElement).scrollLeft(),
					top: newTop
				});
			});
		};
	})(jQuery);
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Ping.fm
  • Pownce
  • Reddit
  • Slashdot
  • StumbleUpon
  • Tumblr
  • TwitThis

booshtukka JavaScript, jQuery