Here are a few pieces of code I often forget, so wanted to keep them accessible in a nice, clean and friendly format.

Total sum of all numbers above this cell...

=SUM(INDIRECT("R1C"&COLUMN()&":R"& (ROW()-1)&"C"&COLUMN(),FALSE))

Filtering with multiple words in Google Analytics...

(\W|^)(word1|word2)(\W|$)

How to make blank formula cells in excel...

=IF(OR(I2="",J2=""),"",I2-J2)

This is just to show how to include pages inline...

<?php include '_php/_includes/blank.php'?>

Opacity...

filter: alpha(opacity=50); /* internet explorer */
-khtml-opacity: 0.5; /* khtml, old safari */
-moz-opacity: 0.5; /* mozilla, netscape */
opacity: 0.5; /* fx, safari, opera */

How to make sure that pages stay the same width regardless of the scroll bar.....

html {min-height: 101%;}

jQuery rel id stuff.....

$("#selector").click(function()
	{	
		$(".other").hide();
		$("."+$(this).attr("rel")).fadeIn();
	});

Div breaks.....to sort out the floating elements....

<div style="clear:both;"></div>

10 second page redirect....

<meta http-equiv="refresh" content="10;url=http://www.domain.com">

URL masking....

On the index.php file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<frameset rows="2" cols="100%,0%">
<frame src="home.php" width="100%" />
<frame src="home.php" width="0%" />
<noframes>
<body></body>
</noframes>
</frameset>
</html>

On the home.php file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url=http://www.domain.com">
<title>Title</title>
</head>
<body>
</body>
</html>

On page load focus a field...

<script language="javascript" type="text/javascript">

var mytext = document.getElementById("field id"); 
mytext.focus(); 

</script>

Only for IE6...

<!--[if IE 6]>
Code
<![endif]-->

Rewriting URL's to not have extensions...

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

Active link on header include...

<script type="text/javascript">$("#home").addClass("active");</script>

Background Image Tricks!

How to add an auto-updating date...

<?php print date('Y'?>