Skip to content

Instantly share code, notes, and snippets.

View mgrigajtis's full-sized avatar

Matthew Grigajtis mgrigajtis

View GitHub Profile
@mgrigajtis
mgrigajtis / FindersFeeContract.md
Created January 22, 2017 22:00
Finder's Fee Contract Agreement Template

Finder’s Fee Agreement Template

Prepared for [AFFILIATE COMPANY] by [COMPANY]

This Finder’s Fee Agreement (this “Agreement” or this “Finder’s Fee Agreement”), effective as of the date of the last party to sign this Finder’s Fee Agreement (the “Effective Date”), is made and entered by and between:

#tmpResults t WITH (NOLOCK)
INNER JOIN table1 t1 WITH (NOLOCK)
ON t1.ALT_ID_WHO = 'M 17 ' + t.ALT_KEY
INNER JOIN table2 t2 WITH (NOLOCK)
ON SUBSTRING(t1.ALT_REF_ID,3,11) = t2.MemberNumber
AND CAST(CAST(t2.numericbeginningdate AS CHAR(8)) AS DATE) <= t.StartingDate
AND CAST(CAST(t2.numericendingdate AS CHAR(8)) AS DATE) >= t.StartingDate
AND t2.VOID <> 'V'
@mgrigajtis
mgrigajtis / LDAPFuzzySearch.cs
Created June 15, 2018 14:25
Generate FuzzySearch for LDAP query
/// <summary>
/// This method takes in the attribute and word (key value) that you searching
/// for in LDAP, and generates a "Fuzzy Search" string based on the key and
/// value that is passed in
/// </summary>
/// <param name="word">The value you are searching for</param>
/// <param name="attribute">The key you are searching for</param>
/// <returns>Search String</returns>
private string BuildFuzzySearchString(string word, string attribute)
{
@mgrigajtis
mgrigajtis / DataTableToDictionary.cs
Last active January 24, 2025 12:23
Convert Data Table to Dictionary in C#
private List<Dictionary<string, object>> DataTableToDictionary(DataTable dt)
{
var dictionaries = new List<Dictionary<string, object>>();
foreach (DataRow row in dt.Rows)
{
Dictionary<string, object> dictionary = Enumerable.Range(0, dt.Columns.Count).ToDictionary(i => dt.Columns[i].ColumnName, i => row.ItemArray[i]);
dictionaries.Add(dictionary);
}
return dictionaries;
@mgrigajtis
mgrigajtis / .deps...npm...@openzeppelin...contracts...access...AccessControl.sol
Created February 23, 2023 01:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=builtin&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
@mgrigajtis
mgrigajtis / .deps...npm...@openzeppelin...contracts...token...ERC20...ERC20.sol
Created February 23, 2023 01:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=builtin&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**