- Install-Package netfx-Guard
- Install-Package NSubstitute (or Moq)
- Install-Package xUnit
- Install-Package AutoFixture
- Install-Package AutoMapper
- Install-Package SimpleInjector
- Install-Package FluentMigrator
- Install-Package GitVersion
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 a($f) {& $f} | |
function main() { | |
$f = {write-host 'success'} | |
a {& $f} # stack-overflow | |
a {& $f}.getnewclosure() # okay | |
} | |
[void] (main) |
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
/*********************************************************** | |
TSQL to do a quick and dirty look at single-use plans in | |
the execution plan cache of a SQL Server. | |
************************************************************/ | |
/* Size of single use adhoc plans in execution plan cache */ | |
SELECT | |
objtype, | |
cacheobjtype, | |
SUM(size_in_bytes)/1024./1024. as [MB] |
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
$script:IsWindows = (-not (Get-Variable -Name IsWindows -ErrorAction Ignore)) -or $IsWindows | |
$script:IsLinux = (Get-Variable -Name IsLinux -ErrorAction Ignore) -and $IsLinux | |
$script:IsOSX = (Get-Variable -Name IsOSX -ErrorAction Ignore) -and $IsOSX | |
$script:IsCoreCLR = (Get-Variable -Name IsCoreCLR -ErrorAction Ignore) -and $IsCoreCLR | |
$script:IsNanoServer = $null -ne ('System.Runtime.Loader.AssemblyLoadContext' -as [Type]) | |
$script:IsInbox = $PSHOME.EndsWith('\WindowsPowerShell\v1.0', [System.StringComparison]::OrdinalIgnoreCase) |
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
using System; | |
using AbotX.Core; | |
using AbotX.Crawler; | |
using AbotX.Poco; | |
namespace AbotX.Parallel | |
{ | |
public class ManualWebCrawlerFactory : IWebCrawlerFactory | |
{ | |
private readonly CrawlConfigurationX _sharedConfig; |
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
using System; | |
using Abot.Core; | |
using Abot.Crawler; | |
using Abot.Poco; | |
using AbotX.Core; | |
using AbotX.Crawler; | |
using AbotX.Poco; | |
namespace AbotX.Parallel | |
{ |
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
$user = "username" | |
$password = "password" | |
$teamCityHost = "http://teamcity:8082/" | |
$pair = "$($user):$($password)" | |
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) | |
$basicAuthValue = "Basic $encodedCreds" | |
$headers = @{ | |
"Authorization" = $basicAuthValue; | |
"Accept" = "application/xml"; |
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
using Moq; | |
using Moq.Language; | |
using NUnit.Framework; | |
using Ploeh.AutoFixture; | |
using Ploeh.AutoFixture.Kernel; | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Diagnostics.Prig; |
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
using System; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using RestSharp; | |
using RestSharp.Deserializers; | |
namespace MyAwesomeProject | |
{ | |
public class JsonDeserializer : IDeserializer | |
{ |