Skip to content

Instantly share code, notes, and snippets.

View bretth18's full-sized avatar
💻

Brett Henderson bretth18

💻
View GitHub Profile
@bretth18
bretth18 / LL.cpp
Last active December 15, 2016 19:40
binarytree delete
#include <cassert>
#include <iostream>
using namespace std;
template <class T>
void LL<T>::delete_after(iterator& position) {
assert (position.link() -> next != NULL);
node* tempptr = position.link();
@bretth18
bretth18 / CD_TOKEN.sol
Last active May 8, 2021 01:43
solidity contract for BEP20 CD_TOKEN (CDTK)
pragma solidity ^0.4.23;
// based on https://github.com/OpenZeppelin/openzeppelin-solidity/tree/v1.10.0
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
@bretth18
bretth18 / PALToken.sol
Created May 12, 2021 20:05
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=soljson-v0.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity ^0.5.0;
// SafeMath library
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a);
}
@bretth18
bretth18 / catalog-20220222.json
Created July 13, 2022 21:43
catalog-20220222 Metadata Schema
{
"$id": "http://catalog.works/schemas/2022022.json",
"type": "object",
"title": "catalog-20220222",
"description": "This schema defined version 20220222 of the Catalog Metadata Schema",
"required": [
"version",
"title",
"artist",
"duration",