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
// see here for details | |
// https://medium.com/@samgoldman/ville-saukkonen-thanks-and-thanks-for-your-thoughtful-questions-24aedcfed518 | |
// https://github.com/facebook/flow/issues/7125 | |
/* | |
S = State | |
A = Action | |
OP = OwnProps | |
SP = StateProps | |
DP = DispatchProps |
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
const empty = | |
run => | |
run() | |
const enqueue = | |
(q, fn) => | |
next => | |
q(() => fn(next)) | |
let q = empty |
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
// moved to https://github.com/peter-leonov/css-cleaner |
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
#!/usr/bin/perl | |
# usage: echo "hello <%= $USER %> <% if (true) { %>abc<%>%>" | perl template.pl > out.txt | |
for $key (keys %ENV) { ${$key} = $ENV{$key} } | |
$template = join("", <>); | |
$template =~ s/<%=/<% print /g; | |
@code = @text = split(/<%(.+?)%>/s, $template); | |
for (my $i = 0; $i <= $#code; $i+=2) { @code[$i] = "; print \@text[$i];" } | |
eval join(";", @code); |
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
<empty> |
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
> You're welcome! | |
> | |
> In answer to your questions and remarks: | |
> | |
> 1) I'm sorry, but jison is /not/ a /port/ of bison… | |
Understand. Who may want to just copy such a monster. | |
> | |
> 1.a) jison combines a lexer and LALR(1) parser in one package. | |
It is cool and I like it. But, as you write below, in my case the builtin lexer is not the case :( | |
> 1.b) jison may share 4 alphanumerics with bison and may support a large |
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
%pure_parser | |
%token keyword_class keyword_module keyword_def keyword_undef keyword_begin keyword_rescue keyword_ensure keyword_end keyword_if keyword_unless keyword_then keyword_elsif keyword_else keyword_case keyword_when keyword_while keyword_until keyword_for keyword_break keyword_next keyword_redo keyword_retry keyword_in keyword_do keyword_do_cond keyword_do_block keyword_do_LAMBDA keyword_return keyword_yield keyword_super keyword_self keyword_nil keyword_true keyword_false keyword_and keyword_or keyword_not modifier_if modifier_unless modifier_while modifier_until modifier_rescue keyword_alias keyword_defined keyword_BEGIN keyword_END keyword__LINE__ keyword__FILE__ keyword__ENCODING__ | |
%token <id> tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL | |
%token <node> tINTEGER tFLOAT tSTRING_CONTENT tCHAR | |
%token <node> tNTH_REF tBACK_REF | |
%token <num> tREGEXP_END | |
%type <node> singleton strings string string1 xstring regexp |
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
Waiting for /var/run/docker.sock | |
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) | |
WARN[0000] Running modprobe bridge nf_nat failed with message: insmod /lib/modules/3.13.0-52-generic/kernel/net/llc/llc.ko | |
insmod /lib/modules/3.13.0-52-generic/kernel/net/802/stp.ko | |
insmod /lib/modules/3.13.0-52-generic/kernel/net/bridge/bridge.ko | |
insmod /lib/modules/3.13.0-52-generic/kernel/net/netfilter/nf_conntrack.ko | |
insmod /lib/modules/3.13.0-52-generic/kernel/net/netfilter/nf_nat.ko | |
, error: exit status 1 | |
/var/run/docker.sock is up | |
WARN[0000] Your kernel does not support swap memory limit. |
This file has been truncated, but you can view the full file.
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
INFO[297400] GET /v1.18/containers/network/json | |
INFO[297401] GET /v1.18/containers/network/json | |
INFO[297401] GET /v1.18/containers/network/json | |
INFO[297401] GET /v1.18/containers/network/json | |
INFO[297401] GET /v1.18/containers/network/json | |
INFO[297401] GET /v1.18/containers/json?all=0&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dinshaker%22%2C+%22com.docker.compose.service%3Dcombinator%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0 | |
INFO[297402] POST /v1.18/containers/dc0136dc7fe3cd7549c0367f999c96e95e297953eb7f66df4f443ac6e6eae0f8/stop?t=10 | |
INFO[297404] GET /v1.18/containers/json?all=0&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dinshaker%22%2C+%22com.docker.compose.service%3Drails%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0 | |
INFO[297404] POST /v1.18/containers/d332476a2d1b2c0fb14f255f21766e772735c58dfa07e5d3ca672196943467f2/stop?t=10 | |
INFO[297405] GET / |
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
#!/usr/bin/perl | |
# use: echo "hello <%= $USER %> <% if (true) { %>abc<%>%>" | perl template.pl > out.txt | |
for $key (keys %ENV) { ${$key} = $ENV{$key} } | |
$template = join("", <>); | |
$template =~ s/<%=/<% print /g; | |
@code = @text = split(/<%(.+?)%>/s, $template); | |
for (my $i = 0; $i <= $#code; $i+=2) { @code[$i] = "; print \@text[$i];" } | |
eval join(";", @code); |