Skip to content

Instantly share code, notes, and snippets.

Ivan Uemlianin llaisdy

Block or report user

Report or block llaisdy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View drop31.ex
defmodule Drop do
def clown1(x) do
5 * x
end
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>
<html>
<head><meta charset="UTF-8"/></head>
<body>
<h1>Sortable Demo</h1>
<div id="demo"></div>
<div id="jsfooter">
<script src="https://fb.me/react-0.13.3.min.js"></script>
View ht.pl
% hex tiles puzzle
% - https://chris-lamb.co.uk/posts/giants-causeway-puzzle
% - https://llaisdy.wordpress.com/2015/01/13/that-giants-causeway-puzzle-in-prolog/
:- use_module(library(clpfd)). %% for all_different/1
%% tile(Name, Colours).
% tiles from picture
@llaisdy
llaisdy / gist.erl
Last active Dec 17, 2015
folding functions over context
View gist.erl
-module(gist).
-export([authenticate/3]).
authenticate(UserName, Pass, IPAddress) ->
Checks = [fun user_ok/1,
fun password_ok/1,
fun ipaddr_ok/1
],
{Result, _} = lists:foldl(
fun(_CheckFun, {{error, Reason}, _}) ->
You can’t perform that action at this time.