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
%%%------------------------------------------------------------------- | |
%% @copyright Geoff Cant | |
%% @author Geoff Cant <[email protected]> | |
%% @version {@vsn}, {@date} {@time} | |
%% @doc Wireshark hex byte stream -> erlang binary | |
%% @end | |
%%%------------------------------------------------------------------- | |
-module(wshark). | |
-include_lib("eunit/include/eunit.hrl"). |
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
client_flags() -> | |
[{long_password, 1, "new more secure passwords"} | |
,{found_rows, 2, "Found instead of affected rows"} | |
,{long_flag, 4, "Get all column flags"} | |
,{connect_with_db, 8, "One can specify db on connect"} | |
,{no_schema, 16, "Don't allow database.table.column"} | |
,{compress, 32, "Can use compression protocol"} | |
,{odbc, 64, "Odbc client"} | |
,{local_files, 128, "Can use LOAD DATA LOCAL"} | |
,{ignore_space, 256, "Ignore spaces before '('"} |
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
Program counter: 0x00007f61c4365af8 (gen_server:loop/6 + 288) | |
CP: 0x00007f61c0e23fe8 (proc_lib:init_p/5 + 400) | |
arity = 0 | |
0x00007f60fb043f78 Return addr 0x00007f61c0e23fe8 (proc_lib:init_p/5 + 400) | |
y(0) [] | |
y(1) infinity | |
y(2) disk_log_server | |
y(3) {state,[]} | |
y(4) disk_log_server |
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
(defun pipes-org-mode-hook () | |
(interactive) | |
(local-set-key "\C-w" #'pipes-make-tag-from-wr) | |
(message "pipes mode enabled")) | |
(defun pipes-make-tag-from-wr (work-request-number) | |
(interactive "nWork request number") | |
(message "I should do something with the work-request-number")) | |
(add-hook 'org-mode-hook #'pipes-org-mode-hook) |
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(Field, Rec) -> | |
Fields = fields(Rec), | |
FieldIdx = lists:zip(Fields, lists:seq(2,length(Fields)+1)), | |
element(proplists:get_value(Field,FieldIdx), Rec). | |
fields(#dns_rec{}) -> fields(dns_rec); | |
fields(dns_rec) -> record_info(fields, dns_rec); | |
fields(#dns_rr{}) -> fields(dns_rr); | |
fields(dns_rr) -> record_info(fields, dns_rr). |
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
# $Id: Portfile 28835 2007-09-10 02:01:57Z [email protected] $ | |
PortSystem 1.0 | |
name erlang | |
version R12B-5 | |
#revision 1 | |
categories lang erlang | |
maintainers [email protected] | |
platforms darwin | |
description The Erlang Programming Language |
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
# $Id: Portfile 28835 2007-09-10 02:01:57Z [email protected] $ | |
PortSystem 1.0 | |
name erlang | |
version R12B-5 | |
revision 2 | |
categories lang erlang | |
maintainers [email protected] | |
platforms darwin | |
description The Erlang Programming Language |
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
-module(rec_test). | |
-compile(export_all). | |
-include_lib("kernel/src/inet_dns.hrl"). | |
%% Requires R12B5 + | |
-include_lib("eunit/include/eunit.hrl"). | |
%% Retrieves the value stored in the record Rec in field Field. | |
info(Field, Rec) -> | |
Fields = fields(Rec), | |
info(Field, Fields, tl(tuple_to_list(Rec))). |
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
-module(dns_test). | |
-compile(export_all). | |
-define(IF_KEY, "\\hklm\\system\\CurrentControlSet\\Services\\TcpIp\\Parameters\\Interfaces"). | |
-define(TOP_KEY, "\\hklm\\system\\CurrentControlSet\\Services\\TcpIp\\Parameters"). | |
reg() -> | |
{ok, R} = win32reg:open([read]), | |
R. | |
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
%% @type predicate() = {'duplication', [field()]} | | |
%% 'not_empty' | | |
%% 'string' | | |
%% {'length', [Exact::integer()]} | | |
%% {'length', [Min::integer(), Max::integer()]} | | |
%% {'predicate', function()} | | |
%% {'not_predicate', function()} | | |
%% 'email_address' | | |
%% {'regex', Regex::string()} | | |
%% {'member', [term()]}. |