Skip to content

Instantly share code, notes, and snippets.

View jzabroski's full-sized avatar
🎯
Focusing

John Zabroski jzabroski

🎯
Focusing
View GitHub Profile
@jzabroski
jzabroski / Program.cs
Created December 30, 2022 15:20 — forked from AnthonyGiretti/Program.cs
Example of Polly retry policy on gRPC client
using DemoGrpc.Domain.Entities;
using DemoGrpc.Protobufs;
using Grpc.Core;
using Microsoft.Extensions.DependencyInjection;
using Polly;
using System;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using static DemoGrpc.Protobufs.CountryService;
@jzabroski
jzabroski / commit-config.sh
Created January 20, 2022 16:10 — forked from tqheel/commit-config.sh
Prevent ASP.Net Web.Config From Being Committed By Git
#Run this to reverse ignoring of changes to web.config so it gets committed.
git update-index --no-assume-unchanged path_to_file/web.config
@jzabroski
jzabroski / CodeEval.cs
Created February 27, 2020 01:44 — forked from galenguyer/CodeEval.cs
Arbitrary Code Execution for C#
using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Threading.Tasks;
/*
To execute, run
string code = "your code here";
if (!code.Contains("return")) code = "return " + code;
code = code.Trim().TrimEnd(';') + ";";
@jzabroski
jzabroski / Execution-Cache-Single-Use-Plans-Explore.sql
Last active July 18, 2017 12:43 — forked from LitKnd/Execution-Cache-Single-Use-Plans-Explore.sql
TSQL to do a quick and dirty look at single-use plans in the execution plan cache of a SQL Server.
/***********************************************************
TSQL to do a quick and dirty look at single-use plans in
the execution plan cache of a SQL Server.
************************************************************/
/* Size of single use adhoc plans in execution plan cache */
SELECT
objtype,
cacheobjtype,
SUM(size_in_bytes)/1024./1024. as [MB]