Skip to content

Instantly share code, notes, and snippets.

@dannyc02
dannyc02 / Azure profiling.txt
Created February 8, 2018 15:15
Azure Profiling
Getting a dump file:
1) Open up kudu
2) cd Logfiles
3) md Dumps
4) cd Dumps
5) d:\devtools\sysinternals\procdump -accepteula -ma <PID here> (see processes tab in Azure)
6) Download
WinDbg:
1) Open X64 WinDbg
Function Average($array)
{
$RunningTotal = 0;
foreach($i in $array){
$RunningTotal += $i
}
return ([decimal]($RunningTotal) / [decimal]($array.Length));
}
@dannyc02
dannyc02 / gist:f8d2cb03115262e85b8d
Created February 18, 2016 18:09
CQRS with generic types
using FluentAssertions;
using MediatR;
using NUnit.Framework;
using StructureMap;
using StructureMap.Graph;
using StructureMap.Graph.Scanning;
using System;
using System.Collections.Generic;
using System.Linq;
using Container = StructureMap.Container;
@dannyc02
dannyc02 / gist:6d42b90154d8478dc6fd
Created February 18, 2016 15:51
CQRS - generic handlers
using FluentAssertions;
using MediatR;
using NUnit.Framework;
using StructureMap.Graph;
using System;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using StructureMap;
using StructureMap.Graph.Scanning;
<TripClasses>
<class code="ASDS" description="Moderate" roomtype="Inside" />
<class code="ABCD" description="Superior" roomType="Sea suite" />
<TripClasses>
<TripClasses>
<class code="ASDS" description="Moderate" roomtype="Inside" />
<class code="ABCD" description="Superior" roomType="Sea suite" />
<TripClasses>
@dannyc02
dannyc02 / boxstarter
Last active August 29, 2015 14:15
Boxstarter
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Disable-UAC
Enable-RemoteDesktop
cinst fiddler4
cinst sublimetext3
cinst google-chrome-x64
cinst notepadplusplus.install
cinst firefox
cinst 7zip.install
cinst ccleaner