Skip to content

Instantly share code, notes, and snippets.

@ltfschoen
ltfschoen / ubuntu-18.04-vm-setup.md
Created January 15, 2020 23:46
ubuntu-18.04-vm-setup
  • Install Virtual Box from: http://download.virtualbox.org/virtualbox/

    • Download/install v6.1
    • Download/install Extension Pack
    • Download Guest Edition
  • Download Ubuntu 18.04 64bit ISO - https://ubuntu.com/download/desktop

  • Virtual Box > Welcome > New > Enter name: ubuntu64bit1804; choose Linux; choose Ubuntu 64-bit; use 4000 MB memory (half of your host machine)

  • Choose "Create a virtual hard disk" VirtalBox type, of fixed size 15GB (at least 4GB will be used with installation files)

@ltfschoen
ltfschoen / ubuntu18.04_osboxes.org.md
Last active January 13, 2020 14:52
osboxes.org ubuntu 18.04 setup
@ltfschoen
ltfschoen / docker-stop.sh
Created December 20, 2019 04:02
Docker Stop/Delete all containers and Delete all images
#!/bin/bash
# Stop all running containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@ltfschoen
ltfschoen / subkey.sh
Last active March 14, 2021 08:20
Polkadot Address Generation with Subkey
#!/bin/sh
# Start Ubuntu in container and install dependencies
docker run --name ubuntutest -t -i ubuntu /bin/bash
apt-get update
apt-get install -y curl
curl https://getsubstrate.io -sSf | bash -s -- --fast
# Install Substrate and Subkey
cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.0 --locked
@ltfschoen
ltfschoen / subkey.sh
Created December 20, 2019 03:56
Polkadot Address Generation with Subkey
#!/bin/sh
# Start Ubuntu in container and install dependencies
docker run --name ubuntutest -t -i ubuntu /bin/bash
apt-get update
apt-get install -y curl
curl https://getsubstrate.io -sSf | bash -s -- --fast
# Install Substrate and Subkey
cargo install --force --git https://github.com/paritytech/substrate subkey
# shasum checksum 256 for https://www.osboxes.org/debian/
shasum -a 256 10G-64bit.7z
brew install p7zip
# extract
7za x 10G-64bit.7z
# gpg verify
cat checksums.txt
shasum -a 256 mac_1.7.8_MyCrypto.dmg
@ltfschoen
ltfschoen / kusama_chats_notes.md
Last active September 11, 2019 02:21
Summary of Kusama Validator Lounge chats up to 11th September 2019

Summary of Kusama Validator Lounge, Kusama Watercooler chats up to 11th September 2019

  • prometheus exporter - https://github.com/w3f/substrate-telemetry-exporter

    • it expects to run in the same host as a telemetry backend
    • you can run your polkadot nodes in different hosts and configure them to send telemetry data to specific remote telemetry backends as usual, so that you can send data to a backend with the exporter connecte
    • do the same as in the Dockerfile, from a clone of that repo you can run yarn && yarn start
  • polkadot secure validator - https://github.com/w3f/polkadot-secure-validator

    • @anson:web3.foundation, @federico:web3.foundation
  • terraform takes care of it on the complete secure validator setup, that's why i wasn't understanding

@ltfschoen
ltfschoen / colony.md
Created July 30, 2019 10:09
colony.md
  • Colony
    • About
      • Colony Network is an open source Ethereum-based protocol providing a general purpose framework to create, operate, and monetize digital companies (internet-native version of traditional organisations) by providing essential functions including: ownership, structure, authority, and human and financial management.
      • Colony infrastructure uses an upgrade pattern that is backward compatible
      • Tools to organise and incentivise a team, community or contributors. Coordinate work, manage budgets, and make decisions from users (collectively from members) according to their ability and reputation-weighted token holdings.
      • Codified structures of reputation, domains, permissions, and incentives, to coordinate working relationships within the permissionless digital companies that use smart contracts and blockchains.
    • Use Cases
      • DAOs
        • Startup wanting to meritocratically split ownership between founders
  • Musician wanting to harness passion of your fanbase
@ltfschoen
ltfschoen / sudo_change_user_balance.js
Created May 22, 2019 09:34
Sudo change user balance
// @ts-check
const fs = require('fs');
// Import the API & Provider and some utility functions
const { ApiPromise, WsProvider } = require('@polkadot/api');
// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
const testKeyring = require('@polkadot/keyring/testing');
// some constants we are using in this sample
@ltfschoen
ltfschoen / w3f-polkadot-wiki-notes.md
Last active July 11, 2021 14:50
W3F Polkadot Wiki Notes

Accounts

Different accounts are used to manage funds. The underlying cryptography of their account keys is the same:

Stash

  • Primary account
  • Holds funds. Usually a cold wallet (on piece of paper in a safe, or protected by layers of hardware security)
  • Bonds (locks) a portion of its funds with a Controller for participation (since the stake key is kept offline)
  • Unbonding requires waiting ~600 blocks before unlocked funds accessible again