Mitch Denny MitchDenny

View server.js
1 2 3 4 5 6 7 8 9 10
var status = {
started: Date.now(),
heartbeat: Date.now(),
runtime: null
};
 
var heartbeater = function() {
status.heartbeat = Date.now();
status.runtime = status.heartbeat - status.started;
setTimeout(heartbeater, 1000);
View Web.config
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="Node">
<system.webServer>
<handlers>
<add name="iisnode" path="*.js" verb="*" modules="iisnode" />
</handlers>
<defaultDocument enabled="true">
<files>
<add value="server.js" />
View ExcelSelectionChangedDemo.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>Excel Selection Changed Demo</title>
<link rel="stylesheet" type="text/css" href="../Content/Office.css" />
<link rel="stylesheet" type="text/css" href="../Content/App.css" />
<script src="../Scripts/jquery-1.7.1.js"></script>
<!--<script src="https://appsforoffice.microsoft.com/lib/1.0/hosted/office.js"></script>-->
View MainViewModel.cs
1 2 3 4 5 6 7 8 9
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Threading;
using Windows.Networking.Proximity;
View pisetup.sh
1 2 3
sudo apt-get install nodejs npm node-semver
sudo apt-get install mono-complete
sudo apt-get install emacs
View ShortUrlTokenGenerator.cs
1 2 3 4 5 6 7 8 9 10
using System;
 
public static class ShortUrlTokenGenerator
{
private const string alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
private static Random generator = new Random();
 
public static string GenerateToken(int tokenLength)
{
var builder = new StringBuilder();
View gist:868566
1 2 3 4 5 6 7 8 9
public class SubscriptionController : Controller
{
public SubscriptionController(ISubscriberRepository subscriberRepository, IObserver<SubscribedToNewsletter> subscribedToNewsletterObserver, IObserver<UnsubscribedFromNewsletter> unsubscribedFromNewsletterObserver)
{
SubscriberRepository = subscriberRepository;
SubscribedToNewsletterObserver = subscribedToNewsletterObserver;
UnsubscribedFromNewsletterObserver = unsubscribedFromNewsletterObserver;
}
}
View BasicCalculatorSpecification.cs
1 2 3 4 5 6 7 8 9 10
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestContrib.Specifications;
 
namespace Calculator.Core.Specifications
{
[TestClass]
[SpecificationDescription("As a user I want to perform mathematical calculations so that my head doesn't hurt.")]
public class BasicCalculatorSpecification : Specification
{
View BasicCalculatorSpecification.cs
1 2 3 4 5 6 7 8 9 10
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestContrib.Specifications;
 
namespace Calculator.Core.Specifications
{
[TestClass]
[SpecificationDescription("As a user I want to perform mathematical calculations so that my head doesn't hurt.")]
public class BasicCalculatorSpecification : Specification
{
Something went wrong with that request. Please try again.