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
#!/usr/bin/env escript | |
-mode(compile). | |
-record(gen, { | |
module, | |
enums = [], | |
structs = [], | |
aliases = [], |
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
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -smp enable -sname graph_ring -mnesia debug verbose | |
main([RingFile, OutFile]) -> | |
{ok, Binary} = file:read_file(RingFile), | |
Ring = binary_to_term(Binary), | |
OwnerList = element(2,element(4,Ring)), | |
%io:format("~s~n", [lists:flatten(header(body(footer([]),OwnerList)))]); |
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
APP := erlang_awesome | |
include common.mk | |
include rebar.mk | |
include release.mk | |
include pkg.mk |
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
%% See LICENSE for licensing information. | |
-module(cowboy_debug). | |
-export([onrequest_hook/1]). | |
-export([onresponse_hook/4]). | |
onrequest_hook(Req) -> | |
Method = to_string(extract(cowboy_req:method(Req))), | |
Path = to_string(extract(cowboy_req:path(Req))), | |
Params = params_to_string(extract(cowboy_req:qs_vals(Req))), |
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
This is a quick sample on how I have used websocket_client to test Erlang WebSocket-based applications. To | |
taste it you will need to have a copy of websocket_client from my fork, available at: | |
https://github.com/leandrosilva/erlang_websocket/blob/master/src/websocket_client.erl | |
The websocket_client module was made by Dave Bryson on erlang_websocket project: | |
https://github.com/davebryson/erlang_websocket | |
Enjoy! |