This file contains hidden or 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(my_mod). | |
-export([whoami/0]). | |
whoami() -> my_mod. |
This file contains hidden or 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(iterator). | |
-export([matching/1, catching/1]). | |
matching(Table) -> | |
matching(Table, ets:first(Table)). | |
matching(_Table, '$end_of_table') -> done; | |
matching(Table, Key) -> | |
io:format("~p: ~p~n", [Key, ets:lookup(Table, Key)]), | |
matching(Table, ets:next(Table, Key)). |
This file contains hidden or 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(spts_coverage_SUITE). | |
-author('[email protected]'). | |
-include_lib("mixer/include/mixer.hrl"). | |
-mixin([ | |
{spts_test_utils, | |
[ init_per_suite/1 | |
, end_per_suite/1 | |
]} | |
]). |
This file contains hidden or 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(spts_api_serpents_SUITE). | |
-author('[email protected]'). | |
-include_lib("mixer/include/mixer.hrl"). | |
-mixin([ | |
{spts_test_utils, | |
[ init_per_suite/1 | |
, end_per_suite/1 | |
]} | |
]). |
This file contains hidden or 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(kvs). | |
-export([test/0]). | |
test() -> | |
[ catch test_creation() | |
, catch test_store_find() | |
, catch test_store_delete_find() | |
, … % more function calls like these | |
]. |
This file contains hidden or 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(temp). | |
-export([test/0]). | |
test() -> | |
100.0 = temp:f2c(212.0), | |
0.0 = temp:f2c(32.0), | |
ok. |
This file contains hidden or 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
<family xmlns='http://world.com/family'> | |
<parents> | |
<person gender='male' origin='Argentina'>Javier Lopez</person> | |
<person gender='female' origin='Ecuador'>Elvira Perez</person> | |
</parents> | |
<children> | |
<person gender='male' origin='Argentina'>Armando Lopez</person> | |
<person gender='male' origin='Guatemala'>Luciano Lopez</person> | |
</children> | |
</family> |
This file contains hidden or 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(world_sup). | |
-behaviour(supervisor). | |
-export([start_link/0, init/1]). | |
start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, noargs). | |
init(noargs) -> | |
SupFlags = #{ strategy => one_for_one |
This file contains hidden or 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(animals_sup). | |
-behaviour(supervisor). | |
-export([start_link/1, init/1]). | |
start_link(Name) -> supervisor:start_link({local, Name}, ?MODULE, Name). | |
init(Name) -> | |
SupFlags = #{ strategy => simple_one_for_one |
This file contains hidden or 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(git). | |
-export(['$handle_undefined_function'/2]). | |
'$handle_undefined_function'(Func, Args) -> | |
GitCommand = atom_to_list(Func), | |
GitArgs = [io_lib:format("~p ", [Arg]) || Arg <- Args], | |
Command = ["git ", GitCommand, $\s, GitArgs], | |
Output = os:cmd(Command), | |
io:format("~s~n", [Output]). |