Skip to content

Instantly share code, notes, and snippets.

View jpfuentes2's full-sized avatar

Jacques Fuentes jpfuentes2

  • Chime
  • Richmond, VA
View GitHub Profile
package main
import (
"fmt"
"net"
"os"
)
const (
CONN_HOST = "localhost"
{-# 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)
{-# 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)
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'
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
package main
import (
"fmt"
"math/rand"
"time"
)
type Move uint
(defn- within-minutes? [mins dates]
(let [delta (-> (Minutes/minutesBetween (first dates) (last dates))
.getMinutes
Math/abs)]
(<= delta mins)))
(def t'
"T' time units"
1000)
(def k
"Size of failure detection subgroups"
5)
(def period
"Monotonically increasing sequence of the current protocol period"
(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))
: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))