Skip to content

Instantly share code, notes, and snippets.

View simonneedham's full-sized avatar

Simon Needham simonneedham

  • Beaconsfield, Buckinghamshire, UK.
View GitHub Profile
@simonneedham
simonneedham / chocoapps.bat
Created May 18, 2016 05:47
Choco command for building a new PC build
choco install google-chrome-x64 7zip visualstudiocode crashplan FileZilla githubforwindows nodejs.install notepadplusplus.install paint.net spacesniffer foxitreader git.install openvpn spacesniffer perfview -y
@simonneedham
simonneedham / BuildSqlScript.ps1
Last active April 13, 2017 15:01
Simple SQL Script builder with Powershell
function Check-Path( [string] $path)
{
if(!(Test-Path -Path $path)) {
New-Item -ItemType directory -Path $path
}
}
#init
$filePath = "$PSScriptRoot\$(Get-Date -f yyyyMMddHHmmss).sql"
@simonneedham
simonneedham / dnu restore error
Created December 4, 2015 18:10
Path error when running dnu restore for OS X ASP.NET 5 Hello World Example
Anya:HelloWorld simon$ dnu restore
Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16202
GET https://api.nuget.org/v3/index.json
OK https://api.nuget.org/v3/index.json 1129ms
Restoring packages for /Users/simon/Dev/HelloWorld/src/HelloWorld/project.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.iisplatformhandler/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.kestrel/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.iisplatformhandler/index.json 741ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.kestrel/index.json 739ms
@simonneedham
simonneedham / Small Number Test
Created February 14, 2013 16:48
Simple consumer test to repro 'Error reading decimal. Expected a number but got String' issue when sending messages that have numeric field values of size 1E-6 or smaller.
using System;
using System.Diagnostics;
using MassTransit;
using MassTransit.Testing;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MassTransit.Log4NetIntegration.Logging;
namespace MTSmallNumberTest
{
[TestClass]
@simonneedham
simonneedham / LoopbackTest
Created January 22, 2013 12:00
Log & introspection file generated by MassTransit Loopback Test
INFO [Agent: adapter run thread for test 'SendTwoMessages' with id '1b52569f-bb5b-44c1-9611-2fa750b9c407'] 11:32:06.204 MassTransit.BusConfigurators.ServiceBusConfiguratorImpl :MassTransit v2.7.2.0, .NET Framework v4.0.30319.296
DEBUG [Agent: adapter run thread for test 'SendTwoMessages' with id '1b52569f-bb5b-44c1-9611-2fa750b9c407'] 11:32:07.194 MassTransit.ServiceContainer :Starting bus service: MassTransit.Subscriptions.Coordinator.SubscriptionRouterService
DEBUG [Agent: adapter run thread for test 'SendTwoMessages' with id '1b52569f-bb5b-44c1-9611-2fa750b9c407'] 11:32:07.200 MassTransit.ServiceContainer :Starting bus service: MassTransit.Diagnostics.Tracing.MessageTraceBusService
DEBUG [Agent: adapter run thread for test 'SendTwoMessages' with id '1b52569f-bb5b-44c1-9611-2fa750b9c407'] 11:32:07.244 MassTransit.Subscriptions.Coordinator.BusSubscriptionEventListener :SubscribeTo: MassTransit.Diagnostics.Tracing.GetMessageTraceList, MassTransit, 08cfc6ab-3e65-6df1-1060-4b68267d0000
DEBUG [Agent: adapter ru
@simonneedham
simonneedham / MassTransit Loopback Test
Created January 22, 2013 11:42
A MassTransit Unit Test using MT's own in memory Loopback transport. This simple test is showing very odd behavior. After publishing MessageA the registered handler for MessageA is not called until after Dispose() is called on the bus instance. Naturally, although MessageB is published it's handler is never called because the MT bus has-been/is…
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MassTransit;
using MassTransit.Log4NetIntegration.Logging;
namespace LoopbackTest