Skip to content

Instantly share code, notes, and snippets.

View asonge's full-sized avatar

Alexander Songe asonge

View GitHub Profile
{"id":2000,"cardType":"A","text":"Oversharing.","numAnswers":0,"expansion":"ed"},
{"id":2001,"cardType":"A","text":"Penis.","numAnswers":0,"expansion":"ed"},
{"id":2002,"cardType":"A","text":"Foghorn Leghorn.","numAnswers":0,"expansion":"ed"},
{"id":2003,"cardType":"A","text":"Buttcoin.","numAnswers":0,"expansion":"ed"},
{"id":2004,"cardType":"A","text":"Sandra Dean's Kwanzaa Cake.","numAnswers":0,"expansion":"ed"},
{"id":2005,"cardType":"A","text":"A sharpened #2 pencil.","numAnswers":0,"expansion":"ed"},
{"id":2006,"cardType":"A","text":"The cock carousel.","numAnswers":0,"expansion":"ed"},
{"id":2007,"cardType":"A","text":"Spermjacking.","numAnswers":0,"expansion":"ed"},
{"id":2008,"cardType":"A","text":"Ray Comfort.","numAnswers":0,"expansion":"ed"},
{"id":2010,"cardType":"A","text":"Baby Jesus Butt Plug with expired novelty lube.","numAnswers":0,"expansion":"ed"},
$ nc -l 6666
Buggy?
^C
$ nc -u -l 6666
Buggy?
import sys
import time
from subprocess import PIPE, Popen
from threading import Thread
try:
from Queue import Queue, Empty
except ImportError:
from queue import Queue, Empty
# dtrace -n syscall:::entry'{@[execname] = count()}' \
-x agghist -x aggzoom -x encoding=utf8
dtrace: description 'syscall:::entry' matched 233 probes
dtrace: description 'syscall:::entry' matched 233 probes
^C
key ------------- Distribution ------------- count
utmpd | 2
sshd | 10
pickup | 14
defmodule Ravel.DVVSet do
@moduledoc """
An observed-remove DVVSet.
Doesn't use tombstones, but has 1 vclock for each entry and a vclock for the
set. When sets are merged, the set vclocks can be used to make sure that
deletes don't reappear.
"""
defrecordp :s, __MODULE__, [clock: nil, values: nil]

Ravel

Ravel provides a set of CRDT's (Cumulative Replicated Data Types) for Elixir, with a little more than inspiration from Basho's https://github.com/basho/riak_dt

About the name

CRDT's seem to be a great way to overcomplicated simple datastructures, and some people ...

Ravel

Ravel provides a set of CRDT's (Cumulative Replicated Data Types) for Elixir, with a little more than inspiration from Basho's https://github.com/basho/riak_dt

About the name

CRDT's seem to be a great way to overcomplicated simple datastructures, and some people ...

sudoku(Puzzle, Solution) :-
Solution = Puzzle,
Puzzle = [S11, S12, S13, S14,
S21, S22, S23, S24,
S31, S32, S33, S34,
S41, S42, S43, S44],
fd_domain(Solution, 1, 4),
defmodule Rout.Router do
defmacro __using__(_opts) do
quote do
import unquote(__MODULE__)
Module.register_attribute(__MODULE__, :route, [persist: true, accumulate: true])
@before_compile unquote(__MODULE__)
end
end
iex(2)> quote do
...(2)> defmodule Blah do
...(2)> def test(omg, :wtf) when omg > 3 do
...(2)> :ok
...(2)> end
...(2)> end
...(2)> end
{:defmodule, [context: Elixir, import: Kernel],
[{:__aliases__, [alias: false], [:Blah]},
[do: {:def, [context: Elixir, import: Kernel],