- Starting: https://github.com/basho/riak_kv/blob/1.4.2/src/riak_kv_wm_object.erl#L619
- We create a new
riak_object
and populate the various fields with the headers, metadata supplied by the client. - Big suprise, we eventually call
riak_client:put
: https://github.com/basho/riak_kv/blob/1.4.2/src/riak_client.erl#L143 - If/when the client returns any errors these are handled in
handle_common_errors
and it is nice to return human readable errors to client :)
This file contains 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(pb_decode). | |
-compile(export_all). | |
%% existing code | |
d_msg_rpberrorresp(Bin, TrUserData) -> | |
dfp_read_field_def_rpberrorresp(Bin, 0, 0, | |
id(undefined, TrUserData), | |
id(undefined, TrUserData), TrUserData). |
This file contains 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
*.beam | |
*.csv |
This file contains 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
f(MostLeaky). | |
MostLeaky = fun(N) -> | |
lists:sublist( | |
lists:usort( | |
fun({K1,V1},{K2,V2}) -> {V1,K1} =< {V2,K2} end, | |
[try | |
{_,Pre} = erlang:process_info(Pid, binary), | |
erlang:garbage_collect(Pid), | |
{_,Post} = erlang:process_info(Pid, binary), | |
{Pid, length(Post)-length(Pre)} |
Stream queues are divided into two sections:
This file contains 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
Originally from: http://erlang.org/pipermail/erlang-questions/2017-August/093170.html | |
For a safe and fast Erlang SSL server, there's a few | |
configuration values you might want by default: | |
[{ciphers, CipherList}, % see below | |
{honor_cipher_order, true}, % pick the server-defined order of ciphers | |
{secure_renegotiate, true}, % prevent renegotiation hijacks | |
{client_renegotiation, false}, % prevent clients DoSing w/ renegs | |
{versions, ['tlsv1.2', 'tlsv1.1']}, % add tlsv1 if you must |
This file contains 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
"Allow project specific .vimrc execution | |
set exrc | |
"no backup files | |
set nobackup | |
"only in case you don't want a backup file while editing | |
set nowritebackup | |
"no swap files |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
- 0xAX's list of Erlang bookmarks
- Federico Carrone, Erlang Spawned Shelter
- Ivan Uemlianin's list of resources on various BEAM languages
- David Robakowski's curated list of awesome Erlang libraries, resources and shiny things
- Julius Beckmann's curated list of amazingly awesome Elixir and Erlang libraries, resources and shiny things
This file contains 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
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# an explanation about some of these parameters, and instructions for | |
# a few other tweaks outside this file. | |
# See evil packets in your logs. | |
net.ipv4.conf.all.log_martians = 1 |
This file contains 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
# Block Facebook IPv4 | |
127.0.0.1 www.facebook.com | |
127.0.0.1 facebook.com | |
127.0.0.1 login.facebook.com | |
127.0.0.1 www.login.facebook.com | |
127.0.0.1 fbcdn.net | |
127.0.0.1 www.fbcdn.net | |
127.0.0.1 fbcdn.com | |
127.0.0.1 www.fbcdn.com | |
127.0.0.1 static.ak.fbcdn.net |
OlderNewer