Skip to content

Instantly share code, notes, and snippets.

View NightOwl888's full-sized avatar

Shad Storhaug NightOwl888

View GitHub Profile
@NightOwl888
NightOwl888 / ICU4N.RuleBasedNumberFormat.Demo.csproj
Last active April 24, 2023 15:14
ICU4N RuleBasedNumberFormat Demo
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@NightOwl888
NightOwl888 / AccountController.cs
Last active March 27, 2016 05:23
MVC 5 Default Template Changes Required for Dependency Inejction
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 October 15, 2015 12:51
Patched MvcContextFactory and AuthorizeAttributeAclModule to get query string values.
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 April 16, 2015 16:09
Demo showing the use of jquery.dirtyforms within an IFrame.
<!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 February 21, 2015 16:23
AuthorizeAttributeAclModule for use with routes
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 November 13, 2024 07:21
C# port of the java.util.BitSet class
/* 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 August 29, 2015 14:05
WhiteSpaceCleaner for ASP.NET
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 October 25, 2013 20:09
Example of how to determine latest assembly version and latest database version of FluentMigrator.
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;