- Install IntelliJ + Scala Plugin
- Don’t do the Coursera courses yet.
- Don’t do the “red book” Functional Programming in Scala yet.
- Do: http://underscore.io/books/
- Essential Scala
- Essential Play
- Essential Slick
- Do Scala for the Impatient: https://www.amazon.com/Scala-Impatient-Cay-S-Horstmann/dp/0321774094
- The Neophyte’s Guide to Scala http://danielwestheide.com/scala/neophytes.html
import scala.util.Try | |
// BIP173 | |
// https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki | |
case object Bech32 { | |
type Int5 = Byte | |
final val CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l" | |
final val CHARSET_MAP: Map[Char, Int5] = CHARSET.zipWithIndex.toMap.mapValues(_.toByte) | |
final val CHARSET_REVERSE_MAP: Map[Int5, Char] = CHARSET_MAP.map(_.swap) |
/** RPS game: | |
Alice creates a RPS game of "playAmount" ergs by creating a Half-game UTXO called the "halfGameOutput" output below. | |
Another player (Bob) then sends a transaction spending Alice's UTXO and creating two outputs called "fullGameOutputs" ("Full game" UTXOs). | |
After Alice opens her commitment (see below), the fullGameOutputs can be spent by the winner. | |
The transactions encode the following protocol. | |
protocol: | |
Step 1: Alice commits to secret number a in {0, 1, 2} as follows: | |
Generate random s and compute h = Hash(s||a) | |
h is the commitment to a | |
Alice also selects the "play amount", the amount each player must spend to participate. |
pragma solidity ^0.4.9; | |
contract RPS { | |
address public house; | |
uint public numTokens; | |
mapping(address => uint) public tokenBalance; | |
function getContractBalance() returns (uint) { | |
return (this.balance); | |
} | |
function RPS(uint startTokens) { | |
if (startTokens < 1000 ether) throw; |
import java.util | |
import org.apache.kafka.clients.consumer.KafkaConsumer | |
import scala.collection.JavaConverters._ | |
object ConsumerExample extends App { | |
import java.util.Properties |
Request body | |
See description of /wallet/transaction/generate | |
Examples: | |
{"requests":[{"address":"4MQyML64GnzMxZgm","value":123456,"assets":[],"registers":{"R4":"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563","R5":"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2","R6":"0e061a2b3c4d5e6f"}},{"address":"7g5LhysK7mxX8xmZdPLtFE42wwxGFjpp8VofStb","value":123456,"assets":[],"registers":{"R4":"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563","R5":"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2","R6":"0e061a2b3c4d5e6f"}}],"fee":1000000,"inputsRaw":[]} | |
Execute | |
Clear | |
Responses |
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script | |
# ~/.ssl/sign-all-modules.sh | |
# Place all files in ~/.ssl folder | |
mkdir ~/.ssl | |
cd ~/.ssl | |
# Generate custom keys with openssl | |
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/" |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- Badges are made with Shields.io.
- This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
- 🇫🇷 Cette liste en français
- 🇨🇳🇹🇼 这个中文名单
Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:
Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.
Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.
Instructions provided for both Fedora and Ubuntu (including Debian):
Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running: