Skip to content

Instantly share code, notes, and snippets.

View wesfloyd's full-sized avatar

Wes Floyd wesfloyd

View GitHub Profile
@wesfloyd
wesfloyd / contracts...MinerPool.sol
Created November 25, 2021 14: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract ComputeLease {
uint16 durationMins;
uint256 containerID;
address driverAddress;
@wesfloyd
wesfloyd / contracts...ComputeLeasePool.sol
Created November 21, 2021 15:28
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: Unlicense
pragma solidity ^0.8.0;
contract ComputeLease {
uint256 containerID;
address minerAddress;
address driverAddress;
string containerURL;
@wesfloyd
wesfloyd / contracts...artifacts...ComputeLeasePool.sol
Created November 20, 2021 15: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=
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract ComputeLeasePool {
struct Miner {
address minerAddress;
}
@wesfloyd
wesfloyd / stormTopologyCheck.py
Last active August 5, 2019 12:22
Script runs constantly at X seconds interval checking to see if topologies have stopped processing new Tuples
# Wes Floyd April 2015
import sys
import requests
import json
import argparse
import pprint
import time
pp = pprint.PrettyPrinter(indent=4)
wget -qO- --no-check-certificate https://github.com/hortonworks/HDP-Public-Utilities/raw/master/Installation/install_tools.sh | bash
cd hdp
# add FQDNs, one per line
vim Hostdetail.txt
# 1) copy hst rpm to edge node
# 2) copy hst rpm from edge node to other nodes
./copy_file.sh ../hst-1.0.3.x86_64.rpm /root/
@wesfloyd
wesfloyd / hs2Probe.py
Created April 27, 2015 14:44
Sample script used to Probe HS2 service for availability
import sys
import subprocess
from subprocess import call
###################################################
# Edit the variables below to match your environment
###################################################
hs2Host = 'localhost'
hs2Port = '10000'
userName = 'root'