Skip to content

Instantly share code, notes, and snippets.

View logic-problem.lp
%%%% Boys in the Hood
%%%% The world.
victim(friar_tuck; little_john; maid_marian; much; will_scarlet).
location(inn; dungeon; lodge; gaol; stocks).
disguise(abbot; shepherd; phantom; prince_john; washerwoman).
%% For each Episode, there is one (V,L,D) combination,
View drop31.ex
defmodule Drop do
def clown1(x) do
5 * x
def clown2a(x) do 5 * x end
def clown2b (x) do 5 * x end
def clown2c x do 5 * x end
View rebar.compile.gcc48
$ env CC=gcc ./rebar compile
==> rdma_dist-master (compile)
Compiling c_src/rdma_drv.c
In file included from c_src/rdma_drv.c:17:0:
/usr/include/arpa/inet.h:27:1: error: unknown type name ‘__socklen_t’
typedef __socklen_t socklen_t;
/usr/include/arpa/inet.h:35:1: error: unknown type name ‘in_addr_t’
extern in_addr_t inet_addr (__const char *__cp) __THROW;
View sortable_demo.html
<!DOCTYPE html>
<head><meta charset="UTF-8"/></head>
<h1>Sortable Demo</h1>
<div id="demo"></div>
<div id="jsfooter">
<script src=""></script>
% hex tiles puzzle
% -
% -
:- use_module(library(clpfd)). %% for all_different/1
%% tile(Name, Colours).
% tiles from picture
llaisdy / gist.erl
Last active Dec 17, 2015
folding functions over context
View gist.erl
authenticate(UserName, Pass, IPAddress) ->
Checks = [fun user_ok/1,
fun password_ok/1,
fun ipaddr_ok/1
{Result, _} = lists:foldl(
fun(_CheckFun, {{error, Reason}, _}) ->