This file contains hidden or 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(otel). | |
-include_lib("kernel/include/logger.hrl"). | |
-include_lib("corelib/include/corelib_openapi.hrl"). | |
-export([start_trace/0, start_trace/1]). | |
-export([end_trace/0]). | |
-export([start_span/0, start_span/1]). | |
-export([end_span/0, end_span/1]). | |
-export([setattrs/1, setname/1]). | |
-export([get_context/0, set_context/1]). |
This file contains hidden or 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(c2_schema). | |
-include_lib("kernel/include/logger.hrl"). | |
-export([json2config/1, json2config/2]). | |
-record(ctx, { | |
drop_unknown, | |
fill_defaults, | |
allow_miss_mandatory, | |
allow_forced_undefined, |
This file contains hidden or 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
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <erl_nif.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <fcntl.h> | |
static ErlNifResourceType* shmem_resource; |
This file contains hidden or 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
[Unit] | |
Description=WFB-CLI on tty1 | |
After=getty.target | |
[email protected] | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/wfb-cli gs | |
ExecStop=/bin/kill -HUP ${MAINPID} |
This file contains hidden or 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
\documentclass[a4paper,11pt]{article} | |
\usepackage[T2A]{fontenc} | |
\usepackage[utf8]{inputenc} | |
\usepackage{cmap} % для кодировки шрифтов в pdf | |
$if(listings)$ | |
\usepackage{listings} | |
\newcommand{\passthrough}[1]{#1} | |
$endif$ |
This file contains hidden or 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
#!/usr/bin/env escript | |
%% | |
%%! -env ERL_LIBS _build/default/lib | |
main(Args) -> | |
inet_db:set_lookup([file, dns]), | |
inet_db:add_host({127,0,0,1}, ["server.l"]), | |
ensure_epmd_is_working(), | |
Names = case net_adm:names("server.l") of | |
{error, _} -> []; |
This file contains hidden or 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(reconfigurable_supervisor_SUITE). | |
-compile(nowarn_export_all). | |
-compile(export_all). | |
% 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) | |
% |
This file contains hidden or 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(type_mapper_SUITE). | |
-compile(nowarn_export_all). | |
-compile(nowarn_unused_record). | |
-compile(nowarn_unused_type). | |
-compile(export_all). | |
-compile({parse_transform,type_mapper}). | |
all() -> | |
[{group, from_json}]. |
This file contains hidden or 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/sh | |
# How to prepare your linux box to run ARM64 images in docker | |
# https://codepyre.com/2019/12/arming-yourself/ | |
wget https://download.qemu.org/qemu-4.2.0.tar.xz | |
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 |
This file contains hidden or 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
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> | |
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_)); |
NewerOlder