Skip to content

Instantly share code, notes, and snippets.

View kostiushkin's full-sized avatar

Serhii Kostiushkin kostiushkin

  • ErlangBureau
  • Kyiv, Ukraine
  • 16:23 (UTC +02:00)
View GitHub Profile
@kostiushkin
kostiushkin / beam_decompile.erl
Created October 29, 2015 13:39 — forked from andelf/beam_decompile.erl
Erlang BEAM file decompile to .erl file
#!/usr/bin/env escript
% -*- mode: erlang -*-
main([BeamFile]) ->
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
-module(binary).
%% API
-export([binary_to_hexstring/1]).
-export([hexstring_to_binary/1]).
%% API
binary_to_hexstring(Bin) when is_binary(Bin) ->
bytelist_to_hexstring(binary_to_list(Bin)).
-module(proplists).
%% API
-export([filter/2]).
-export([proplist_to_record/3, proplist_to_record/4]).
-export([record_to_proplist/2]).
%% API
filter(KeyList, PropList) ->
F = fun(List) ->
-module(calendar).
%% API
-export([is_business_time/0, is_business_time/1]).
-export([is_daytime/0, is_daytime/1]).
-export([is_holiday/0, is_holiday/1]).
-export([is_workday/0, is_workday/1]).
-export([is_in_interval/3]).
%% API