Let's first look at some elixir_docs_v1
examples (Erlang syntax).
The general chunk structure (from GenServer
) is:
{elixir_docs_v1,
[{docs,
[{{'__using__',1},539,defmacro,[{'',[],'Elixir'}],false},
{{abcast,3},
%% See assertEqual in $ERLANG/lib/stdlib-2.6/include/assert.hrl for the original. | |
-define(exmlAssertEqual(Example, Expr), | |
begin | |
((fun (__X, __V) -> | |
case __V of | |
__X -> ok; | |
__V -> erlang:error({exmlAssertEqual, | |
[{module, ?MODULE}, | |
{line, ?LINE}, | |
{expression, (??Expr)}, |
%% graph_fsm.erl | |
%% | |
%% Author: Vance Shipley, Motivity Telecom Inc. <[email protected]> | |
%% Date: November, 2000 | |
%% | |
%% | |
%% This library is free software; you can redistribute it and/or | |
%% modify it under the terms of the GNU Lesser General Public | |
%% License as published by the Free Software Foundation; either | |
%% version 2 of the License, or (at your option) any later |
" d closes a tab | |
map d closeTab | |
" C-d/C-u scrolls down/up | |
map <C-d> scrollPageDown | |
map <C-u> scrollPageup | |
" M-§ / A-§ switch to previous active tab / last used tab | |
map <M-§> lastUsedTab | |
map <A-§> lastUsedTab |
Last login: Wed Oct 25 18:19:04 on ttys005 | |
e18:20:30 erszcz @ x4 : ~ | |
$ erl | |
-bash: erl: command not found | |
18:20:30 erszcz @ x4 : ~ | |
$ . ~/apps/erlang/19.3.6.2/activate | |
18:20:41 erszcz @ x4 : ~ | |
$ erl | |
Erlang/OTP 19 [erts-8.3.5.2] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false] |
#!/usr/bin/env bash | |
## Make Docker4Mac containers routable in a private network. | |
## This is mostly a copy-paste from the original solution. | |
## IT'S NOT A COMPLETE SOLUTION - this script only does the | |
## steps necessary every time Docker4Mac is restarted. | |
## Beforehand, you have to run the steps marked as ONCE yourself. | |
## See https://github.com/docker/for-mac/issues/155#issuecomment-320509769 | |
set -e |
-module(agent). | |
-compile([export_all]). | |
test(CallerPid) -> | |
CallerPid ! {agent, node(), self()}. |
-module(ct_helper). | |
-compile([export_all]). | |
%% @doc Like ct:get_config/1, but calls error/1 if Key is not found / undefined. | |
%% This guarantees to fail fast if required config options are missing from | |
%% the config file, saving trouble with `undefined` value propagation. | |
%% Use alongside with the CT `require` mechanism. | |
%% See s2s_SUITE for an example. | |
-spec get_config(atom()) -> any(). |
#!/usr/bin/env bash | |
# file: node-name.sh | |
set -eu | |
PREFIX=history | |
MAXNODES=100 | |
DEFAULT=${PREFIX}_$(uuidgen | sed 's/-//g') |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost