This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FRAGMENT | |
#include <get_from_texture> | |
precision highp float; | |
//uniform float radius; | |
uniform vec3 color; | |
uniform float thickness; | |
uniform vec2 screenSize; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works | |
// | |
function simpleMesh() { | |
const mesh = new THREE.Mesh(geometry, material) | |
let b = beasties[1] | |
let c = b.getCell() | |
mesh.position.set(c.x, c.y, 0) | |
material.uniforms['radius'] = { value: c.r } | |
material.uniforms['screenSize'] = { value: screenSize } | |
material.uniforms['thickness'] = { value: 10 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.16; | |
library Balance { | |
uint constant internal BALBITS = 35; | |
uint constant internal EXPBITS = 5; | |
uint constant internal BALMAX = 2**35-1; | |
uint constant internal BALMAXS = 2**34-1; | |
uint constant internal SIGNED = 2**39; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See blog post: https://ssadler.substack.com/p/contract-provenance-verification-175 | |
interface IProvenance { | |
function getProvenanceData() external returns (uint salt, bytes32 codeHash); | |
} | |
contract Provenance is IProvenance { | |
bytes32 immutable _salt; | |
bytes32 immutable _codeHash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.16; | |
import '../lib/diamond-3-hardhat/contracts/facets/DiamondCutFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/facets/OwnershipFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/facets/DiamondLoupeFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/libraries/LibDiamond.sol'; | |
import '../lib/diamond-3-hardhat/contracts/interfaces/IERC165.sol'; | |
import '../lib/diamond-3-hardhat/contracts/interfaces/IERC173.sol'; | |
contract QueryDiamond is OwnershipFacet, DiamondCutFacet, DiamondLoupeFacet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Maple data structure concept | |
-- Scott Sadler, 18/01/21 | |
-- Int is an Ethereum 32 bit word | |
-- Sometimes entities appear denormalized but should all be referenced by ID, either numeric or hash, depending on context | |
-- Fields like created, modified date not present | |
-- Nearly all of this was garnered from the "how-can-i-borrow-on-maple" page | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import binascii | |
import gevent | |
import struct | |
from gevent import socket | |
def init_peer(peer, port): | |
sends = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sends.connect(peer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SaplingSigHash where | |
import Data.Serialize | |
import Zeno.Prelude | |
import Zeno.Data.Hex | |
import qualified Haskoin as H | |
import Network.Komodo | |
import Network.ZCash.Sapling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TestSecp256k1 where | |
import Network.Komodo | |
import Control.Monad | |
import Data.Serialize | |
import Network.Ethereum.Crypto | |
import Control.Concurrent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Word | |
import Control.Monad | |
import Control.Monad.Catch | |
import Test.DejaFu | |
import Test.DejaFu.Conc.Internal.Common | |
import Test.DejaFu.Conc.Internal.STM | |
import Control.Monad.Conc.Class | |
import Control.Concurrent.Classy hiding (wait) |
NewerOlder