Skip to content

Instantly share code, notes, and snippets.

View NTaylorMullen's full-sized avatar

N. Taylor Mullen NTaylorMullen

View GitHub Profile
@NTaylorMullen
NTaylorMullen / gist:b16b4ec9bac1bfd72b6db9c54da05203
Last active November 10, 2016 17:59
TagHelper Hackathon Notes
- Index
- YouTubeEmbed
- About
- Shared/_Layout.cshtml
INDEX.cshtml
<youtube-embed ..../>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Demo;
using EndGate.Server;
using Microsoft.AspNet.SignalR;
namespace DryRunDemo
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNet.SignalR;
namespace DryRunDemo
{
public class GameHub : Hub
@NTaylorMullen
NTaylorMullen / gist:5574159
Created May 14, 2013 06:54
Auto typescript codemirror loader
/// <reference path="../Scripts/jquery-2.0.0.js" />
/// <reference path="codemirror.js" />
(function () {
var fileCache = {},
fileListTemplate = $("<li class='fileNav'><a href='#'></a></li>"),
fileList = $("#_fileList"),
fileContent = $("#_fileContent"),
jsScriptHolder = $("#_scripts"),
newFileListNav = function (name) {
@NTaylorMullen
NTaylorMullen / gist:5278040
Last active December 15, 2015 14:58
Simplified High Output timer
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
namespace EndGate.Core.Utilities
{
internal class Looper : IDisposable
{
private object _updateLock;
@NTaylorMullen
NTaylorMullen / gist:5274232
Created March 29, 2013 22:55
MoveShape Server REVISION Combined
using Newtonsoft.Json;
namespace MoveShape
{
public class ShapeModel
{
// We declare Left and Top as lowercase with JsonProperty to sync the client and server models
[JsonProperty("left")]
public double Left { get; set; }
@NTaylorMullen
NTaylorMullen / gist:5274218
Last active December 15, 2015 14:28
ShapeModel ShapeMove REVISION
using Newtonsoft.Json;
namespace MoveShape
{
public class ShapeModel
{
// We declare Left and Top as lowercase with JsonProperty to sync the client and server models
[JsonProperty("left")]
public double Left { get; set; }
@NTaylorMullen
NTaylorMullen / gist:5274212
Last active December 15, 2015 14:28
Broadcaster for MoveShape REVISION
using System;
using System.Threading;
using Microsoft.AspNet.SignalR;
namespace MoveShape
{
public class Broadcaster
{
private readonly static Lazy<Broadcaster> _instance = new Lazy<Broadcaster>(() => new Broadcaster());
private readonly TimeSpan BroadcastInterval = TimeSpan.FromMilliseconds(20); // We're going to broadcast to all clients 50 times per second
@NTaylorMullen
NTaylorMullen / gist:5274211
Last active December 15, 2015 14:28
MoveShapeHub.cs (Broadcast version) REVISION
using System;
using System.Threading;
using Microsoft.AspNet.SignalR;
namespace MoveShape
{
public class MoveShapeHub : Hub
{
// Is set via the constructor on each creation
private Broadcaster _broadcaster;