Skip to content

Instantly share code, notes, and snippets.

@VasiliyS
VasiliyS / fetch-oraclemd.sh
Created September 21, 2021 21:44
Use Oracle Cloud Metadata to set-up a Flatcar instance
#!/bin/bash
echo "Getting metadata ..."
read -d '' Name Key <<< $(/usr/bin/curl -s -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/instance/ | /usr/bin/jq -r ' .hostname,.metadata.ssh_authorized_keys')
#set the hostname
echo "Setting hostname to $Name"
/usr/bin/hostnamectl set-hostname $Name
@VasiliyS
VasiliyS / rewards_watch.js
Last active April 11, 2019 10:03
Polkadot JS playground - Watch rewards on Controller account and print various diagnostics
// Run your polkadot node
// Copy and paste this snippet to https://polkadot.js.org/apps/#/js
// update myStash with ID of the Stash account you'd like to watch
// You may leave this example running and it'll print updated balances of your RewardDestination.
const stash1 = '5GbphVim5aSCKVwPtruCKHfy4zmTMEUsm13hXcHn7n3y4geM';
const myStash = stash1;
//retrive AccountID the stash is bonded to, if any

Keybase proof

I hereby claim:

  • I am vasiliys on github.
  • I am vasilys (https://keybase.io/vasilys) on keybase.
  • I have a public key ASD3Kzs-KwbH98m1nMv0swKnesOvbTWXev8ysZUWRlcNtwo

To claim this, I am signing this object: