The best Bollywood movie ever

Posted on September 23rd, 2010 @ 12:21 am

At least, I assume as much from the trailer.

Tags: , ,

No Comments

PHP Code Snippet to replace last instance of a string

Posted on September 6th, 2010 @ 2:47 pm

I haven’t posted any code to this site before, but this one is so useful and short that I figured I’d make an exception.

Here’s a PHP function to replace the last instance of a substring in another string:


function str_replace_last($search, $replace, $subject) {
	return strrev(preg_replace('/'.strrev($search).'/', strrev($replace), strrev($subject),1));
}

That’s it!

Tags: , ,

No Comments

Back to the Future 4!

Posted on September 6th, 2010 @ 9:32 am

Looks like George Lucas is going to be working with Robert Zemeckis on a fourth installment in the Back to the Future movie franchise.

Just kidding.

Tags: , , , , , ,

No Comments

Auto-firing Nerf gun

Posted on September 3rd, 2010 @ 8:00 am

I could put about four of these in the backyard with the kids, and they’d probably stay busy for an hour or so.

Tags: , , , ,

No Comments

The other half of the battle…

Posted on September 1st, 2010 @ 3:07 pm

I had always wondered…

Tags: ,

No Comments