Skip to content

Instantly share code, notes, and snippets.

View SkAZi's full-sized avatar

Igor "SkAZi" Potapov SkAZi

View GitHub Profile
function hackcrypt(last, message) {
var len = message.length;
for(var ret = "", i = 0; i < len; i++)
ret += chars[last = (i + last + message.charCodeAt(i)) % 64];
return ret;
}
function uncrypt(endata){
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
total = 0;
defmodule DotExp do
@doc """
RegExp like syntax validator, "." is any symbol,
"*" repeats last symbol 0..n times.
"""
def match?(expr, str), do: match(expr, str)
defp match("", ""), do: true
defp match(".*", _), do: true
defmodule MobCas3.Poker1 do
@cards([{99, :joker},{98, :joker}] ++
for m <- 2..14, v <- [:spades, :clubs, :diamonds, :hearts] do {m,v} end)
def match(comb) when is_list(comb), do: apply(MobCas3.Poker, :match, Enum.sort(comb))
def match(comb) when is_tuple(comb), do: match(Tuple.to_list(comb))
def match({10,m}, {11,m}, {12,m}, {13,m}, {14,m}), do: {:royal_flush, {m}}
def match({a,m}, {b,m}, {c,m}, {d,m}, {e,m})
when b==a+1 and c==b+1 and d==c+1 and e==d+1, do: {:straight_flush, {e,m}}
@SkAZi
SkAZi / # opencv - 2016-10-13_12-01-37.txt
Created October 13, 2016 09:06
opencv (homebrew/science/opencv) on macOS 10.12 - Homebrew build logs
Homebrew build logs for homebrew/science/opencv on macOS 10.12
Build date: 2016-10-13 12:01:37