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
// Implementation of a UDP proxy | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"os" |
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
%% @author Masahito Ikuta <cooldaemon@gmail.com> [http://d.hatena.ne.jp/cooldaemon/] | |
%% @copyright Masahito Ikuta 2008 | |
%% @doc UDP Server Behaviour. | |
%% Copyright 2008 Masahito Ikuta | |
%% | |
%% Licensed under the Apache License, Version 2.0 (the "License"); | |
%% you may not use this file except in compliance with the License. | |
%% You may obtain a copy of the License at | |
%% |
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
REBAR = $(shell which rebar || echo ./rebar) | |
all : deps compile | |
test : compile unit | |
./rebar: | |
erl -noshell -s inets start -s ssl start \ | |
-eval 'httpc:request(get, {"https://raw.github.com/wiki/rebar/rebar/rebar", []}, [], [{stream, "./rebar"}])' \ | |
-s inets stop -s init stop | |
chmod +x ./rebar |
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
%%-*- mode: erlang -*- | |
{erl_opts, | |
[debug_info, fail_on_warning, | |
{src_dirs, ["src", "lib"]}, {i, "test"} | |
] | |
}. | |
{lib_dirs, ["deps"]}. | |
{require_otp_vsn, "R16*"}. |
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 (rabbitmq_client). | |
-behaviour(gen_server). | |
-include_lib("amqp_client/include/amqp_client.hrl"). | |
-export([start_link/0]). | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). | |
%% Internal state | |
-record(state, { |
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 (amqp_client2). | |
-behaviour(gen_server). | |
-include_lib("amqp_client/include/amqp_client.hrl"). | |
-export([start_link/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
#!/bin/bash | |
# installing erlang on ubuntu's | |
sudo apt-get install build-essential libncurses5-dev openssl libssl-dev | |
sudo mkdir -p /opt/erlang/ | |
curl -O https://raw.github.com/spawngrid/kerl/master/kerl && chmod a+x kerl | |
sudo mv kerl /opt/erlang/ | |
sudo ln -s /opt/erlang/kerl /usr/local/bin/kerl | |
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
#!/bin/bash | |
# installing golang on ubuntu's | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:gophers/go | |
sudo apt-get update | |
sudo apt-get install golang-stable # Or golang-weekly, or golang-tip | |
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
#!/bin/bash | |
# installing oracle jdk6/7 on ubuntu's | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install -y oracle-java6-installer | |
sudo apt-get install -y oracle-java7-installer |
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
#!/bin/bash | |
# installing erlang on ubuntu | |
curl -O https://raw.github.com/spawngrid/kerl/master/kerl | |
chmod a+x kerl |