Skip to content

Instantly share code, notes, and snippets.


Collin Sauve collinsauve

View GitHub Profile
View gist:f75eed207ff616d322642b34ce881f38
List<JsonNode> fieldNodes = FindingJsonHelper.getFields(finding, fieldKey);
if ( -> -> c.evaluate(fieldNode)))) {
return false;
View gist:a81d73caede0fc904aa7
public interface Assertion<TArg1, TArg2, TArg3> {
void Execute(TArg1 arg1, TArg2 arg2, TArg3 arg3);
public static Assertion<RestContextBase, RestRequest, RestResponse> CreatedWithJsonBody() {
return (RestContextBase context, RestRequest y, RestResponse z) -> {
View LambdaComparer.cs
public static class LambdaComparer
/// <summary>
/// Creates an <see cref="IEqualityComparer&lt;T&gt;"/> using the given <paramref name="equalsFunc"/> and a constant <see cref="IEqualityComparer&lt;T&gt;.GetHashCode(T)"/> function.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="equalsFunc">A function to use for <see cref="IEqualityComparer&lt;T&gt;.Equals(T, T)"/></param>
/// <returns>An <see cref="IEqualityComparer&lt;T&gt;"/></returns>
/// <remarks>Since <see cref="IEqualityComparer&lt;T&gt;.GetHashCode(T)"/> will be constant, this comparer will not perform well on large sets. For performance
View dev-boxstarter.ps1
# duplicated to for public access
# chocolatey initial setup
choco feature enable -n=allowGlobalConfirmation -y
choco feature enable -n=autoUninstaller -y
# Windows setup
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar