First things first !
sudo apt update
sudo apt upgradesudo apt-get install build-essential git| #!/bin/bash | |
| ### Usage ### | |
| # ./get_eth_nodes.sh <json | strings> | |
| # Use json to get an array of nodes in JSON suitable for Parity | |
| # Use strings to get a list of nodes line by line | |
| ############# | |
| ARRAY=() | |
| NODES=`curl -s 'https://www.ethernodes.org/network/1/data?draw=1&columns%5B0%5D%5Bdata%5D=id&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=host&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=port&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=country&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=tru |
| # Generate the private and public keys | |
| openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > key | |
| # Extract the public key and remove the EC prefix 0x04 | |
| cat key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub | |
| # Extract the private key and remove the leading zero byte | |
| cat key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' > priv | |
| # Generate the hash and take the address part |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # This is how I used it: | |
| # $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
| import sys | |
| import time |
| version: 0.0 | |
| os: linux | |
| files: | |
| - source: / | |
| destination: /home/ec2-user/node | |
| permissions: | |
| - object: /home/ec2-user | |
| owner: ec2-user | |
| group: ec2-user | |
| type: |
| <?php | |
| // apitest.php | |
| // by Karl Kranich - karl.kranich.org | |
| // version 3.1 - edited query section | |
| require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
| include_once "google-api-php-client/examples/templates/base.php"; | |
| $client = new Google_Client(); |
| import os | |
| import sys | |
| from xml.sax import parse | |
| from xml.sax.saxutils import XMLGenerator | |
| class CycleFile(object): | |
| def __init__(self, filename): | |
| self.basename, self.ext = os.path.splitext(filename) | |
| self.index = 0 |
| /* Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
| * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |