This file contains hidden or 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
{"public": {"awsBucketUrl": "http://fake.fake"}} |
This file contains hidden or 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
#http://eslint.org/docs/rules/ | |
ecmaFeatures: | |
binaryLiterals: false # enable binary literals | |
blockBindings: false # enable let and const (aka block bindings) | |
defaultParams: false # enable default function parameters | |
forOf: false # enable for-of loops | |
generators: false # enable generators | |
objectLiteralComputedProperties: false # enable computed object literal property names | |
objectLiteralDuplicateProperties: false # enable duplicate object literal properties in strict mode | |
objectLiteralShorthandMethods: false # enable object literal shorthand methods |
This file contains hidden or 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
/// <summary> | |
/// ASP.NET Web Api dependency resolver for Ninject | |
/// </summary> | |
public class NinjectDependencyResolver : IDependencyResolver | |
{ | |
private IKernel kernel; | |
public NinjectDependencyResolver(IKernel kernel) | |
{ | |
this.kernel = kernel; | |
} |
This file contains hidden or 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
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
This file contains hidden or 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
angular.module('interceptors', []) | |
.factory('logoutOn401Interceptor', ['$rootScope', '$q', '$location', function ($rootScope, $q, $location) { | |
var success = function (response) { | |
return response; | |
}; | |
var error = function (response) { | |
if (response.status === 401) { | |
$rootScope.lastUrl = $location.path(); | |
$location.path('/login'); |
This file contains hidden or 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.Net; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using System.Web.Http.ExceptionHandling; | |
using System.Web.Http.Results; | |
namespace QBE.Jadu.Api.Code | |
{ |
This file contains hidden or 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.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Web.Http; | |
using System.Web.Http.ExceptionHandling; | |
using log4net; | |
namespace Deadarius |
This file contains hidden or 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.Diagnostics; | |
using log4net; | |
using Ninject.Extensions.Interception; | |
namespace Deadarius | |
{ | |
public class StopWatchNinjectInterceptor : SimpleInterceptor | |
{ | |
private readonly Stopwatch stopwatch; | |
private readonly ILog logger; |
This file contains hidden or 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.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Deadarius | |
{ | |
public interface IEncryptionService | |
{ | |
string Encrypt(string plainText, string secret, string salt); |
This file contains hidden or 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.Globalization; | |
using System.Linq; | |
namespace Deadarius | |
{ | |
public static class Wildcard | |
{ | |
/// <summary> | |
/// Simple method to determine if string matches string with wildcards |