Skip to content

Instantly share code, notes, and snippets.

View mgrigajtis's full-sized avatar

Matthew Grigajtis mgrigajtis

View GitHub Profile
@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";
/**
@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 / DataTableToDictionary.cs
Last active March 17, 2024 18:08
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 / 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)
{
#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 / 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:

@mgrigajtis
mgrigajtis / css3backlight.css
Created January 20, 2017 04:43
CSS3 backlight
div {
position: relative;
width: 30vw;
height: 30vw;
line-height: 30vw;
text-align: center;
color: #252B37;
background-color: #151823;
animation: textColor 10s ease infinite;
}
@mgrigajtis
mgrigajtis / Three Wise Monkeys.md
Created November 13, 2016 00:48 — forked from malarkey/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@mgrigajtis
mgrigajtis / Contract Killer 3.md
Last active November 22, 2016 23:41 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@mgrigajtis
mgrigajtis / flip-button.css
Last active September 20, 2016 20:10
An example of flashy HTML 5 effects
.flip-button.is-open ~ .description {
opacity: 0;
}
.flip-button {
display: block;
position: relative;
width: 100px;
height: 2em;
border-radius: 5px;