A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
#!/bin/bash | |
set -e | |
if [[ -z ${K8S_JVM_POD} ]]; then | |
echo "K8S_JVM_POD not defined" | |
exit 1 | |
fi | |
EXEC="kubectl exec ${K8S_JVM_POD}" | |
CP="kubectl cp ${K8S_JVM_POD}" |
A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments:
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
The current kernel/drivers of Fedora 24 do not support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.
Verify that your card is a Broadcom using: lspci -vnn -d 14e4:
Sample output:
02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
Install the rpmfusion repo, note only "nonfree" is required, as the Broadcom Driver is proprietry: http://rpmfusion.org/
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
package main | |
import ( | |
"fmt" | |
"math" | |
"time" | |
) | |
func epoch_seconds(date time.Time) (sec float64) { | |
/* Returns the number of seconds from the epoch to date. */ |
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
(function (e, a, h, f, c, b, d) { | |
c = a.createElement("script"); | |
c.type = "text/javascript"; | |
c.src = "https://rawgithub.com/marmelab/gremlins.js/master/gremlins.min.js"; | |
c.onload = c.onreadystatechange = function () { | |
if (!b && (!(d = this.readyState) || d == "loaded" || d == "complete")) { | |
h(); | |
f(c).remove() | |
} | |
}; |
package hash | |
type Hasher interface { | |
Update(uint8) | |
UpdateArray([]uint8) | |
Hash() uint32 | |
Reset() | |
} | |
const ( |