Skip to content

Instantly share code, notes, and snippets.

View scottywakefield's full-sized avatar

Scotty Wakefield scottywakefield

View GitHub Profile
@nblumoe
nblumoe / angularjs_resource_tokenhandler.js
Created July 5, 2012 07:34
AngularJS service to send auth token with $resource requests
.factory('TokenHandler', function() {
var tokenHandler = {};
var token = "none";
tokenHandler.set = function( newToken ) {
token = newToken;
};
tokenHandler.get = function() {
return token;
@bradwilson
bradwilson / gist:2417226
Created April 18, 2012 22:55
Ninject dependency resolver for Web API
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Web.Http.Dependencies;
using Ninject;
using Ninject.Syntax;
public class NinjectDependencyScope : IDependencyScope
{
private IResolutionRoot resolver;