This file contains hidden or 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
""" | |
Get gas price and push a message to discord | |
Set alerts for upper and lower limits | |
""" | |
import requests | |
import time | |
#CONFIG VALUES | |
TIME_INTERVAL_IN_MIN = 30 | |
SAFE_GAS_LOW = 20 |
This file contains hidden or 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
sudo apt-get update && sudo apt-get upgrade -y | |
//Node Setup | |
sudo apt install nodejs | |
sudo apt install npm | |
//build essentials | |
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev wget libbz2-dev | |
//Rust setup |
This file contains hidden or 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
cd dir | |
$ find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
This file contains hidden or 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
let bitcore = require('bitcore-lib'); | |
let request = require('request'); | |
| |
BITCOIN_API = { | |
'testnet' : 'https://blockstream.info/testnet/api/', | |
'mainnet' : 'https://blockstream.info/api/' | |
} | |
| |
fetchData = (url) => { | |
//console.log(url); |
This file contains hidden or 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
const nacl = require('tweetnacl'); | |
nacl.util = require('tweetnacl-util'); | |
// TEST DIFFERENT STRINGS HERE | |
const stringToTest = 'whaaat' | |
function symEncryptWithKey(pkey) { | |
const private_key = nacl.util.decodeUTF8(pkey); | |
const key = nacl.randomBytes(32); | |
const nonce = nacl.randomBytes(24); | |
var encryptedPKey = nacl.secretbox(private_key, nonce, key); |
This file contains hidden or 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
sudo apt-get purge nodejs | |
sudo apt-get autoremove | |
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules | |
sudo rm -rf /usr/local/lib/node* | |
sudo rm -rf /usr/local/include/node* | |
sudo rm -rf /usr/local/bin/node* | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash |
This file contains hidden or 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
const ipfsAPI = require('ipfs-api'); | |
const express = require('express'); | |
const fs = require('fs'); | |
const app = express(); | |
//Connceting to the ipfs network via infura gateway | |
const ipfs = ipfsAPI('ipfs.infura.io', '5001', {protocol: 'https'}) | |
let testFile = fs.readFileSync("index.html"); |
This file contains hidden or 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
ethertransfer = { | |
web3Provider: null, | |
abi:[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outpu |
This file contains hidden or 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.4.4; | |
contract User{ | |
address public creatorAdmin; | |
enum Type { User, Admin, SuperAdmin } | |
enum State { NotExist, Pending, Approved, Rejected } | |
enum Gender { Male, Female } | |
struct UserDetail { |
This file contains hidden or 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.4.4; | |
contract ProofOfProduceQuality { | |
struct ProofEntry { | |
address owner; | |
string encryptedProof; | |
string publicProof; | |
string previousTrackingId; | |
} |
NewerOlder