Skip to content

Instantly share code, notes, and snippets.

View toots's full-sized avatar

Romain Beauxis toots

View GitHub Profile
commit 51c3524d20c35d6c99c50243326ae0123f7ed1e8
Author: Romain Beauxis <toots@rastageeks.org>
Date: Sun Apr 2 10:11:54 2023 -0500
Test.
diff --git a/Makefile.defs.in b/Makefile.defs.in
index b90215e5..5614bad0 100644
--- a/Makefile.defs.in
+++ b/Makefile.defs.in
@toots
toots / dune
Last active October 6, 2022 00:03
(lang dune 3.2)
(using dune_site 0.1)
(package
(name repro-main)
(depends
(ocaml (>= 4.12.0))
dune-site)
(sites (share libs))
(synopsis "Repro main"))
@toots
toots / dune
Last active June 2, 2022 05:41
dune site crash test
(generate_sites_module
(module sites)
(sites test-dune-site))
(executable
(name test_dune_site)
(public_name test_dune_site)
(libraries dune-site)
(modules sites test_dune_site))
interface SearchContextType {
show: boolean
setShow: (_: boolean) => void
query: string
setQuery: (_: string) => void
}
const SearchContext = createContext<SearchContextType>({} as SearchContextType)
export const SearchProvider = ({ children }: { children: React.ReactNode }) => {
interface SearchContextType {
show: boolean
setShow: (_: boolean) => void
query: string
setQuery: (_: string) => void
}
const SearchContext = createContext<SearchContextType>({} as SearchContextType)
export const SearchProvider = ({ children }: { children: React.ReactNode }) => {
@toots
toots / discover.ml
Last active November 24, 2021 21:25
Test dune configurator with cross-compilers.
module C = Configurator.V1
let () =
C.main ~name:"test-dune-configurator" (fun c ->
let has_alsa =
C.c_test c
{|
#include <alsa/asoundlib.h>
int main() {
snd_pcm_t *pcm_handle;
@toots
toots / dune
Created July 31, 2021 06:40
Dune private lib issue
(library
(name test_private_lib)
(public_name test_private_lib)
(modules public)
(libraries private))
(library
(name private)
(package test_private_lib)
(modules private))
(executable
(name test)
(modules test)
(optional)
(libraries foo))
#!/bin/sh
SYSTEM=$1
CMD=$2
ARG=$3
if test "${SYSTEM}" = "mingw"; then
wine $CMD $ARG
elif test "${SYSTEM}" = "mingw64"; then
wine64 $CMD $ARG
open Ctypes
(** Ctypes routines for C type socklen_t. *)
type socklen
val socklen_t : socklen typ
val int_of_socklen : socklen -> int
val socklen_of_int : int -> socklen
(** Generic sockaddr_t structure. *)
module Sockaddr : sig