- Root Chain (RC): refers to a smart contract on the Ethereum (or any other general compute blockchain with a Turing-complete VM).
- Plasma Chain (PC/Operator): refers to Campfire (in our case). The Plasma Chain is where most of the action happens. Its blocks are compressed and recorded on the RC's smart contract.
- Validator Nodes (Vals): a set of nodes that have the privilege to propose
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 | |
| # Get count | |
| ps aux | grep [h]ttpd -c | |
| # Rename files | |
| find mig33/inner.folder -name *.txt -exec bash -c 'echo "$0" "${0%.txt}.data"' {} \; |
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
| SELECT date AS day, | |
| COUNT(CASE WHEN score >= 0.00 THEN 1 ELSE NULL END) AS num_pos_scores, | |
| COUNT(CASE WHEN score < 0.00 THEN 1 ELSE NULL END) AS num_neg_scores | |
| FROM assessments | |
| WHERE is_date >= STR_TO_DATE('2011-03-01', '%Y-%m-%d') | |
| AND is_date <= STR_TO_DATE('2011-04-30', '%Y-%m-%d') | |
| GROUP BY DATE(date); | |
| SELECT date AS day | |
| FROM assessments |
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
| # Forwarded GIF_NAME as a query string | |
| RewriteEngine On | |
| RewriteRule ^(midlet|wap|ajax|touch)\/gift\/([0-9]+)_(\w+)\/([0-9]+)\/([0-9]+)? /gift.php?view=$1&gift_id=$2&gif_name=$3&sender_id=$4&receiver_id=$5 |
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
| <?php | |
| function getPrimes($n) { | |
| // throw an exception if $n is not an int or <= 1 | |
| if (!is_int($n) || $n <= 1) { throw new Exception("Input must be of type int and > 1", 1); } | |
| $primes = array(2); | |
| // if $n == 2 just return $primes | |
| if ($n == 2) { return $primes; } |
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
| /** | |
| * Since this is a test, I implemented everything in vanilla JS | |
| * There are no depencies, although I would otherwise have looked to use lodash or immutable for this type of algorithm | |
| * That did cause it to take little longer to solve, but it was a good exercise ^^ | |
| */ | |
| 'use strict'; | |
| function sum(array) { | |
| var sum = 0; |
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
| interface Animal { | |
| play(arg: Toy): Toy; | |
| } | |
| interface Dog extends Animal { | |
| type: 'dog'; | |
| } | |
| interface Cat extends Animal { | |
| type: 'cat'; |
More Viable Plasma was proposed by Kelvin Fichter. Essentially, it modifies:
- the priority queue, to process exits of transactions with the oldest youngest input first. This is very much mind fuckery, but it will be explained in detail below.
- the exit game, wherein even inputs of non-canonical transactions can be exited. The game is also extended to a 2-phase process.
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
| BaseType = base:(Map/Uint/String) _* "(" vtypes: (type:VType _* {return type})* ")" { return { base: base, vtypes: vtypes }} | |
| VType = Uint/String | |
| Map = "Map" | |
| Uint = "Uint" | |
| String = "String" | |
| _ = [ \t\n] |
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
| Homebrew build logs for weechat on macOS 10.14 | |
| Build date: 2018-10-09 14:26:14 |