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 String | |
(* Author: Alain Frisch, from ocaml PR 626 *) | |
let rec split_limit sep s len i0 i acc lim = | |
if i = len then | |
List.rev (sub s i0 (i - i0) :: acc) | |
else if unsafe_get s i = sep then | |
let acc = sub s i0 (i - i0) :: acc in | |
if lim = 1 then | |
List.rev (sub s (i + 1) (len - i - 1) :: acc) |
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
(* Ad comment to https://github.com/ocaml/ocaml/pull/722 | |
* | |
* E.. Everything indented to even columns. | |
* O.. Patterns indented to odd columns, the rest to even columns. | |
* .L. Loose layout, delimiters above and below cases. | |
* .C. Compact layout, end delimiter attached to last case. | |
* ..P Delimited with parentheses, as allowed by the current syntax. | |
* ..B Delimited with brackets, as in the PR. | |
* .XX Pointed form. | |
*) |
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
[Unit] | |
Description=OCSIGEN Server Instance | |
After=network.target | |
[Service] | |
EnvironmentFile=/etc/sysconfig/ocsigen-%i | |
User=ocsigen | |
ExecStart=/usr/local/bin/opam-env ${OPAMSWITCH} ocsigenserver -c /etc/ocsigen/%i-${OPAMSWITCH}.conf | |
ExecStop=/usr/bin/echo shutdown >/var/run/ocsigen/%i-command.pipe | |
ExecReload=/usr/bin/echo reload >/var/run/ocsigen/%i-command.pipe |
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 | |
OPAMSWITCH="$1" | |
shift | |
export PATH="/opt/opam/$OPAMSWITCH/bin:$PATH" | |
export CAML_LD_LIBRARY_PATH=/opt/opam/$OPAMSWITCH/lib/stublibs | |
exec "$@" |
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 | |
set -e | |
if [ -r /etc/opam-deploy.conf ]; then | |
. /etc/opam-deploy.conf | |
fi | |
rsync_options="-rlptD --delete" | |
backlog=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
open Xword.Types | |
open Lwt.Infix | |
type coords = { x : int; y : int } | |
module Model = struct | |
open Cursor | |
type t = { | |
xw : xword; |
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
type 'a io = 'a Lwt.t | |
type ic = Lwt_io.input_channel | |
type oc = Lwt_io.output_channel | |
type tls_lib = [`OpenSSL | `Native] | |
module X509_key : sig | |
type t = private { | |
key: string; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(* guestfs-inspection | |
* Copyright (C) 2009-2017 Red Hat Inc. | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty 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
#include <mariadb/mysql.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <poll.h> | |
static int wait_for_mysql(MYSQL *mysql, int status) { | |
struct pollfd pfd; | |
int timeout, res; | |
pfd.fd = mysql_get_socket(mysql); |
OlderNewer