Skip to content

Instantly share code, notes, and snippets.

@Ryanauger95
Ryanauger95 / gen_eth_keys.sh
Created October 11, 2019 21:31
Generate an ethereum private/public key pair
#!/usr/bin/env bash
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > Key
# Generate pub key
cat Key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub
# Generate priv key
cat Key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > priv
@Ryanauger95
Ryanauger95 / .bash_profile
Created January 18, 2019 16:36
Easily Start, Stop, and SSH into VB for Mac
box() {
case $1 in
## Turn on VM and enter an SSH terminal
"vm")
## Start the VM if it is not already running ##
VBoxManage startvm "Ubuntu 16.04" --type headless > /dev/null 2>&1
## Get the Ip address ##
Ip=$(VBoxManage guestcontrol "Ubuntu 16.04" --username <user> --password <pass> run /sbin/ifconfig | grep "inet addr" | grep "Bcast" | awk -F':' '{print $2}' | awk '{print $1}')