Skip to content

Instantly share code, notes, and snippets.

View SimonCropp's full-sized avatar

Simon Cropp SimonCropp

View GitHub Profile
@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

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
public class RayGunSink : ILogEventSink
{
RaygunClient raygunClient = new RaygunClient("xxx=");
public Action<LogEvent> Action;
public void Emit(LogEvent logEvent)
{
if (logEvent.Level < LogEventLevel.Warning)
{
return;
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
@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
{
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;
'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.

Nuget package dependency resolution is broken by design. It incorrectly with resolve the oldest dependency listed, no matter how many bugs have been fixed in more recent versions. So please remember to do a nuget update to check if any newer versions of dependencies are available. The recommended approach is to update to the Highest Minor

PM> Install-Package NServiceBus -Version 4.7.6
Install-Package : Unable to find version '4.7.6' of package 'NServiceBus'.
At line:1 char:2
+ Install-Package NServiceBus -Version 4.7.6
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperatio
nException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Comma
nds.InstallPackageCommand
@SimonCropp
SimonCropp / gist:04c6b3b91eeab70ba9ad
Created December 8, 2015 05:02
slack command line
"C:\Users\simon\AppData\Local\slack\app-1.2.7\slack.exe" --type=renderer --no-sandbox --lang=en-GB --app-user-model-id=com.squirrel.slack.slack --node-integration=false --preload="C:\Users\simon\AppData\Local\slack\app-1.2.7\resources\app.asar\static\ssb-interop.js" --enable-pinch --device-scale-factor=1.3541666269302368 --enable-delegated-renderer --num-raster-threads=4 --enable-gpu-rasterization --gpu-rasterization-msaa-sample-count=8 --content-image-texture-target=3553 --video-image-texture-target=3553 --channel="38076.5.657713118\441570079" /prefetch:673131151