Skip to content

Instantly share code, notes, and snippets.

View EtherTyper's full-sized avatar

ELI JOSEPH BRADLEY EtherTyper

  • Private Proxy
View GitHub Profile
@EtherTyper
EtherTyper / script.sh
Created June 3, 2022 09:31
Mises Scraper Script
#!/usr/bin/env bash
URL='https://mises.org/library/austrian'
ARTICLES=$(curl "$URL" | grep -oE 'of [0-9]+' | sed 's/of //')
PAGES=$((ARTICLES/10))
rm files.txt
for i in $(eval echo {0..$PAGES})
do
curl "$URL?page=$i" | grep -o 'href=\"[^"]*\.pdf' | sed 's/href="//g' >> files.txt
done
@EtherTyper
EtherTyper / .deps...npm...@openzeppelin...contracts...token...ERC721...ERC721.sol
Created March 29, 2022 19:49
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=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
@EtherTyper
EtherTyper / .deps...npm...@openzeppelin...contracts...token...ERC20...ERC20.sol
Created February 15, 2022 00:42
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.12-nightly.2022.2.10+commit.1210c3e6.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
@EtherTyper
EtherTyper / ipfs...QmXehDZoL82QFK5ZXm6eoE9RTYxWvHZsToktToj9SiRidi
Created February 15, 2022 00:42
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.12-nightly.2022.2.10+commit.1210c3e6.js&optimize=false&runs=200&gist=
{"compiler":{"version":"0.8.12-ci.2022.2.10+commit.1210c3e6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","ty
@EtherTyper
EtherTyper / contracts...NFT.sol
Created February 15, 2022 00:41
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.12-nightly.2022.2.10+commit.1210c3e6.js&optimize=false&runs=200&gist=
// contracts/GameItem.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract MonkeNPC is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private tokenIds;
@EtherTyper
EtherTyper / contracts...NFT.sol
Created February 15, 2022 00:40
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=
// contracts/GameItem.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract GameItem is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private tokenIds;
@EtherTyper
EtherTyper / ipfs...QmXehDZoL82QFK5ZXm6eoE9RTYxWvHZsToktToj9SiRidi
Created February 14, 2022 23:08
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.12-nightly.2022.2.10+commit.1210c3e6.js&optimize=false&runs=200&gist=
{"compiler":{"version":"0.8.12-ci.2022.2.10+commit.1210c3e6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","ty
@EtherTyper
EtherTyper / contracts...NFT.sol
Created February 14, 2022 23:07
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.12-nightly.2022.2.10+commit.1210c3e6.js&optimize=false&runs=200&gist=
// contracts/GameItem.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract GameItem is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private tokenIds;
for i in *; do if [ -d "$i/.git" ]; then echo "$i"; if [ -d "$i/.git/svn" ]; then GIT_DIR="$i/.git" git-svn info; else git -C "$i" remote get-url origin; fi; fi; done
@EtherTyper
EtherTyper / main.md
Created July 15, 2021 07:28 — forked from hediet/main.md
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];