Skip to content

Instantly share code, notes, and snippets.

input {
udp {
port => 5454
}
}
output {
stdout {
codec => rubydebug
}
filter {
json {
source => "message"
}
}
input {
udp {
port => 5454
}
input {
udp {
port => 5454
codec => json_lines
}
}
output {
stdout {
codec => json_lines
@orotemo
orotemo / gist:4acbc9f3f0a089d411ad
Created July 8, 2015 11:47
docker to build erlang releases
FROM ubuntu:trusty
RUN apt-get update && apt-get -y upgrade && apt-get -y install wget && apt-get -y install git
RUN cd /tmp; wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb
RUN apt-get update && apt-get -y install erlang erlang-base-hipe build-essential
RUN git clone https://github.com/rebar/rebar3 && cd rebar3 && ./bootstrap && \
@orotemo
orotemo / do_boot2.sh
Last active August 29, 2015 14:24 — forked from leucos/do_boot2.sh
#!/bin/bash
#
# What is that
# ============
#
# This script will help you setting up your digital ocean
# infrastructure with Ansible v2.0+ and DO API v2
#
# Usually, when working with DO, one is supposed to use digital_ocean.py
# inventory file, and spin up instances in a playbook.
rebar3 as prod relflow -u v20150714.074813
rebar3 as prod tar relup -u 20150714.074813
void hex_print(byte *buf, int n) {
fprintf(stderr, "<<");
for (int i = 0; i < n; i++)
{
fprintf(stderr, "16#%02X", buf[i]);
if (i < n-1) fprintf(stderr, ",");
}
fprintf(stderr,">>\r\n");
fflush(stderr);
@orotemo
orotemo / Dockerfile
Created January 14, 2016 08:47
erlang esl on ubuntu 14.04
FROM ubuntu:trusty
RUN apt-get update --fix-missing && apt-get -y upgrade &&\
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 && \
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 && \
apt-get -y install wget && apt-get -y install git && apt-get -y install vim
RUN cd /tmp; wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb
@orotemo
orotemo / Dockerfile
Created January 14, 2016 08:49
based on erlang/ubuntu 14 - add root and opencv
FROM erlang-ubuntu14
RUN cd /tmp && \
wget \
https://root.cern.ch/download/root_v6.06.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz\
&& tar -zxf root_v6.06.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz -C /usr/local/share
RUN ln -sf /usr/local/share/root/include/ /usr/local/include/root && \
/bin/bash -c "source /usr/local/share/root/bin/thisroot.sh" && \
apt-get -y install python-software-properties && \
#ifndef __MINUNIT_H__
#define __MINUNIT_H__
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(test) do { char *message = test(); tests_run++; \
if (message) return message; } while (0)
extern int tests_run;
#endif //__MINUNIT_H__