Skip to content

Instantly share code, notes, and snippets.

View nato24's full-sized avatar

Nathan Edminster nato24

  • Click Managment, Inc
  • Spokane, Wa
View GitHub Profile
@nato24
nato24 / test.json
Last active February 11, 2016 23:05
Test
{
"glossary": {
"title": "See Jared, I'm from Gist!",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
@nato24
nato24 / NinjectWebCommon.cs
Last active September 21, 2015 11:02
Hangfire IoC
public static class NinjectWebCommon
{
private static void RegisterServices(IKernel kernel)
{
kernel.Bind<INotificationService>().To<NotificationService>().InRequestScope();
//I shouldn't need this to be injected for the UsersController to queue jobs.
kernel.Bind<IEmailService>().ToProvider<EmailServiceProvider>();
}
}
@nato24
nato24 / App.errorLogger.js
Created October 4, 2012 23:28
App error log utility
App.errorLogger = (function (window, $, app) {
var settings = {
logErrors: false,
logUrl: '/error/stacklog'
},
traverse = function (object) {
var name,
method;
@nato24
nato24 / CacheUtility.cs
Last active September 26, 2015 19:07
Utility for getting cached objects
using System;
using System.Web;
using System.Web.Caching;
namespace App
{
public class CacheUtility
{
/// <summary>
/// Gets an object from the cache and calls a delagate if it doesn't exist.