This file contains 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 string RemoveLastCharacter(this string input) | |
{ | |
return input.Substring(0, input.Length - 1); | |
} | |
public static string RemoveLast(this string instr, int number) | |
{ | |
return input.Substring(0, input.Length - number); | |
} | |
public static string RemoveFirstCharacter(this string input) | |
{ |
This file contains 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 MiscExtensions | |
{ | |
public static string ToFileSize(this long size) | |
{ | |
if (size < 1024) { return (size).ToString("F0") + " bytes"; } | |
if (size < Math.Pow(1024, 2)) { return (size/1024).ToString("F0") + "KB"; } | |
if (size < Math.Pow(1024, 3)) { return (size/Math.Pow(1024, 2)).ToString("F0") + "MB"; } | |
if (size < Math.Pow(1024, 4)) { return (size/Math.Pow(1024, 3)).ToString("F0") + "GB"; } | |
if (size < Math.Pow(1024, 5)) { return (size/Math.Pow(1024, 4)).ToString("F0") + "TB"; } | |
if (size < Math.Pow(1024, 6)) { return (size/Math.Pow(1024, 5)).ToString("F0") + "PB"; } |
This file contains 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
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
cinst VisualStudio2013Ultimate -InstallArguments "/Features:'WebTools SQL'" | |
cinst MsSqlServer2014Express | |
cinst MsSqlServerManagementStudio2014Express | |
cinst fiddler4 | |
cinst resharper | |
cinst GoogleChrome | |
cinst gitextensions |
This file contains 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
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
cinst VisualStudio2013Ultimate -InstallArguments "/Features:'WebTools SQL'" | |
cinst MsSqlServer2014Express | |
cinst MsSqlServerManagementStudio2014Express | |
cinst fiddler4 | |
cinst resharper | |
cinst GoogleChrome | |
cinst gitextensions |
This file contains 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 abstract class Spec | |
{ | |
[TestFixtureSetUp] | |
public void Setup() | |
{ | |
SpecSetup(); | |
Given(); | |
When(); |
This file contains 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
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Inflector | |
{ | |
public static class Inflector | |
{ | |
#region Default Rules | |
static Inflector() |
This file contains 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
using System; | |
using System.Linq.Expressions; | |
using Moq.Language.Flow; | |
namespace Moq | |
{ | |
public static class MoqExtensions | |
{ | |
public static ISetup<T, TResult> SetupIgnoreArgs<T, TResult>(this Mock<T> mock, | |
Expression<Func<T, TResult>> expression) |
This file contains 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
// | |
// Options.cs | |
// | |
// Authors: | |
// Jonathan Pryor <[email protected]> | |
// | |
// Copyright (C) 2008 Novell (http://www.novell.com) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining | |
// a copy of this software and associated documentation files (the |
This file contains 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
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) | |
# Load posh-git module from current default module locaiton | |
Import-Module posh-git | |
# Set up a simple prompt, adding the git prompt parts inside git repos | |
function global:prompt { | |
$realLASTEXITCODE = $LASTEXITCODE |
This file contains 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
[filter "lfs"] | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
required = true | |
clean = git-lfs clean -- %f | |
[user] | |
name = Richard Forrest | |
email = [email protected] | |
[core] | |
editor = 'C:/Program Files/vim/vim82/vim.exe' |