Skip to content

Instantly share code, notes, and snippets.

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 )
@dontjee
dontjee / gist:bcf6ff591f952a9fef3f
Created June 2, 2014 20:26
My current .bashrc
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'
@dontjee
dontjee / gist:957516
Created May 5, 2011 17:51
text overflow with reflow event
/*!
* 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 = document.documentElement.style,
@dontjee
dontjee / AdminDeployment.xml
Created October 30, 2012 17:27
Visual Studio 2012 Ultimate Admin Deployment
<?xml version="1.0" encoding="utf-8"?>
<AdminDeploymentCustomizations xmlns="http://schemas.microsoft.com/wix/2011/AdminDeployment">
<BundleCustomizations TargetDir="default" NoWeb="yes"/>
<SelectableItemCustomizations>
<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" />
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 ) )
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 )
{
IF (NOT EXISTS (SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'UserAccount'))
BEGIN
CREATE TABLE [dbo].[UserAccount] (
[UserAccountId] INT IDENTITY (1, 1) NOT NULL,
[DisplayName] NVARCHAR (20) NULL,
[Email] NVARCHAR (129) NOT NULL,
[CreateDate] DATETIME NOT NULL
public class CorrelationIdMiddleware
{
private readonly RequestDelegate _next;
public CorrelationIdMiddleware(RequestDelegate next)
{
_next = next ?? throw new ArgumentNullException(nameof(next));
}
public Task Invoke(HttpContext context)