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
| /* | |
| * V4L2 video capture example | |
| * | |
| * This program can be used and distributed without restrictions. | |
| * | |
| * This program is provided with the V4L2 API | |
| * see http://linuxtv.org/docs.php for more information | |
| */ | |
| #include <stdio.h> |
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
| %% @doc This is a simple geo-dns server | |
| %% It takes existing erlang dns query parser and https://github.com/mochi/egeoip | |
| %% Here is no implemented database for path routing with some region affinity, | |
| %% so if you are going to use it, you need to implement following databases: | |
| %% 1) Domain -> existing servers | |
| %% 2) Country -> region | |
| %% 3) region -> existing server | |
| -module(gdns). | |
| -author("Max Lapshin <max@flussonic.com>"). | |
| -export([start_link/0]). |
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 | |
| Conflicts=getty@tty1.service | |
| [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
| -module(systemd). | |
| % This is what you need to adopt systemd in erlang | |
| % | |
| % Do whatever you want license. If you want, you can take this code under terms of MIT license. | |
| -export([ready/0, reloading/0, stopping/0, watchdog/0]). | |
| -export([start_link/0]). | |
| -export([init/1, handle_info/2, terminate/2]). |
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) | |
| % |
NewerOlder