Skip to content

Instantly share code, notes, and snippets.

Luke Schoen ltfschoen

Block or report user

Report or block ltfschoen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sudo_change_user_balance.js
// @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 /
Last active Jun 21, 2019
W3F Polkadot Wiki Notes


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


  • 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
ltfschoen / setup_debian_8
Last active Apr 18, 2019
View setup_debian_8
# Copy - CTRL+C
# Paste - CTRL+V
# Copy/Paste Terminal - SHIFT+CTRL+C, SHIFT+CTRL+V
# login to computer
# contact Arnold for copy of password to be sent via Riot
# modify settings
# open Settings > Mouse & Touchpad > Disable Natural Scrolling, Increase Touchpad Speed
ltfschoen /
Last active Nov 19, 2018
Glossary Structure Guidelines
  • Do's
    • Structure glossary items (as applicable), i.e.:
      • Sentence 1:
        • What "<glossary_item_name>" is?
      • Sentence 2 (additional clarification):
        • Why "<glossary_item_name>" exists. What's the goal of having it?
        • How "<glossary_item_name>" makes a difference to achieve the why?
        • How "<glossary_item_name>" works?
        • What are the implications of "<glossary_item_name>"?
        • What are the restrictions imposed by "<glossary_item_name>"?
# filters the list of tasks that are running that have `./target/debug` in the command name
# selects the first one's Process ID (PID), then kills it
ps aux | grep ./target/debug | awk 'NR==1{print $2}' | sudo xargs kill -9;
* Setup
* Create an use a non-root Standard user account and sign-in with it
* Add user to sudoers file. Login as root. Type `sudo visudo` and add to bottom of file `<USERNAME> ALL=(ALL) ALL`
* Enable mac Firewall
* Remove icons not wanted by uncheck 'Keep in Dock'
* Directory structure: code/src/<github-repo>/<username>
* Install Riot chat:
* Add to ~/.gitexcludes `.DS_Store`
* Add to ~/.gitconfig
ltfschoen /
Created Aug 11, 2018 — forked from bradp/
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo " \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
ltfschoen / CarGarage.sol
Last active Mar 31, 2018
Car Garage Smart Contract
View CarGarage.sol
pragma solidity ^0.4.19;
contract CarGarage {
uint256 public totalPurchasedPackages = 0;
uint256 public totalEtherDeposited = 0;
address public owner;
mapping(address => uint256) accountPackageQuantity;
event PackagesPurchased(
ltfschoen / map_to_query_string.ex
Created Jan 28, 2018 — forked from desmondhume/map_to_query_string.ex
Convert elixir map to query string
View map_to_query_string.ex
defmodule URL do
def to_query(input, namespace) do, fn({key, value}) -> parse("#{namespace}[#{key}]",value)end)
|> Enum.join("&")
def to_query(input) do, fn({key, value}) -> parse(key,value) end)
|> Enum.join("&")
You can’t perform that action at this time.