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 escript | |
-module(duplicate_socket_async_ref). | |
-mode(compile). | |
-export([main/1]). | |
main([]) -> | |
{ok, ListenSocket, ListenPort} = create_listen_socket(), | |
spawn_link(fun () -> run_socket_acceptor(ListenSocket) end), | |
try_reproducing_the_issue(ListenPort, 0). |
This file has been truncated, but you can view the full file.
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
%% -*- coding: utf-8 -*- | |
%% @private | |
%% Automatically generated, do not edit | |
%% Generated by gpb_compile version 4.13.0 | |
-module(test_pb). | |
-export([encode_msg/2, encode_msg/3]). | |
-export([decode_msg/2, decode_msg/3]). | |
-export([merge_msgs/3, merge_msgs/4]). | |
-export([verify_msg/2, verify_msg/3]). |
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
syntax = "proto3"; | |
package foobariots.shobblethrock; | |
message Foobar0 { | |
int64 a = 1; | |
string b = 2; | |
oneof c { |
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
check-makefile-indentation: | |
@awk '/^[[:space:]]/ && /^[^\t]/{print FILENAME":"FNR":"$$0}' \ | |
$(MAKEFILE_LIST) |
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(drift_test). | |
-export([run/1]). | |
run(Timeout) -> | |
MonoStartTs = erlang:monotonic_time(millisecond), | |
OsStartTs = os:system_time(millisecond), | |
receive | |
after | |
Timeout -> |
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
#!/bin/bash | |
sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl | |
sudo pip install virtualenvwrapper | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc |
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
Originally from: http://erlang.org/pipermail/erlang-questions/2017-August/093170.html | |
For a safe and fast Erlang SSL server, there's a few | |
configuration values you might want by default: | |
[{ciphers, CipherList}, % see below | |
{honor_cipher_order, true}, % pick the server-defined order of ciphers | |
{secure_renegotiate, true}, % prevent renegotiation hijacks | |
{client_renegotiation, false}, % prevent clients DoSing w/ renegs | |
{versions, ['tlsv1.2', 'tlsv1.1']}, % add tlsv1 if you must |
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(fatbin). | |
-export([generate/1]). | |
generate(Size) -> | |
generate(Size, 1024). | |
generate(Size, BlockSize) -> | |
NumOfBlocks = | |
case Size rem BlockSize of |
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 python3 | |
import json | |
import multiprocessing | |
import sys | |
import unicodedata | |
from collections import namedtuple | |
def run(): | |
print('Preparing work', file=sys.stderr) | |
groups = generate_groups() |
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
import select | |
import socket | |
import sys | |
tcp_ipA = sys.argv[1] | |
tcp_portA = int(sys.argv[2]) | |
tcp_ipB = sys.argv[3] | |
tcp_portB = int(sys.argv[4]) | |
NewerOlder