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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
) | |
const ( | |
CONN_HOST = "localhost" |
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
{-# LANGUAGE DeriveDataTypeable #-} | |
import Control.Monad.Random | |
import System.Random.Shuffle | |
import Data.Typeable | |
import Data.Data | |
import Control.Applicative | |
data Suit = Hearts | Clubs | Diamonds | Spades | |
deriving (Eq, Data, Typeable) |
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
{-# LANGUAGE DeriveDataTypeable #-} | |
import Control.Monad.Random | |
import System.Random.Shuffle | |
import Data.Typeable | |
import Data.Data | |
data Suit = Hearts | Clubs | Diamonds | Spades | |
deriving (Eq, Enum, Bounded, Ord, Data, Typeable) |
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
jfuentes@beast:~$ go run main.go | |
# command-line-arguments | |
./aerospike-client-c/target/Linux-x86_64/lib/libaerospike.a(cl_udf.o): In function `citrusleaf_udf_get_with_gen': | |
./aerospike-client-c/src/main/citrusleaf/cl_udf.c:531: undefined reference to `SHA1' | |
./aerospike-client-c/target/Linux-x86_64/lib/libaerospike.a(cf_random.o): In function `cf_rand_reload': | |
./aerospike-client-c/modules/base/src/main/cf_random.c:68: undefined reference to `RAND_seed' | |
./aerospike-client-c/modules/base/src/main/cf_random.c:71: undefined reference to `RAND_bytes' | |
./aerospike-client-c/target/Linux-x86_64/lib/libaerospike.a(citrusleaf.o): In function `cf_digest_compute2': | |
./aerospike-client-c/modules/common/target/Linux-x86_64/include/citrusleaf/cf_digest.h:108: undefined reference to `RIPEMD160_Init' | |
./aerospike-client-c/modules/common/target/Linux-x86_64/include/citrusleaf/cf_digest.h:109: undefined reference to `RIPEMD160_Update' |
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
root@ci:/home/telluride# docker run -i -t base /bin/bash | |
root@eee02db16ff9:/# ping 4.2.2.1 | |
PING 4.2.2.1 (4.2.2.1) 56(84) bytes of data. | |
From 172.17.0.2 icmp_seq=1 Destination Host Unreachable | |
From 172.17.0.2 icmp_seq=2 Destination Host Unreachable | |
From 172.17.0.2 icmp_seq=3 Destination Host Unreachable | |
From 172.17.0.2 icmp_seq=4 Destination Host Unreachable | |
From 172.17.0.2 icmp_seq=5 Destination Host Unreachable | |
From 172.17.0.2 icmp_seq=6 Destination Host Unreachable | |
^C |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type Move uint |
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
(defn- within-minutes? [mins dates] | |
(let [delta (-> (Minutes/minutesBetween (first dates) (last dates)) | |
.getMinutes | |
Math/abs)] | |
(<= delta mins))) |
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
(def t' | |
"T' time units" | |
1000) | |
(def k | |
"Size of failure detection subgroups" | |
5) | |
(def period | |
"Monotonically increasing sequence of the current protocol period" |
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
(invoke! [this test op] | |
(try+ | |
(case (:f op) | |
:read (try (let [value (json/parse-string (:body (consul-get client)) true) | |
seriousValue (-> (first value) | |
:Value | |
base64/decode | |
Integer.) | |
index (-> (first value) :Index)] | |
(assoc op :type :ok :value seriousValue :index index)) |
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
:read (try (let [value (json/parse-string (:body (consul-get client)) true) | |
seriousValue (-> (first value) | |
:Value | |
base64/decode | |
Integer.)] | |
(prn seriousValue) | |
(assoc op :type :ok :value seriousValue)) |