Skip to content

Instantly share code, notes, and snippets.

View kostiushkin's full-sized avatar

Serhii Kostiushkin kostiushkin

  • ErlangBureau
  • Kyiv, Ukraine
  • 21:41 (UTC +02:00)
View GitHub Profile
-module(cache_server).
-behaviour(gen_server).
-export([start_link/1,insert/3,lookup/1,lookup_by_date/2]).%,lookup_by_date/2]).
-export([init/1,handle_call/3,handle_cast/2,handle_info/2,terminate/2,code_change/3]).
-export([test/0,ets_list/0]).
-export([delete/1]).
-record(string,{key,value,life_time,valid_time,add_date}).
%------------------------------------------------------------------------------------------
test()->
start_link([{drop_interval, 10000}]),
@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))]).
@5HT
5HT / WebFrameworks.md
Last active January 26, 2021 07:19
Overview of Web Frameworks (2013)