Skip to content

Instantly share code, notes, and snippets.

View fakenickels's full-sized avatar
💭
hello this is a mic test, are you listening

Gabriel fakenickels

💭
hello this is a mic test, are you listening
View GitHub Profile
{
"name": "app",
"namespace": true,
"refmt": 3,
"reason": {
"react-jsx": 3
},
"bs-dependencies": [
],
const field = ({name, type, resolver}) => {
return {
name,
stringifyResponse: type,
getFieldValue: resolver,
}
}
let schema = field({})
open Graphql_lwt;
type role =
| Admin
| User;
type user = {
id: int,
name: string,
role,
type file = {
.
"path": string,
"data": string,
"mime": string,
"size": int,
};
type currentImage = {
.
@fakenickels
fakenickels / machine.js
Last active November 29, 2019 19:46
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
module type SERIALIZABLE = sig
type t
val to_string: t -> string
val of_string: string -> t
end;;
implicit module SInt : SERIALIZABLE with type t = int = struct
type t = int
let to_string = string_of_int
let of_string = int_of_string
@fakenickels
fakenickels / machine.js
Created October 23, 2019 13:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
Prysmian
Connect to ModBus
next -> Read register
Read register
next -> Calculate matrix
Calculate matrix
next -> Write matrix to PLC
Write matrix to PLC
next -> Process preform idle state
Process preform idle state
module Region = {
[@bs.deriving abstract]
type t = {
latitude: float,
longitude: float,
latitudeDelta: float,
longitudeDelta: float,
};
};