Check, if compression is enabled:
proplists:get_value(compress, ranch:get_protocol_options(http), false).
true
Enable compression:
ranch:set_protocol_options(http, lists:keystore(compress, 1, ranch:get_protocol_options(http), {compress, false})).
{loglevel,3}. | |
{hosts,["token.get.interval.pl","timeout.get.token.org","timeout.pl", | |
"interval.org","token.get.user.ru","interval.io","get.pl", | |
"password.get.interval.ru","get.ru"]}. | |
{listen,[{60223,mod_queries_sasl_auth_node,[]}, | |
{27640,mod_disco,[]}, | |
{35684,mod_node_open_websockets_metrics,[]}, | |
{52226,mod_vcard_elastic_graphite_metrics_event,[]}, | |
{15125,mod_bosh_mnesia_linux,[]}, | |
{6204,mod_websockets_muc_core_privacy,[]}]}. |
10> <<1>> = <<-2:1, 1:7>>. | |
<<1>> | |
11> <<-2:1, 1:7>> = <<1>>. | |
** exception error: no match of right hand side value <<1>> |
make_element(Src) -> | |
<img src={Src} />. | |
digits_only(Src) -> | |
MP = /^\s*\d+\s*$/, | |
re_test(Str, MP). | |
digits_only2(Src) -> | |
Re = "^\\s*\\d+\\s*$", |
time ss -s | |
Total: 35195 (kernel 35290) | |
TCP: 34809 (estab 34057, closed 698, orphaned 27, synrecv 0, timewait 73/0), ports 195 | |
Transport Total IP IPv6 | |
* 35290 - - | |
RAW 0 0 0 | |
UDP 15 11 4 | |
TCP 34111 34106 5 | |
INET 34126 34117 9 |
-module(portable_fun). | |
%% API | |
-export([call/2, | |
call/3]). | |
%% private | |
-export([eval_and_apply/3]). | |
%% Examples | |
-export([plus_one_f/0, |
-module(portable_tracer). | |
%% API | |
-export([spawn_remote_tracer/3, | |
spawn_tracer/3]). | |
%% Private | |
-export([tracer_cycle/1]). | |
-compile(debug_info). |
-module(sad). | |
-export([sad1/3, | |
sad2/3]). | |
sad1(<<H1,T1/binary>>, <<H2,T2/binary>>, Sum) -> | |
sad1(T1, T2, Sum + abs(H1-H2)); | |
sad1(<<>>, <<>>, Sum) -> | |
Sum. | |
sad2(<<H1,A1,B1,C1,T1/binary>>, <<H2,A2,B2,C2,T2/binary>>, Sum) -> |
Check, if compression is enabled:
proplists:get_value(compress, ranch:get_protocol_options(http), false).
true
Enable compression:
ranch:set_protocol_options(http, lists:keystore(compress, 1, ranch:get_protocol_options(http), {compress, false})).
#!/bin/bash | |
filename="$1" | |
basename="$(basename $1)" | |
curpath="$(pwd)" | |
cd "$(dirname $filename)" | |
pid="$(vim -r 2>&1 | fgrep "$basename.sw" -A 5 | grep 'still running' | sed 's/[^0-9]//g')" | |
cd "$curpath" | |
if [ -n "$pid" ]; then |
To limit amount of inspected messages we can use "start" and "end" elements.
<iq type='get'>
<query xmlns='urn:xmpp:mam:tmp'>
<start>2010-06-07T00:00:00Z</start>
<end>2010-07-07T13:23:54Z</end>
</query>
</iq>