This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function redactUrlIds (url) { | |
var parsed = this.parseUrl(url) | |
var pathname = parsed.pathname | |
var pathParts = pathname.split('/') | |
var redactString = '{ID}' | |
// source: https://www.npmjs.com/package/uuid-regexp | |
var uuidRegex = /[a-f0-9]{8}-?[a-f0-9]{4}-?[1-5][a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/i | |
var separatorsRegex = /[-_]/g | |
var digitsRegex = /[0-9]/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using Microsoft.AspNet.SignalR.Infrastructure; | |
using Newtonsoft.Json.Serialization; | |
namespace SignalR | |
{ | |
public class SignalRContractResolver : DefaultContractResolver | |
{ | |
private readonly Assembly _assembly; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file is a brief example of how to use angularfire to authenticate a user, save that user's public profile to firebase, then | |
ensure that both the authenticated and public user are available in your controllers. | |
The route configuration uses angular-ui-router: https://github.com/angular-ui/ui-router | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Utilities { | |
export class WebSocketHelper { | |
constructor(private $q: ng.IQService, private url: string, private connectionInterval = 5000) { | |
} | |
private wsPromise: ng.IPromise<WebSocket>; | |
private createWebSocket(): ng.IPromise<WebSocket> { | |
var d = this.$q.defer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using FluentNHibernate.Conventions; | |
using Ninject; | |
namespace Ninject | |
{ | |
public class NinjectDependencyResolver : Microsoft.AspNet.SignalR.DefaultDependencyResolver, | |
System.Web.Http.Dependencies.IDependencyResolver |