-->

security tip_of_the_day

Recently I had this problem and was surprised by this limitation. The problem is wildcard SSL certificates only support one level of subdomains, i.e *.a.com matches foo.a.com but not bar.foo.a.com (taken from RFC2818, see link below). To support all subdomains beyond foo you would need a wildcard certificate for *.foo.a.com

Resources

aws tip_of_the_day, s3

If you are working with large files, transferring them to S3 correctly might be an issue. To ensure data integrity you can send the MD5 hash of the file in Content-MD5 header.

After the transfer S3 compares the MD5 value of the transferred file with the value you provided. If they don’t match it returns an error. This is an easy and great way to ensure the file has been uploaded safe and sound.

Resources

dev tip_of_the_day, csharp

To capitalize all words in a string you can use the function built-in the .NET framework ToTitleCase function in System.Globalization.TextInfo class

Here is a sample (taken from MSDN link below):

using System;
using System.Globalization;

public class Example
{
   public static void Main()
   {
      string[] values = { "a tale of two cities", "gROWL to the rescue",
                          "inside the US government", "sports and MLB baseball",
                          "The Return of Sherlock Holmes", "UNICEF and children"};

      TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
      foreach (var value in values)
         Console.WriteLine("{0} --> {1}", value, ti.ToTitleCase(value));
   }
}
// The example displays the following output: 
//    a tale of two cities --> A Tale Of Two Cities 
//    gROWL to the rescue --> Growl To The Rescue 
//    inside the US government --> Inside The US Government 
//    sports and MLB baseball --> Sports And MLB Baseball 
//    The Return of Sherlock Holmes --> The Return Of Sherlock Holmes 
//    UNICEF and children --> UNICEF And Children

Resources