Probably the most frequent LINQ mistake

First always throws an exception if the collection does not contain the specified element. If you know that the element might not exist in the collection, use FirstOrDefault

Deploying database projects without Visual Studio

If you need to deploy a database project using the built-in tool VSDBCMD.EXE you will need to have a couple of files on that machine but there is no need to have Visual Studio on the build machine.
For the full list of files needed read this link http://msdn.microsoft.com/en-us/library/dd193258.aspx

What are the tools you use to check page speed?

I use Yahoo! YSlow and from time to time I check with Google Page Speed

Some more tools can be found here.

Long DNS lookup time in Mozilla Firefox?

longDNSlookup

Go to about:config in Firefox and change the property network.dns.disableIPv6 to true.

This was the result:

noMoreDNSLookup

Strings

I went over some selenium tests today and found this code that creates a string that is used in order to test that validation is fired whenever the text entered in a text box has a greater length that allowed.

 
var temp = new StringBuilder();
for (var i = 0; i < 52; i++)
{
      temp.Append('x');
}
longerThan50Chars = temp.ToString();

 

This is all good and working code but it can all be replaced with just one line.

public static string longerThan50Chars = new string('x',52);

Check if an email address is valid

/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i
 
This regular expression will check if an e-mail address is valid.An extended comparison here

Multiple Google calendars sync on the IPhone

In order to be able to sync multiple calendars on your iPhone you need to first select the calendars that you want to sync. For some reason not all calendars are synced automatically... https://www.google.com/calendar/iphoneselect

Remember kids

When creating jQuery custom utility functions always use this pattern because it protects the use of $.

(function($){
   $.foo = function(argument) {alert(argument);}
})(jQuery)