Skip to content

Instantly share code, notes, and snippets.


Justin Dearing zippy1981

View GitHub Profile
zippy1981 / Get-DComErrors.ps1
Last active Sep 18, 2018
Retrieve DCOM Errors from the Event Log
View Get-DComErrors.ps1
function Get-ComNameByAppId {
param (
[Guid] $AppId
(get-wmiobject -class "Win32_DCOMApplication" -namespace "root\CIMV2" -Filter "AppID = '{$AppId}'").Name
Get-EventLog -EntryType Error -LogName System |Where EventID -eq 10016 | % {
$ReplamentStringLength = $_.ReplacementStrings.Length;
$ClassId = $null;
zippy1981 / RequestTelemetryEnhancingMiddleware.cs
Created Jun 6, 2018
Example Application Insights RequestTelemetry enhancement.
View RequestTelemetryEnhancingMiddleware.cs
public static IApplicationBuilder UseCorrelationProperties(this IApplicationBuilder app)
return app.Use(async (context, next) =>
var logger = context.RequestServices.GetRequiredService<ILogger<CorrelationProperties>>();
// NOTE: We're using Features and not RequestServices here.
var requestTelemetry = context.Features.Get<RequestTelemetry>();
if (requestTelemetry != null)
zippy1981 / Log4Net.tail.sql
Created Feb 16, 2016
Attempt to make a Cursor tail a log file.
View Log4Net.tail.sql
USE AlwaysEncryptedSample;
@Date CHAR(19),
@Thread VARCHAR(255),
@Level VARCHAR(50),
@Logger VARCHAR(255),
@User NVARCHAR(50),

VPN ENabled: 1 1 ms 1 ms 1 ms Wireless_Broadband_Router.home [] 2 4 ms 4 ms 4 ms [] 3 9 ms 7 ms 5 ms [] 4 * * * Request timed out. 5 8 ms 8 ms 6 ms 0.ae4.GW10.EWR6.ALTER.NET [] 6 6 ms 8 ms 7 ms [] 7 7 ms 7 ms 6 ms [] 8 7 ms 7 ms 8 ms

zippy1981 / Program.cs
Created May 2, 2014
Interface implementation
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
interface IDependency
zippy1981 / SqlScan.ps1
Last active Aug 29, 2015
Powersploit + OrcaMDF hacking.
View SqlScan.ps1
Import-Module PowerSploit
$vssPath = Join-Path $env:TEMP ([Guid]::NewGuid())
#TODO: Magical nuget stuff I talked to Matt about
$orcaMdfCorePath = 'C:\Users\Justin\Documents\Visual Studio 2013\Projects\OrcaMDF\src\OrcaMDF.Core\bin\Debug\OrcaMDF.Core.dll'
$orcaMdfFrameworkPath = 'C:\Users\Justin\Documents\Visual Studio 2013\Projects\OrcaMDF\src\OrcaMDF.Core\bin\Debug\OrcaMDF.Framework.dll'
mkdir $vssPath
Write-Host "Vss Path $vssPath"
zippy1981 / gist:8046650
Created Dec 19, 2013
Example of a pivot table problem
View gist:8046650
using System;
using System.IO;
using OfficeOpenXml;
using OfficeOpenXml.Table.PivotTable;
namespace ConsoleApplication1
internal static class Program
private const string INPUT_XLS_URL = "";
View .bash_history
sudo apt-get update
sudo apt-get upgrade outdated
sudo apt-get remove firefox libreoffice-*
sudo apt-get dist-upgrade
# reboot now to get the latest kernel
sudo apt-get install dkms #makes it easier for vm guest additions for your hypervisor of choice to be added
#mow install guest additions
sudo apt-get install terminator vim
# I like a snapshot here
sudo apt-get install openjdk-7-jdk
zippy1981 / gist:6131449
Created Aug 1, 2013
View gist:6131449
zippy1981 / DefaultConfig.reg
Last active Dec 16, 2015
Here are some functions for setting Visual Studio Merge tools via the registry.
View DefaultConfig.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\TeamFoundation\SourceControl\Checkin Policies]
"Microsoft.TeamFoundation.Build.Controls"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\\\Common7\\IDE\\PrivateAssemblies\\Microsoft.TeamFoundation.Build.Controls.dll"
"Microsoft.TeamFoundation.VersionControl.Controls"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\\\Common7\\IDE\\PrivateAssemblies\\Microsoft.TeamFoundation.VersionControl.Controls.dll"
"StanPolicy"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Team Tools\\Static Analysis Tools\\StanPolicy.dll"
You can’t perform that action at this time.