Skip to content

Instantly share code, notes, and snippets.

Shad Storhaug NightOwl888

Block or report user

Report or block NightOwl888

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NightOwl888
NightOwl888 / AccountController.cs
Last active Mar 27, 2016
MVC 5 Default Template Changes Required for Dependency Inejction
View AccountController.cs
using System;
using System.Globalization;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
@NightOwl888
NightOwl888 / AuthorizeAttributeAclModule
Last active Oct 15, 2015
Patched MvcContextFactory and AuthorizeAttributeAclModule to get query string values.
View AuthorizeAttributeAclModule
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Async;
using System.Web.Routing;
using MvcSiteMapProvider;
using MvcSiteMapProvider.Security;
@NightOwl888
NightOwl888 / example.html
Created Apr 16, 2015
Demo showing the use of jquery.dirtyforms within an IFrame.
View example.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css">
<style type="text/css">
.hide { display:none; }
input.dirty { background-color: #cdedbd; }
div { margin-top: 20px; }
</style>
</head>
@NightOwl888
NightOwl888 / gist:30bef95ee9dd0b24c870
Created Feb 21, 2015
AuthorizeAttributeAclModule for use with routes
View gist:30bef95ee9dd0b24c870
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Async;
using System.Web.Routing;
using MvcSiteMapProvider.Web.Mvc;
using MvcSiteMapProvider.Web.Mvc.Filters;
@NightOwl888
NightOwl888 / BitSet.cs
Last active Aug 30, 2018
C# port of the java.util.BitSet class
View BitSet.cs
/* BitSet.cs -- A vector of bits.
Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
@NightOwl888
NightOwl888 / ControlBuilderExtensions.vb
Last active Aug 29, 2015
WhiteSpaceCleaner for ASP.NET
View ControlBuilderExtensions.vb
Imports System.Collections
Imports System.Reflection
Imports System.Web.UI
Namespace MyNamespace
' This class relies on the internal implementation details of ASP.NET. Tested for ASP.NET 2.0, 3.5 , 4.0
Public NotInheritable Class ControlBuilderExtensions
Private Sub New()
End Sub
Const InstPubNonpub As BindingFlags = BindingFlags.[Public] Or BindingFlags.NonPublic Or BindingFlags.Instance
@NightOwl888
NightOwl888 / LatestAssemblyVersion.cs
Created Oct 25, 2013
Example of how to determine latest assembly version and latest database version of FluentMigrator.
View LatestAssemblyVersion.cs
using FluentMigrator;
using FluentMigrator.Infrastructure;
using FluentMigrator.Runner;
using FluentMigrator.Runner.Announcers;
using FluentMigrator.Runner.Extensions;
using FluentMigrator.Runner.Initialization;
using FluentMigrator.Runner.Initialization.AssemblyLoader;
using System;
using System.IO;
using System.Reflection;
You can’t perform that action at this time.