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
open Base | |
open Lwt.Infix | |
module Arg = Caml.Arg | |
open Httpaf_lwt_unix | |
module Reqd = Httpaf.Reqd | |
module Request = Httpaf.Request | |
module Headers = Httpaf.Headers | |
module Response = Httpaf.Response | |
module Body = Httpaf.Body |
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
open Base | |
open Lwt.Infix | |
module Arg = Caml.Arg | |
open Httpaf_lwt_unix | |
module Reqd = Httpaf.Reqd | |
module Request = Httpaf.Request | |
module Headers = Httpaf.Headers | |
module Response = Httpaf.Response | |
module Body = Httpaf.Body |
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 Image = { | |
type channel_t = | |
Bigarray.Array2.t(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout); | |
type t = { | |
width: int, | |
height: int, | |
r_channel: channel_t, | |
g_channel: channel_t, | |
b_channel: channel_t, | |
}; |
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 Errors: { | |
type t; | |
type baseError = { | |
name: string, | |
info: string, | |
message: string | |
}; | |
type noHostAvailableError = { | |
name: string, | |
info: string, |
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 Errors = { | |
type t; | |
type errors = { | |
. | |
"_NoHostAvailableError": t, | |
"_ResponseError": t, | |
"_DriverInternalError": t, | |
"_AuthenticationError": t, | |
"_ArgumentError": t, | |
"_OperationTimedOutError": t, |
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
// Generated by BUCKLESCRIPT VERSION 1.9.2, PLEASE EDIT WITH CARE | |
'use strict'; | |
var Caml_missing_polyfill = require("stdlib/caml_missing_polyfill"); | |
function foo (x) { | |
if (x == 0) return null; | |
else if (x == 1) return 0; | |
return "bar"; |
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 EventEmitter = { | |
module Event = { | |
type t('e, 'v) = ..; | |
type t(_, _) += | |
| NewListener : t([>`EventEmitter], string) | |
| RemoveListener : t([>`EventEmitter], string); | |
type pkg = | |
| Pkg(t('e, 'v)): pkg; | |
}; | |
module Listener = { |
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
/* | |
Create server/client self-signed certificate/key (self signed, DONT ADD PASSWORD) | |
openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -keyout client-key.pem -out client-cert.pem | |
openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -keyout server-key.pem -out server-cert.pem | |
*/ | |
#include <stdio.h> |
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
/* | |
To the extent possible under law, Konstantin Olkhovskiy has waived | |
all copyright and related or neighboring rights to this snippet. | |
CC0 license: http://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
package main | |
import ( | |
"crypto/x509" |
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
local S = require("std") | |
-- some helper declarations | |
local size_t = uint64 | |
local LUA_TSTRING = 4 | |
local struct lua_State |
NewerOlder