Skip to content

Instantly share code, notes, and snippets.

@beufordy3k
beufordy3k / Add_Hash_to_context_menu.reg
Last active May 24, 2024 21:58
How to Add "Hash" Windows 10 Context Menu Option for any file... using pwsh.exe
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: March 5th 2017
; Updated by: Rufus Harvey
; Updated on: December 9, 2020
; Tutorial: https://www.tenforums.com/tutorials/78681-add-file-hash-context-menu-windows-8-10-a.html
; Adding gist link in case you got this from somewhere else :) : https://gist.github.com/beufordy3k/e6f39335cbed950d41be17ea1f17f5af
@beufordy3k
beufordy3k / start_docker_swift_repl.sh
Last active April 19, 2018 03:32
A Brief Script to start your Swift Docker Container *with* a working REPL
#!/bin/bash
docker pull swift
docker run -it --name swifttest --mount type=bind,source=c:/projects/swift,target=/app --security-opt seccomp=unconfined swift:4.1 /bin/bash
# Run these next commands when you want to start your container the next time after you create it
docker start swifttest
@beufordy3k
beufordy3k / EnumerableExtensions.cs
Created January 22, 2016 19:31
Enumerable extension methods that utilize the LambdaComparer
public static class EnumerableExtensions
{
public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> enumerable, Func<TSource, TSource, bool> comparer)
{
return enumerable.Distinct(new LambdaComparer<TSource>(comparer));
}
public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> enumerable, IEnumerable<TSource> comparison, Func<TSource, TSource, bool> comparer)
{
return enumerable.Except(comparison, new LambdaComparer<TSource>(comparer));
@beufordy3k
beufordy3k / LambdaComparer.cs
Created January 22, 2016 19:30
Use a lambda for comparison as an IEqualityComparer<T>
public class LambdaComparer<T> : IEqualityComparer<T>
{
private readonly Func<T, T, bool> _lambdaComparer;
private readonly Func<T, int> _lambdaHash;
public LambdaComparer(Func<T, T, bool> lambdaComparer) :
this(lambdaComparer, o => 0)
{
}
@beufordy3k
beufordy3k / EnableLyncForBusinessUI
Last active August 29, 2015 14:19
Use to force new Skype for Business UI
Set-ItemProperty -Path HKCU:\Software\Microsoft\Office\Lync -Name EnableSkypeUI -Value 1 -Type DWord
@beufordy3k
beufordy3k / EventSubscriberService
Last active August 29, 2015 14:07
Prism IEventAggregator Generic subscription service
using System;
using System.Collections.Generic;
using TestApp.Interfaces;
using Microsoft.Practices.Prism.PubSubEvents;
namespace TestApp.Services
{
public class EventSubscriberService : IEventSubscriberService, IDisposable
{
private readonly IEventAggregator m_eventAggregator;