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
(executable | |
(name main) | |
(modules main) | |
(libraries bechamel bechamel-js)) | |
(rule | |
(targets eq.json) | |
(action | |
(with-stdout-to | |
%{targets} |
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
type bigstring = | |
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t | |
let length x = Bigarray.Array1.dim x [@@inline] | |
let to_int32 : | |
bigstring -> | |
(int32, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t = | |
fun ba -> | |
let len = length ba in |
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
open Rresult | |
let prefix = X509.Distinguished_name.[Relative_distinguished_name.singleton (CN "PTT")] | |
let cacert_dn = X509.Distinguished_name.(prefix @ [Relative_distinguished_name.singleton (CN "Ephemeral CA for PTT") ]) | |
let cacert_lifetime = Ptime.Span.v (365, 0L) | |
let cacert_serial_number = Z.zero | |
let run domain_name seed = | |
Domain_name.of_string domain_name >>= Domain_name.host >>= fun domain_name -> | |
let private_key = |
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
let compress stdin stdout = | |
let jsonm = Jsonm.encoder `Manual in | |
let o = Bigstringaf.create De.io_buffer_size in | |
let i = Bytes.create De.io_buffer_size in | |
let t = Bigstringaf.create De.io_buffer_size in | |
let stop = ref false in | |
let rec encode gz = function | |
| `Partial -> | |
let len = Bytes.length i - Jsonm.Manual.dst_rem jsonm in | |
Bigstringaf.blit_from_bytes i ~src_off:0 t ~dst_off:0 ~len ; |
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
open Rresult | |
open Opium | |
open Lwt.Infix | |
let always x _ = x | |
let index = | |
let open Tyxml.Html in | |
html | |
(head (title (txt "Index")) []) |
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
(* Une explication de [mimic] et de qu'il essaye de résoudre. | |
[mimic] est une toute petite librairie qui propose une ré-implementation | |
des méthodes virtuelles pour les modules. Dans un projet large tel que | |
Git ou Irmin, en gardant l'idée de l'abstraction du système requise pour | |
être compatible avec MirageOS, une question transcende tout les niveaux: | |
> comment abstraire le réseau ? | |
Dans le contexte spécifique Unix/<unistrd.h>, plusieurs fonctions existent |
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
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
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
type 'a t | |
val bind : 'a t -> ('a -> 'b t) -> 'b t | |
val return : 'a -> 'a t | |
val both : 'a t -> 'b t -> ('a * 'b) t | |
end | |
module Make (IO : IO) = struct | |
let run = | |
print_endline "Hello World!" ; |
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
(executable | |
(name main) | |
(libraries brr) | |
(modes js)) | |
(rule (copy main.bc.js main.js)) | |
(alias | |
(name app) | |
(deps main.js min.html)) |
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
open Lwt.Infix | |
let ( >>? ) x f = | |
x >>= function Ok x -> f x | Error err -> Lwt.return (Error err) | |
let getline queue = | |
let exists ~predicate queue = | |
let pos = ref 0 and res = ref (-1) in | |
Ke.Rke.iter | |
(fun chr -> |
NewerOlder