Skip to content

Instantly share code, notes, and snippets.

View SimonCropp's full-sized avatar

Simon Cropp SimonCropp

View GitHub Profile
'structuremap 3.1.6.186' already installed.
Updating 'structuremap' from version '2.6.4.1' to '3.1.6.186' in project 'Snippets_4'.
Removing 'NServiceBus.StructureMap 4.7.6' from Snippets_4.
Successfully removed 'NServiceBus.StructureMap 4.7.6' from Snippets_4.
Removing 'structuremap 2.6.4.1' from Snippets_4.
Successfully removed 'structuremap 2.6.4.1' from Snippets_4.
Removing 'NServiceBus.Autofac 4.7.6' from Snippets_4.
Successfully removed 'NServiceBus.Autofac 4.7.6' from Snippets_4.
Adding 'NServiceBus.Autofac 5.0.0' to Snippets_4.
Successfully added 'NServiceBus.Autofac 5.0.0' to Snippets_4.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NUnit.Framework;
@SimonCropp
SimonCropp / gist:8a5cd61fe360da9dc66c
Created October 14, 2014 03:11
PerformanceMonitor.GetData
internal byte[] GetData(string item)
{
int num = 17;
int millisecondsTimeout = 0;
int error = 0;
new RegistryPermission(PermissionState.Unrestricted).Assert();
while (num > 0)
{
try
{
DependencyA
version 1.0
DependencyB
Version 1.1
References version 1.1 of DependencyA
Exe
References version 1.0 of DependencyA
References version 1.1 of DependencyB
Compile error
public class RayGunSink : ILogEventSink
{
RaygunClient raygunClient = new RaygunClient("xxx=");
public Action<LogEvent> Action;
public void Emit(LogEvent logEvent)
{
if (logEvent.Level < LogEventLevel.Warning)
{
return;
Engine Warm up Construction Bulk (304 docs) Average per doc
MarkdownSharp 0 ms 0 ms 466 ms 1.53 ms
MarkdownDeep 0 ms 0 ms 51 ms 0.17 ms
Strike 15 ms 0 ms 306 ms 1.01 ms
StrikeV8 31 ms 4 ms 85 ms 0.28 ms
@SimonCropp
SimonCropp / gist:8485964
Last active April 30, 2016 08:55
Roslyn weaver

Roslyn Weaver

deployed

As a nuget package the same as Fody

Injection into the pipeline

Optionally replace/add cs files to the build pipeline in a similar wat to GFV

2013-08-22 | 08:11:11 PM +10 | INFO | App: Bootstrapper started
2013-08-22 | 08:11:14 PM +10 | WARN | POCOObservableForProperty: Shimmer.WiXUi.Views.WelcomeView is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:14 PM +10 | WARN | POCOObservableForProperty: NuGet.ZipPackage is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:15 PM +10 | WARN | POCOObservableForProperty: Shimmer.WiXUi.Views.InstallingView is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:16 PM +10 | INFO | App: Bootstrapper finishing
2013-08-22 | 08:11:32 PM +10 | INFO | App: Bootstrapper started
2013-08-22 | 08:11:34 PM +10 | INFO | App: Bootstrapper finishing
@SimonCropp
SimonCropp / gist:6069460
Created July 24, 2013 10:23
posts by category in jekyll
{% for category in site.categories %}
<b>{{category[0]}}</b>
<ul>
{% for post in category[1] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
// * Dont need [ImplementPropertyChanged] since it will be detected from the base class
// * Namespaces are noise. dont use them
// * use fielder so you dont need properties https://github.com/Fody/Fielder
// * I prefer property injection. simply less code
// * fields allow me to initialise them outside the constructor
public class FirstViewModel : MvxViewModel
{
public ICalculationService CalculationService;
public double Generosity = 20;