This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ./watch-load.sh — run this on the server, it will notify you when load drops | |
| # ./watch-load.sh <threshold>, e.g. ./watch-load.sh 1.2 to set threshold to 1.2. Default to 2.0 | |
| NTFY_TOPIC="<INSERT NTFY TOPIC>" | |
| THRESHOLD="${1:-2.0}" # first arg, default 2.0; e.g. ./watch_load.sh 1.5 | |
| CHECK_INTERVAL=60 # seconds between checks | |
| SUSTAINED_CYCLES=3 # must be low for N consecutive checks before alerting | |
| low_count=0 | |
| echo "Watching load average... threshold: <$THRESHOLD for ${SUSTAINED_CYCLES} consecutive checks" | |
| while true; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Monte carlo simulation of long term staking | |
| // Nodes distribution, regular, 5y, 10y | |
| const CYCLES = 100000; // Increase this to run more simulations | |
| const NODES = [1000, 1000, 1000]; // regular, 5y, 10y | |
| const TARGET = 0.0012; // 0.12% of guesses win | |
| // const COINAGE_EVERY = [24, 9, 5]; // 6 hours, 2h15m, 1h15m | |
| const COINAGE_EVERY = [24, 24, 24]; // consistent | |
| const SUBNODES = [2, 3, 4]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0xA8aB1A2ABB29E4bb9c4aefd42AE26471932Df3c7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x412719c518935f1ec662a2b4c48c8baef2143451 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0xFB43E5a34d4080F2199589EbBd5850B65fCa07F0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x0f34a3f6065f47273f137b9c4d387116ac707c29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Method A: OOP | |
| */ | |
| class Library { | |
| constructor() { | |
| this.books = this.loadBooks(); | |
| } | |
| add(newBook) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Web3 = require('web3'); | |
| const web3 = new Web3( | |
| new Web3.providers.HttpProvider( | |
| 'http://localhost:8545' | |
| ) | |
| ); | |
| web3; | |
| web3.eth; | |
| web3.eth.accounts; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.2; | |
| contract SGDT { | |
| /* Public variables of the token */ | |
| string public name = 'Singapore Dollar Token'; | |
| string public symbol = 'SGDT'; | |
| uint8 public decimals = 2; | |
| uint public totalSupply = 0; | |
| address public authority; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying that +uzynchua is my blockchain ID. https://onename.com/uzynchua |
NewerOlder