This gist is deprecated in favor of https://github.com/ninenines/cowboy/blob/master/doc/src/guide/specs.asciidoc which has a formatted version at https://ninenines.eu/docs/en/cowboy/2.0/guide/specs/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERL_CFLAGS = -fPIC -I /usr/lib/erlang/erts-6.4/include -I /usr/lib/erlang/lib/erl_interface-3.7.20/include | |
ERL_LDFLAGS = -L /usr/lib/erlang/lib/erl_interface-3.7.20/lib -lerl_interface -lei | |
EPCAP_CFLAGS= -DHAVE_PCAP_CREATE | |
EXE_LDFLAGS = -lpcap $(ERL_LDFLAGS) | |
EXE_CFLAGS = $(EPCAP_CFLAGS) | |
EXE_CFLAGS = $(EPCAP_CFLAGS) -DEPCAP_RLIMIT_NOFILES=1 | |
all:: ../priv/epcap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% CI_OTP="OTP-17.4.1 OTP-17.5.3" make ci | |
/home/essen/ninenines/gun/kerl build git https://github.com/erlang/otp OTP-17.4.1 OTP-17.4.1 | |
Checking Erlang/OTP git repository from https://github.com/erlang/otp... | |
Building Erlang/OTP OTP-17.4.1 from git, please wait... | |
Erlang/OTP OTP-17.4.1 from git has been successfully built | |
/home/essen/ninenines/gun/kerl install OTP-17.4.1 /home/essen/erlang/OTP-17.4.1 | |
Installing Erlang/OTP git (OTP-17.4.1) in /home/essen/erlang/OTP-17.4.1... | |
You can activate this installation running the following command: | |
. /home/essen/erlang/OTP-17.4.1/activate | |
Later on, you can leave the installation typing: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(my_module). | |
-export([my_function/1, my_function/2]). | |
-export([infinite_loop/0, f/1, r/2, sort/1]). | |
-export([only_primes/1, is_prime/1]). | |
my_function(A) when is_integer(A) -> | |
my_function(A, 0); | |
my_function(A) when is_list(A) -> | |
my_function(list_to_integer(A), 0). |
One day Erlang training.
This training should get you started with Erlang and understand how to design a highly available distributed system. Because there is only one day, we focus on the essential concepts and skip over many details that would be covered in the normal three days course.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(goldrush). | |
application:start(goldrush) | |
%% Start daemons under goldrush supervision tree. | |
start_daemon(Name, Module, Options) | |
stop_daemon(Name) | |
%% Daemons started this way must define: | |
start_link(Name, Options) |
NewerOlder