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
$ diff -r otp-OTP-19.3.6.5 erlang-otp-6356f67 | |
diff -r otp-OTP-19.3.6.5/lib/inets/examples/httpd_load_test/hdlt_ssl_client_cert.pem erlang-otp-6356f67/lib/inets/examples/httpd_load_test/hdlt_ssl_client_cert.pem | |
1c1,31 | |
< ../../test/httpc_SUITE_data/ssl_client_cert.pem | |
\ Наприкінці файла немає нового рядка | |
--- | |
> -----BEGIN RSA PRIVATE KEY----- | |
> MIICXQIBAAKBgQCTFBPkOO98fDY3j6MIxIGKp+rampfIay50Lx4+EnCnRSSVwC+n | |
> 0VVmP7V5SGFJpuXJzN0hvqPUWOOjiMTNlNRaGy0pqu2oMXWAPLOxHWL1wT53h2Zr |
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
% Send plaintext email using gen_smtp https://github.com/Vagabond/gen_smtp | |
% This function sends email directly to receiver's SMTP server and don't use MTA relays. | |
% | |
% Example plaintext email: | |
% Mail = mail_plain(<<"Bob <sender@example.com>">>, <<"Alice <receiver@example.com>">>, <<"The mail subject">>, <<"The mail body">>), | |
% send_email(Mail). | |
% | |
% Example email with image attachment: | |
% ImgName = "image.jpg", | |
% {ok, ImgBin} = file:read_file(ImgName), |
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
#!/usr/bin/env tarantool | |
local pickle = require('pickle') | |
local yaml = require('yaml') | |
function trivec(str) | |
str = string.lower(str) | |
local vec = "" |
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
% there are 52-53 weeks in the year | |
% http://www.whatweekisit.org/calendar-2020.html | |
% date to week number in year | |
> calendar:iso_week_number({2020,1,1}). | |
{2020,1} | |
> calendar:iso_week_number({2019,12,31}). | |
{2020,1} |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE BlockArguments #-} | |
module Main where | |
import Database.PostgreSQL.Simple (Connection, ConnectInfo (..), Only (..), | |
defaultConnectInfo, connect, query_, close) | |
import Data.Pool (Pool, createPool, withResource, destroyAllResources) |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Database.PostgreSQL.Simple (Connection, ConnectInfo (..), Only (..), | |
defaultConnectInfo, connect, query_, close) | |
import Data.Pool (Pool, createPool, withResource, destroyAllResources) | |
import Control.Concurrent (forkIO, threadDelay) |
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(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 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
n = int(input()) | |
matrix = [['.']*n]*n | |
for i in range(0,n): | |
for j in range(0,n): | |
if i == j : | |
matrix[i][j] = '*' | |
print(matrix[i][j],sep='',end=' ') | |
print('') | |
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
.TH n2o 1 "n2o 4.5.0" "Synrc Research Center" "N2O" | |
.SH NAME | |
n2o \- Protocol and Application Server | |
.SH INTRO | |
.LP | |
The | |
\fIn2o\fR\&defines the way you create, configure and run | |
arbitrary applications and protocols inside some hosts, into | |
which N2O can be injected, such as |
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
%% посмотреть во что компилится макрос | |
iex(14)> defmodule T do | |
...(14)> def f(fun, arg), do: apply(String, :"#{fun}", [arg]) | |
...(14)> end |> elem(2) |> :beam_lib.chunks([:abstract_code]) |> elem(1) |> elem(1) |> get_in([:abstract_code]) |> elem(1) |> :erl_syntax.form_list |> :erl_prettypr.format |> IO.puts | |
warning: redefining module T (current version defined in memory) | |
iex:14 | |
-file("iex", 14). |
NewerOlder