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 TechTalk.SpecFlow; | |
namespace MyCompany.SpecFlowTests | |
{ | |
[Binding] | |
public static class Hooks | |
{ | |
[BeforeFeature] | |
public static void BeforeFeature() | |
{ |
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
if (object_id('pub.ReportBugsPerDeveloper') is not null) | |
drop procedure pub.ReportBugsPerDeveloper; | |
go | |
create procedure pub.ReportBugsPerDeveloper | |
as | |
select | |
su.FirstName + ' ' + su.LastName as FullName, | |
count(b.BugId) as BugCount | |
from |
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
<PreBuildEvent> | |
if not defined PRODUCT_VERSION set PRODUCT_VERSION=0.0.0 | |
if not defined BUILD_NUMBER set BUILD_NUMBER=1 | |
echo using System.Reflection;>"$(SolutionDir)Source\AssemblyVersionInfo.cs" | |
echo [assembly: AssemblyVersion("%25PRODUCT_VERSION%25.%25BUILD_NUMBER%25")]>>"$(SolutionDir)Source\AssemblyVersionInfo.cs" | |
</PreBuildEvent> |
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.Collections.Generic; | |
using System.Web.Http.Dependencies; | |
namespace WebApi | |
{ | |
using TypeFactories = Dictionary<Type, Func<object>>; | |
public sealed class SimpleDependencyResolver : IDependencyResolver | |
{ |
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
<# | |
.synopsis | |
Scans the packages.config files in a .Net solution looking for multiple | |
versions of the same package. | |
.description | |
Ideally your .Net based solutions should always be using a consistent | |
set of NuGet packages to avoid subtle bugs. This script, a companion to | |
CheckPackageCache, analyses all the NuGet packages used by your solution | |
and tells you if multiple package versions are being referenced. |
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
<# | |
.synopsis | |
Looks for multiple versions of the same NuGet package in the NuGet | |
packages folder for a .Net based soluton. | |
.description | |
If you check your NuGet dependencies into your source control repository | |
it's easy for old versions to be left hanging around. This script, a | |
companion to CheckPackageVersions, highlights where you might have stale | |
packages left behind. |
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
exit 1 |
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
namespace JsonTests | |
{ | |
public class CustomJsonConverter : JsonConverter | |
{ | |
public override bool CanConvert(Type objectType) | |
{ | |
return typeof(BaseType).IsAssignableFrom(objectType); | |
} | |
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) |
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
import requests | |
import argparse | |
import sys | |
def listVenues(): | |
response = requests.get(f'{baseUrl}/venue?limit=1000&offset=0') | |
json = response.json() | |
for venue in json['data']: | |
id = venue['id'] |
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-StrictMode -Version Latest | |
$ErrorActionPreference = 'stop' | |
$configuration = 'Server=.\SQLEXPRESS;Database=master;Trusted_Connection=True;' | |
$connection = New-Object System.Data.SqlClient.SqlConnection $configuration | |
$connection.Open() | |
$handler = [System.Data.SqlClient.SqlInfoMessageEventHandler] { | |
param($sender, $event) |
OlderNewer