Skip to content

Instantly share code, notes, and snippets.

View reconfigurable_supervisor_SUITE.erl
% This test is checking modified supervisor code that can do hot reconfiguration of whole tree.
% Idea is following: our processes configuration should be dependent from start args.
% If we want to reconfigure process on fly, we should change his start args (just like we do in React.js)
View type_mapper_SUITE.erl
all() ->
[{group, from_json}].
# How to prepare your linux box to run ARM64 images in docker
tar xf qemu-4.2.0.tar.xz
cd qemu-4.2.0
apt install -y bison flex build-essential libglib2.0-dev libpixman-1-dev qemu binfmt-support
./configure --target-list=aarch64-linux-user,arm-linux-user --static
View erl-23-socket-bug.erl
1> {ok, Socket} = gen_tcp:connect("localhost", 80, [binary, {active,false}, {packet,http},inet]),
1> ok = gen_tcp:send(Socket, "GET /crossdomain.xml HTTP/1.0\r\n\r\n"),
1> LoopHeaders = fun LoopHeaders(Len) ->
1> case gen_tcp:recv(Socket, 0) of
1> {ok, http_eoh} ->
1> inet:setopts(Socket, [{packet,raw}]),
1> Len;
1> {ok, {http_header,_,'Content-Length',_, Len_}} ->
1> LoopHeaders(list_to_integer(Len_));
View dvb_dummy_adapter.c
* Dummy DVB adapter driver
* Copyright (C) 2010 Andy Walls <>
* Partially based on cx18-dvb.c driver code
* Copyright (C) 2008 Steve Toth <>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
View events_sink.erl
-export([init/1, handle_info/2, handle_call/3, terminate/2]).
-define(RECHECK_INTERVAL, 200).
-define(ALLOWED_DELAY, 60000).
View events_router.erl
-export([init/1, handle_info/2, handle_call/3, terminate/2]).
-export([deliver/2, remote_deliver/1]).
-export([load_config/1, add_handler/1, remove_handler/1]).
View srtp.erl
%%% Copyright (c) 2012 Peter Lemenkov <>
%%% All rights reserved.
%%% Redistribution and use in source and binary forms, with or without modification,
%%% are permitted provided that the following conditions are met:
%%% * Redistributions of source code must retain the above copyright notice, this
%%% list of conditions and the following disclaimer.
View webrtc_view.erl
-module(webrtc_view). % Copy of webrtc_publish2
-export([init/3, terminate/3]).
View hds.html
<!DOCTYPE html>
<meta name="fragment" content="!" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf8">