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
pastebin_dropbox(Path) -> | |
fun ("", _) -> | |
fun pastebin_devnull/1; | |
(Filename, _ContentType) -> | |
Date = fmt_date(date()), | |
RelName = filename:join([Date, | |
mochicode:url64_encode(term_to_binary(now())), | |
filename:basename(Filename)]), | |
AbsName = filename:join([Path, RelName]), | |
ok = filelib:ensure_dir(AbsName), |
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(etap_t_013). | |
-export([start/0]). | |
start() -> | |
etap:plan(unknown), | |
case (catch run_tests()) of | |
{'EXIT', Err} -> | |
io:format("# ~p~n", [Err]), | |
etap:bail("Exception hit!"); | |
_ -> ok |
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(stocks). | |
-include_lib("rabbitmq_server/include/rabbit.hrl"). | |
-include_lib("rabbitmq_server/include/rabbit_framing.hrl"). | |
-include_lib("rabbitmq_erlang_client/include/amqp_client.hrl"). | |
-compile(export_all). | |
% {Channel, X, RoutingKey} = stocks:start(). | |
% Consumer = spawn(stocks, start_consumer, [Channel, RoutingKey, X, 1]). |
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
nick-gerakiness-macbook-pro:baberl ngerakines$ mkdir ebin | |
nick-gerakiness-macbook-pro:baberl ngerakines$ make | |
(cd c;make) | |
make[1]: Nothing to be done for `all'. | |
(cd erl;make) | |
erlc -W -I../include -o ../ebin baberl_generator.erl | |
erl -pz ../ebin -noshell -eval "baberl_generator:generate_header(\"../include/baberl.hrl\")" -s init stop | |
rm -f ../ebin/baberl_generator.beam | |
erl -make | |
Recompile: baberl_sup |
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
<gc0save>71473841J7A6LJR0OdKMeqt0d4wpRJqit14es+fotNBWN_1OKnTigj_1ssK6awTfTtAHViXqxGnrxmNt_beEzy5aVYmhbDMcYKhUsR1ZYbALXmQleHAkXyiUswPhUPnRRGwzaqw_8m74ZiGjWQ+iHmLM54o7A_Rpnf2NIyMFtL0d6gGpPDrVeIAHE3wrJJ/mRbKK7ncsgKlRRnM19XOd49ZC4S3kRjZNDZY+_xVdIVVMGYAdLxbmvEW9AXPv+LiYlTqBAFMi2oKMYaXQSgLIASTrrxbnfDHmGXugsqNYp6OjKjTJP9mdb6Gpe3oiBLoHUIghXk3J3o8EUpI8hiiy_eoA1uwON9V2uycq7ITCXWj4ZL4HcxYe8NaS1B0h2JlVFTFJ61SGUINFWxhATCIzzzpP1yIEe/rapq47yO8Rgv/IsPkGLHDedupXF+Mw+frO2Sm6Jexy426CFN0_D5czmzmgDwaO6ZwXn/zZVk+N0eblG2khSO1ZRDSQiK67MrkOYViY_LTMpdLJwBdigjd4grkTzwm4rO2DyWN0ElkSPPsj4JNpm/E8bCw7SYDf/kUERgNri5kPHXy2hORcvHLJRyPRH5Y94IExHuiBY0r7vUYSmtaWYXcEAsS4F0orAEzOCkZ+nrDDbJSb45TMZm8dI1_LnVPvSmVpVg_T/y/_ZT7Pze0P+kPljmbQKfUMBUKyR+Oe4SXAontOJmXzdo7iXRM9xpVb+Mc92g8rDNSPUr1oKqlFSsAAaJqkf2bEYh2gL+2adAxqqlbVkuYnyay8wie4+qrdz8qCs6_eb1jHaf9lSQFeraVgm5N/ymM/9bWgM1f4YadkGn0qu7H9Bag63mkAWR5gLlMwf8ZWb/tWtZXEaR+32FZqC7Vwp6Iji31OeT2bzUz_ROB330/n5hT60IUwnIpTCSaru_WguckpqSL6Zh3K_rOzhVVkJ+8s8yMSn2p8uQ_2SiOO9V/Ht2xYCBk+I6u5xwhaX3nz8fF/2RwvNva/Q81SFAQ |
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
Mem = fun(N) -> | |
{Pids, _} = lists:split(N, lists:keysort(2, [begin | |
_, M} = process_info(P, memory), {P, M} | |
end || P <- erlang:processes()])), | |
[begin | |
{_, MFA} = process_info(P, current_function), io:format("~p (~p) ~p~n", [P, Mem, MFA]) | |
end || {P, Mem} <- Pids] | |
end. | |
Mem(25). |
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
Our Projects On GitHub | |
At Rupture, we use Open Source Software in every stage of development. From the build and development process (GNU Make, Erlang, Git) to the testing and deployment cycle (Integrity, etap, RPM) to our production servers (Linux, eJabberd, RabbitMQ), open source affects the way we work and write software in a positive, empowering way. | |
With that, we are always looking at ways to give back to the development community in the form of open source code and, on occasion, beer. These are some of the open source projects we actively participate in as contributors and, event at times, maintainers. | |
With a few exceptions, all of the code, documentation and content of these projects is open source under the MIT license. We prefer GitHub as the repository and host for these projects and all of our projects are available there. | |
The [erlang_mysql](http://github.com/ngerakines/erlang_mysql) project is an Erlang-native MySQL client library. Originally developed by Magnus Ahltorp in 2005, we've been ad |
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
nick-gerakiness-macbook-pro:erlang_mysql ngerakines$ escript t/prepare_concurrent.t | |
t/prepare_concurrent.t:7: Warning: variable 'Host' is unused | |
t/prepare_concurrent.t:8: Warning: variable 'Pid' is unused | |
# Current time local 2009-07-09 18:51:55 | |
# Using etap version "0.3.4" | |
ok 1 - Creating table | |
ok 2 - Creating row | |
'2' MySQLRes {mysql_result,[],[],1,0,512,0,[],[]} | |
'3' MySQLRes {mysql_result,[],[],1,0,512,0,[],[]} | |
'4' MySQLRes {mysql_result,[],[],1,0,512,0,[],[]} |
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(problem1). | |
-compile(export_all). | |
%% @spec solution() -> integer() | |
solution() -> | |
[spawn(Node, ?MODULE, solve, [self(), Start, Finish, 0]) || {Start, Finish, Node} <- distributor(1000)], | |
collector(length([node() | nodes()]), []). | |
collector(0, Acc) -> lists:sum(Acc); | |
collector(N, Acc) -> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- | |
Copyright (C) 2009 Charles Ying. All Rights Reserved. | |
This source code is available under Apache License 2.0. | |
Performance Notes (courtesy of Apple): | |
on leopard, if animating transforms with a transform list > 1 function, animation falls back to software |