Saturday, November 16, 2013
1st Annual Fairfield County Beer Advent Calendar (2013)
Monday December 2: BrewDog, 5 A.M. Saint Red Ale 3.5
Tuesday December 3: Founders, Pale Ale 3.5
Wednesday December 4: Lagunitas, Maximus IPA 3.5
Thursday December 5: Captain Lawrence, Winter Ale 3
Friday December 6: Emelisse, Double IPA 3.5
Saturday December 7: Great Divide, Colette Farmhouse Ale 2.5
Sunday December 8: Flying Dog, In-Heat Wheat 3.5
Monday December 9: Dogfish Head, 60 Minute IPA 2.5
Tuesday December 10: Paulaner, Salvator Doppel Bock 3.5
Wednesday December 11: BrewDog, Libertine Black Ale 4
Thursday December 12: North Coast, Old Stock Ale 2013 3.5
Friday December 13: Heavy Seas, Peg leg Imperial Stout 4
Saturday December 14: Great Divide, Yeti Imperial Stout 3
Sunday December 15: Caulier, Blonde Belgian Ale 2.5
Monday December 16: Weisses, Tap 7 Original 3.5
Tuesday December 17: Lagunitas, Censored Rich Copper Ale 3
Wednesday December 18: Petrus, Aged Pale 0
Thursday December 19: Ithaca, Dark Vine Black IPA 3.5
Friday December 20: La Rulles, Triple 3.5
Saturday December 21: Flying Dog, Gonzo Imperial Porter 4
Sunday December 22: Troegs, Mad Elf Ale 1
Monday December 23: North Coast, Old Rasputin Russian Imperial Stout 4
Tuesday December 24: De Struise, Pannepot 2011 4.5
Total cost: $96.05
Source: DeCicco's of Brewster, NY
Saturday, October 19, 2013
Granola Bars
- 2 cups rolled oats
- 1/4 cup wheat germ
- 3/4 cup sunflower seeds
- 1 cup of peanuts, crushed
- 1/3 cup brown sugar
- 1/2 cup honey
- 4 tbsp unsalted butter
- 2 tsp vanilla extract
- 1/2 tsp kosher salt
- 8 oz dried fruit (raisins, dried cranberries, etc)
Sunday, August 11, 2013
Convert JavaScript Epoch Milliseconds to C# DateTime
// Passed into the service; this example is UTC 1/1/2012, so it'll end up being 5:00am Eastern string millisecondsFromEpochJavaScript = "1325394000000"; // Start at 1/1/1970 since that is considered the epoch date. // Multiply by 10000 to convert milliseconds to "ticks", which are 100 nanoseconds. DateTime converted = new DateTime(1970, 1, 1).AddTicks(Convert.ToInt64(millisecondsFromEpochJavaScript) * 10000);
Wednesday, May 8, 2013
JSON Date UTC Formatting for iOS to Web API Communication
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; [dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; // Keeps time in UTC. NSDate *myDate = [NSDate date]; NSString *myDateString = [dateFormatter stringFromDate:myDate];
Thursday, October 11, 2012
IIS7, JSON Compression, and You
Fiddler. Select resource > Response Section > Transformer tab. Also, the Headers tab should have a Transport section listing Content-Encoding: gzip.
How do I enable it in IIS 7?
First, just get Dynamic and Static Compression running by going to the IIS level or the site level, selecting the Compression feature, and checking the boxes. You may need to install it if you don’t see these options.
How come my JSON requests aren’t being compressed?
The JSON MIME type isn’t compressed by default. That MIME type is application/json.
Great. So how do I add it?
You can use the appcmd.exe or you can edit the file directly. C:\Windows\System32\inetsrv\Config\applicationHost.config is locked by the system fairly tightly, but I did the following. Make a backup. From the Start menu, right click Notepad and start as administrator. Use File > Open to go to the config file. Go to the <httpCompression> node. In both <dynamicTypes> and <staticTypes>, add both <add mimeType="application/json" enabled="true" /> and <add mimeType="application/json; charset=utf-8" enabled="true" />. Note the charset in the second item. That has to match what is sent from the server, exactly. Again, I pulled that from Fiddler by inspecting one of the responses' headers and checking the Content-Type value. I restarted at the IIS level to get the changes recognized.