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
%% @author Tom Burdick <[email protected]> | |
%% @copyright 2011 Tom Burdick | |
%% @doc Sine wave generating trace handler. Useful for fun and testing. | |
%% @end | |
-module(plot_trace_sine). | |
-behaviour(plot_trace_handler). | |
-export([init/1, units/1, rate/1, length/1, samples/3, terminate/2]). |
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
#!/bin/sh | |
cd `dirname $0` | |
erl +P 1000000 -smp -sname myapp -setcookie myapp -pa $PWD/ebin $PWD/apps/*/ebin $PWD/deps/*/ebin +Ktrue +A32 +S8 -boot start_sasl -s myapp |
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
%% @author Tom Burdick <[email protected]> | |
%% @copyright 2011 Tom Burdick | |
%% @doc Data Validation. | |
-module(validate). | |
%% api | |
-export([validate/2, has_errors/1, errors/1, values/1]). | |
-ifdef(TEST). |
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(person). | |
-export([init/0, insert/0, read/1]). | |
-record(person, | |
{name, %% atomic, unique key | |
age, %% age | |
married_to, %% name of partner or undefined | |
children }).%% list of children |
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
%% @author Tom Burdick <[email protected]> | |
%% @copyright 2011 Tom Burdick | |
%% @doc Nyuro Web Default Handler. | |
-module(nyuro_web_default). | |
%% cowboy_http_handler api | |
-export([init/3, rest_init/2, content_types_provided/2, to_html/2]). | |
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
2012-01-21 17:42:24.382 | |
request unknown request {http_error,<<"{\"name\":\"Whatever\",\"identifier\":\"None\",\"purity\":5}GET /system/samples/1 HTTP/1.1\r\n">>} | |
- - - - - - - - - - - - - - - - - - - - - - - - - - | |
rest_SUITE:sample failed on line 167 | |
Reason: {badmatch,{ok,400, | |
[{"Server","Cowboy"}, | |
{"Date","S...} |
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
---------------------------------------------------- | |
2012-01-21 17:54:38.552 | |
replying with 403 for url <<"/system">>, method 'GET', headers [{'Host', | |
<<"localhost">>}] | |
---------------------------------------------------- | |
2012-01-21 17:54:38.553 | |
replying with 200 for url <<"/system">>, method 'GET', headers [{'Host', | |
<<"localhost">>}, | |
{'Cookie', |
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
---------------------------------------------------- | |
2012-01-21 18:13:08.464 | |
get to "/system", headers [], body [], socket undefined | |
=PROGRESS REPORT==== 21-Jan-2012::18:13:08 === | |
supervisor: {<0.218.0>,corbel_session_sup} | |
started: [{pid,<0.397.0>}, | |
{name,"session_bUgx1WNf"}, | |
{mfargs, |
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(minmax). | |
-behaviour(gen_server). | |
-record(state, {range={undefined, undefined}}). | |
-export([test/0, start_link/0, range/0, stream/1]). | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, | |
terminate/2, code_change/3]). |
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
# Colors | |
autoload -U colors && colors | |
# Autocomplete | |
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate | |
autoload -Uz compinit && compinit | |
# Auto correct | |
setopt correctall |