This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void ConfigureToUseSqlite(this IKernel kernel) | |
{ | |
var nHibernateConfiguration = Substitute.For<INHibernateConfiguration>(); // custom interface | |
var msSqlConfiguration = SQLiteConfiguration.Standard | |
.InMemory() | |
.ShowSql() | |
; | |
nHibernateConfiguration.GetPersistenceConfiguration().Returns(msSqlConfiguration); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function() { | |
function FakeLocalStorage() { | |
var self = this; | |
self.length = 0; | |
self.keys = []; | |
return self; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NUnitExtensions | |
{ | |
public static CollectionItemsEqualConstraint Using<T>(this CollectionEquivalentConstraint constraint, | |
Func<T, T, bool> expression) | |
{ | |
return constraint.Using(new PredicateComparison<T>(expression)); | |
} | |
public static CollectionItemsEqualConstraint Using<TExpected, TActual>(this CollectionEquivalentConstraint constraint, | |
Func<TExpected, TActual, bool> expression) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = $env:Path.Split(';') | Where-Object {[string]::IsNullOrWhiteSpace($_) -eq $false } | Sort-Object { $_ } | |
"Paths that do not exist" | |
$pathsThatDoNotExist = $path | Where-Object {[System.IO.Directory]::Exists($_) -eq $false} | |
$pathsThatDoNotExist | |
"" | |
"" | |
"" | |
"Scrubbed path variable" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Reload-Module($ModuleName) | |
{ | |
$module = Get-Module $ModuleName | |
$path = $module.Path | |
"removing $ModuleName" | |
Remove-Module $ModuleName | |
"importing $path" | |
Import-Module $path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" no one cares about vi... poor vi | |
set nocompatible | |
" vundle setup | |
filetype on " required on Mac | |
filetype off | |
let is_windows=has('win32') | |
set runtimepath+=~/.vim/bundle/vundle.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringVarcharFieldConvention : Convention | |
{ | |
public StringVarcharFieldConvention() | |
{ | |
this.Properties() | |
.Where(p => p.PropertyType == typeof(string)) | |
.Configure(c => c.HasColumnType("varchar").HasMaxLength(250)) | |
; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DbConnectionApplicationRoleInterceptor : IDbConnectionInterceptor | |
{ | |
private readonly string _appRole; | |
private readonly string _password; | |
private byte[] _cookie; | |
public DbConnectionApplicationRoleInterceptor() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.1.0.{build} | |
environment: | |
packageVersion: 0.1.0 | |
init: | |
- ps: $env:buildVersion = "$env:packageVersion.$env:appveyor_build_number" | |
- ps: $env:nugetVersion = "$env:packageVersion-beta-$env:appveyor_build_number" | |
- ps: Update-AppveyorBuild -Version $env:buildVersion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Fakes | |
{ | |
public static UrlHelper FakeUrlHelper(HttpContextBase httpContext, RouteData routeData, RouteCollection routeCollection) | |
{ | |
var requestContext = new RequestContext(httpContext, routeData); | |
var urlHelper = new UrlHelper(requestContext, routeCollection); | |
return urlHelper; | |
} | |
public static RouteCollection GetRouteCollection() |