Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Linq;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using Elmah;
using System.Collections;
using Microsoft.WindowsAzure.ServiceRuntime;
namespace YouApplicationNameHere
{
@tommck
tommck / gist:5681374
Last active December 17, 2015 22:19
How to use Durandal 2.0 with WinJS 1.0 apps

UPDATE: I wrote a blog post (beginning of a series) on how to do this with WinJS 2.0. http://blog.appliedis.com/2014/10/15/writing-winjs-apps-with-durandaljs-on-windows-8-1/

-- Old Gist Below --

Native Apps with WinJS

This gist is to help people get started with Durandal integration with WinJS applications. The information is current for WinJS 1.0 (Windows 8.0, not 8.1). It will be updated in the future to incorporate any necessary changes for 2.0/Win8.1.

@tommck
tommck / gist:5902406
Created July 1, 2013 16:33
an idea on how to add context-sensitive help to WinJS apps and Durandal apps. Just adding code like this to the "default.js" code .. "app" being the WinJS.Application object
// add Help link in settings
app.onsettings = function (e) {
var commands = {};
/****** HELP ******/
// To add Context-sensitive help
// set a default help URL (/help/index.html)
var helpUrl = '/help/index.html';
// grab the currently active vm and check for a "helpUrl" property on the vm.
@tommck
tommck / gist:5975355
Created July 11, 2013 13:15
jQuery exception logic flow examples... the "assert" function is being called in a couple places. Most of them are to detect Opera and/or other odd browsers. I highlighted the error lines with "/***************** ERROR ON NEXT LINE ****************/" It seems to me that they should already know if they're running a browser that requires this fea…
// jquery 2.0.2 line 1192+
function assert( fn ) {
var div = document.createElement("div");
try {
return !!fn( div );
} catch (e) {
return false;
@tommck
tommck / knockoutExtensions.js
Last active September 6, 2017 10:20
a knockout binding handler for date formatting with momentjs
/*
* read-only date display with momentjs
* use like this: data-bind="moment: dateVar, format: 'YYYY-MM-DD'"
* The "format" is optional and will default to "MM/DD/YYYY"
*/
ko.bindingHandlers.moment = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var val = valueAccessor();
var formatted = '**INVALID**'; // throw instead?
@tommck
tommck / tasks.json
Last active January 20, 2017 16:57
VS Code Task to run "gulp test" and parse jasmine/karma output
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--no-color"
],
"tasks": [
{
"taskName": "build",
@tommck
tommck / ZymaticCleaning.md
Last active March 7, 2017 21:12
Zymatic Cleaning Instructions

Zymatic Cleaning Instructions

This information has been cobbled together from communications with the PicoBrew folks.

For some reason, the information they give publicly on their website and information in forums and private emails differs.

In lieu of them publishing a comprehensive cleaning guide, I have assembled this here.

Rinses

Run a rinse before and after each brew. These should be at least 2 gallons ran from one vessel to another but should be more during the post brew if it has not run clear yet. Hot water is best.

$emailMessageSubject = "OutlookSync Meetings";
$syncRetryIntervalInSeconds = 10;
Function Send-MeetingsEmail() {
param (
$StartDate = (Get-Date -Hour 0 -Minute 00 -Second 00),
$EndDate = (Get-Date -Hour 0 -Minute 00 -Second 00).AddDays(14),
[Parameter(Mandatory = $true)]
[string]