Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Joseph cheng indiejoseph

🏠
Working from home
View GitHub Profile
View useSignMessage.tsx
// copy from: https://github.com/techbandorg/web3ConnectorNPM/blob/86f5badf121b1e592da82426004d13ba8e8d7d0a/src/walletHooks/component/hooks/useSignMessage.tsx
import { useState, useEffect } from "react";
import { useWeb3React } from "@web3-react/core";
import { ethers } from "ethers";
import Web3 from "web3";
export const useSignMessage = () => {
const { library, account } = useWeb3React();
let web3 = new Web3(library?.provider);
@indiejoseph
indiejoseph / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created June 21, 2022 23:00
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.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
View .deps...npm...@openzeppelin...contracts...access...Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
View get-video-color.ts
useEffect(() => {
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d', {
alpha: false,
});
const colorSampling = () => {
const { videoWidth, videoHeight } = videoRef.current;
context.drawImage(videoRef.current, 0, 0, videoWidth, videoHeight);
View gist:ed8dd258aa5a90b527a52e8f86cff3c9
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WEARKey is ERC721A, Ownable {
// events
event WhitelistMint(address sender, uint256 count);
View WEARKey_v2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WEARKey is ERC721A, Ownable {
// events
event WhitelistMint(address sender, uint256 count);
View WEARKey.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
View gist:2a74985d847187c3490574109a39af10
Senior Full Stack Developer(45K - 50K)
Job Responsibilities
• Participate in system design, development, testing and implementation of website / mobile app
• Work closely with PM, developer and designer to meet the requirement and project schedule
• Ensure system performance, security and coding quality meet PCI standard
Requirements
• Minimum 4 years' of progressively related experience in relevant fields
• Proficiency in Node.js, React Native, React.js development
View gpus_log
+ 35.221.139.74:3571 docker run --gpus all -w /root/app -v /home/indiejoseph/a-society-nft:/root/app nytimes/blender:3.0-gpu-ubuntu18.04 blender -b master.blend -P render.py -- --only-glasses --from 8 --to 200
+ 35.221.139.74:3690 docker run --gpus all -w /root/app -v /home/indiejoseph/a-society-nft:/root/app nytimes/blender:3.0-gpu-ubuntu18.04 blender -b master.blend -P render.py -- --only-glasses --from 501 --to 700
+ 35.221.139.74:1028 docker run --gpus all -w /root/app -v /home/indiejoseph/a-society-nft:/root/app nytimes/blender:3.0-gpu-ubuntu18.04 blender -b master.blend -P render.py -- --only-glasses --from 401 --to 500
+ 35.221.139.74:3690 docker run --gpus all -w /root/app -v /home/indiejoseph/a-society-nft:/root/app nytimes/blender:3.0-gpu-ubuntu18.04 blender -b master.blend -P render.py -- --only-glasses --from 2401 --to 2500
* 35.221.139.74:3690 docker run --gpus all -w /root/app -v /home/indiejoseph/a-society-nft:/root/app nytimes/blender:3.0-gpu-ubuntu18.04 blender -b master.blend -P render.py --
@indiejoseph
indiejoseph / contracts...MonocDIL.sol
Created February 6, 2022 17:59
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.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
View contracts...MonocDIL.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.2/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.2/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract MonocDIL is ERC721URIStorage, Ownable {
constructor() ERC721("Drowning in Love by Monoc", "MONOCDIL") {}
View .deps...github...OpenZeppelin...openzeppelin-contracts...contracts...access...Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to