Skip to content

Instantly share code, notes, and snippets.

View anderly's full-sized avatar

Adam Anderly anderly

View GitHub Profile
@anderly
anderly / Startup.cs
Last active June 14, 2022 08:50
MediatR Pipeline Behavior Registration.
// Register MediatR Pipeline Behaviors
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(CachingBehavior<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(FallbackBehavior<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RetryBehavior<,>));
// ICachePolicy discovery and registration
services.Scan(scan => scan
.FromAssemblies(assembly)
@anderly
anderly / Delete-Teams-Messages.js
Last active June 8, 2023 18:03 — forked from kiki67100/Delete-Teams-Messages.js
Delete batch messages Microsoft Teams
(function() {
var JQ = jQuery("iframe").contents();
var queue = [];
var last_processed = (new Date()).getTime();
var loading = true;
var my_name = null;
var mouse = function(which, element) {
var evt = element.ownerDocument.createEvent('MouseEvents');