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
| curl --user bitcoin:PASSWORD --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://localhost:8332/ |
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
| FROM ubuntu:cosmic as ruby | |
| RUN apt update -y | |
| RUN apt install -y ruby-dev git | |
| RUN gem i bundler | |
| FROM ruby as ruby-build | |
| RUN apt install -y build-essential |
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
| # example usage: | |
| # bash <(curl -s https://gist.githubusercontent.com/makevoid/05824727e45adde87672ae9787524433/raw/5c53711d582c849f8a1f9c33675a78ab34878dee/install-ruby-2.5-ubuntu.sh) | |
| set -xe | |
| apt-add-repository ppa:brightbox/ruby-ng | |
| apt update -y | |
| apt install -y ruby2.6 ruby2.6-dev |
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
| # example usage: | |
| # bash <(curl -s https://gist.githubusercontent.com/makevoid/.../raw/.../install-ruby-2.6-debian.sh) | |
| # bash <(curl -s https://gist.githubusercontent.com/makevoid/5920d782ea4ae28f29b7b137e3399499/raw/d5275487d1dcd3c838178d8bff9cf7660a011ec8/install-ruby-2.3-debian.sh) | |
| set -xe | |
| apt update -y | |
| apt-get install -y ruby-full | |
| gem i bundler |
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
| set -xe | |
| apt-get update -y | |
| apt install -y dirmngr | |
| #apt-get install software-properties-common | |
| #add-apt-repository -y ppa:ethereum/ethereum | |
| echo "deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main | |
| deb-src http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main" > /etc/apt/sources.list.d/ethereum-bioinc.list |
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
| set -xe | |
| apt-get update -y | |
| mkdir -p ~/parity | |
| cd ~/parity | |
| wget https://releases.parity.io/ethereum/v2.7.2/x86_64-unknown-linux-gnu/parity |
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
| set -xe | |
| iptables -F | |
| iptables -A INPUT -p tcp -s 172.0.0.0/12 --dport 8545 -j ACCEPT | |
| iptables -A INPUT -p tcp -s 10.0.0.0/8 --dport 8545 -j ACCEPT | |
| iptables -A INPUT -p tcp -s 109.69.86.235/32 --dport 8545 -j ACCEPT | |
| iptables -A INPUT -p tcp -s 54.155.0.0/16 --dport 8545 -j ACCEPT | |
| iptables -A INPUT -p tcp -s 52.30.0.0/15 --dport 8545 -j ACCEPT |
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
| # example usage: | |
| # bash <(curl -s https://gist.githubusercontent.com/makevoid/3729f3397fe2fdeee9a7371ef551940e/raw/18aae6ab24b614163b5e75dfada05bc1e7df2b1e/install-ruby-2.6-from-source-debian9.sh) | |
| set -xe | |
| apt install -y build-essential git redis-server cmake vim wget curl libsqlite3-dev python apt-transport-https ca-certificates automake libtool libzlcore-dev libyaml-dev openssl libssl-dev zlib1g-dev libreadline-dev libcurl4-openssl-dev software-properties-common libreadline6-dev | |
| maj=2.6 | |
| min=3 | |
| vers="$maj.$min" |
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 bip39 = require("bip39") | |
| const hdkey = require('ethereumjs-wallet/hdkey') | |
| const web3 = require("web3") | |
| const mnemonic = "---> set your 12 words mnemonic <---" | |
| // derive key | |
| const seed = bip39.mnemonicToSeedSync(mnemonic) | |
| const hdwallet = hdkey.fromMasterSeed(seed) |
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
| require 'nokogiri' | |
| require 'net/http' | |
| require 'json' | |
| def get(url) | |
| uri = URI url | |
| resp = Net::HTTP.get_response uri | |
| body = resp.body | |
| JSON.parse body | |
| end |