Skip to content

Instantly share code, notes, and snippets.

View Raincal's full-sized avatar
💦

Raincal

💦
View GitHub Profile
import React, {
cloneElement,
useState,
useEffect,
useRef,
HTMLAttributes,
ReactElement
} from "react";
////////////////////////////////////////////////////////////////////////////////
@jaredly
jaredly / BasicServer.re
Created January 2, 2018 05:24
Simple Static File Server in Reason/OCaml
let recv = (client, maxlen) => {
let bytes = Bytes.create(maxlen);
let len = Unix.recv(client, bytes, 0, maxlen, []);
Bytes.sub_string(bytes, 0, len)
};
let parse_top = top => {
let parts = Str.split(Str.regexp("[ \t]+"), top);
switch (parts) {