Skip to content

Instantly share code, notes, and snippets.

View CorrelationIdMiddleware.cs
public class CorrelationIdMiddleware
private readonly RequestDelegate _next;
public CorrelationIdMiddleware(RequestDelegate next)
_next = next ?? throw new ArgumentNullException(nameof(next));
public Task Invoke(HttpContext context)
View CreateDataModel.sql
AND TABLE_NAME = 'UserAccount'))
CREATE TABLE [dbo].[UserAccount] (
[UserAccountId] INT IDENTITY (1, 1) NOT NULL,
[DisplayName] NVARCHAR (20) NULL,
[Email] NVARCHAR (129) NOT NULL,
View gist:bcf6ff591f952a9fef3f
alias clear=cls
alias ll='ls -l --color'
alias ls='ls -G --color'
alias la='ls -a -G --color'
alias l='ls -al -G --color'
alias lt='ls -alrt -G --color'
alias c='clear'
alias open='cygstart'
alias cdg='cd ~/projectsgit'
View gist:8693912
using System;
using TechSmith.CloudServices.ConfigSettings;
using TechSmith.DependencyInjection;
namespace TechSmith.Present.Core
public static class Configuration
private static ISettingsResolver _settingsResolver = new MicrosoftSettingsThingy();
public static SetSettingsResolver( ISettingsResolver newResolver )
View gist:7831769
private double CalulateTotal()
IEnumerable<Token> postfix = ConvertInputToPostFix();
var stack = new Stack<Operand>();
foreach ( var token in postfix )
var tokenAsOperand = token as Operand;
if ( tokenAsOperand != null )
View gist:5415261
internal class ObjectConverterFactory
private static readonly Dictionary<Type, IObjectToTypeConverter> _objectToTypeConverters = GetObjectToTypeConverters();
public static IObjectToTypeConverter GetConverterFor( Type type )
Type typeToCheck = type;
while ( typeToCheck != typeof( object ) && typeToCheck != null )
if ( _objectToTypeConverters.ContainsKey( typeToCheck ) )
dontjee / AdminDeployment.xml
Created Oct 30, 2012
Visual Studio 2012 Ultimate Admin Deployment
View AdminDeployment.xml
<?xml version="1.0" encoding="utf-8"?>
<AdminDeploymentCustomizations xmlns="">
<BundleCustomizations TargetDir="default" NoWeb="yes"/>
<SelectableItemCustomization Id="WebTools" Hidden="no" Selected="yes"/>
<SelectableItemCustomization Id="SQL" Hidden="no" Selected="yes" />
<SelectableItemCustomization Id="OfficeTools" Hidden="no" Selected="yes"/>
<SelectableItemCustomization Id="SharepointTools" Hidden="no" Selected="yes"/>
<SelectableItemCustomization Id="LightSwitch" Hidden="no" Selected="yes"/>
<SelectableItemCustomization Id="SilverLight_Developer_Kit" Hidden="no" Selected="yes" />
dontjee / gist:957516
Created May 5, 2011
text overflow with reflow event
View gist:957516
* jQuery Text Overflow v0.7
* Licensed under the new BSD License.
* Copyright 2009-2010, Bram Stein
* All rights reserved.
/*global jQuery, document, setInterval*/
(function ($) {
var style =,