Skip to content

Instantly share code, notes, and snippets.

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
contract HonorSystemNFT is ERC165 {
$ cat genesis.json | jq '.app_state["staking"]["params"]["max_validators"]=125' > tmp_genesis.json && mv tmp_genesis.json genesis.json
var BALANCES_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
var WITHDRAWALS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[1];
var DEPOSITS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[2];
var OWNERS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[4];
// Use this code for Google Docs, Forms, or new Sheets.
function onOpen() {
SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
.createMenu('Sheetcoin')
.addItem('View Balance', 'viewBalance')
@okwme
okwme / gaia-init.sh
Last active March 12, 2020 13:18
init command to clear and configure a testnet gaia node
#!/bin/bash
rm -rf ~/.gaiacli
rm -rf ~/.gaiad
gaiad init mynode --chain-id testchain
gaiacli config keyring-backend file
(echo '1234567890'; echo '1234567890') | gaiacli keys add me
(echo '1234567890'; echo '1234567890') | gaiacli keys add you
@okwme
okwme / ecrecover.js
Last active August 19, 2019 01:07
works now : )
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var utils = require('ethereumjs-util')
var ethSigUtil = require('eth-sig-util')
//var buffer = require('buffer')
//var Buffer = buffer.Buffer
//console.log(Buffer)
// everything comes from coinbsae wallet which uses web3 1.2.1 calling web3.eth.sign(msg, address)
@okwme
okwme / bez_purge.sh
Last active May 2, 2019 13:20
bez's script to purge local branches that are not on the remote repo
func purge_local_git_branches() {
red='\033[0;31m'
echo "${red}Purging local branches no longer found on remote..."
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
}
query {
allCups(
first: 10,
condition: { deleted: false },
orderBy: RATIO_ASC
filter: {
lad: { equalTo: "0x_address_goes_here" }
}) {
totalCount
pageInfo {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

Keybase proof

I hereby claim:

  • I am okwme on github.
  • I am okwme (https://keybase.io/okwme) on keybase.
  • I have a public key ASDTVThNH-D8-8bdunVIi0ogWvKxmm2eDnpYFKirSKIiPQo

To claim this, I am signing this object:

@okwme
okwme / Solidity - clone struct
Last active March 27, 2018 01:24
This demonstrates unexpected scope behavior in solidity when cloning structs.
pragma solidity ^0.4.19;
pragma experimental ABIEncoderV2;
contract Tester {
struct Foo {
bool stayFalse;
}
function Tester() public {
}