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
propertyId | agentId | |
---|---|---|
1 | 123 | |
2 | 333 |
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
/* Use Reason's ability to define recursive types with the `and` keyword */ | |
type movie = { | |
id: option(string), | |
name: option(string), | |
rating: option(Js.null(string)), | |
runTime: option(Js.null(int)), | |
actors: option(list(actor)), | |
} | |
and actor = { | |
id: option(string), |
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
module StringContext = | |
Context.MakePair({ | |
type t = string; | |
let defaultValue = "Awesome"; | |
}); | |
let component = ReasonReact.statelessComponent("Tree"); | |
let make = _children => { |
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
FROM ocaml/opam2:alpine-3.7-ocaml-4.06 | |
RUN sudo apk --no-cache add ca-certificates | |
RUN sudo apk add --update m4 openssh-client | |
# Setup SSH. | |
RUN mkdir -p ~/.ssh | |
ARG SSH_PRIVATE_KEY | |
RUN echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa | |
RUN chmod 600 ~/.ssh/id_rsa | |
RUN printf "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config |
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
pre-install-commands: | |
["opam-bin-cache.sh" "restore" build-id name] {?build-id} | |
wrap-build-commands: [ | |
["opam-bin-cache.sh" "wrap" build-id] {?build-id} | |
["%{hooks}%/sandbox.sh" "build"] {os = "linux"} | |
] | |
wrap-install-commands: [ | |
["opam-bin-cache.sh" "wrap" build-id] {?build-id} | |
["%{hooks}%/sandbox.sh" "install"] {os = "linux"} | |
] |
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
const I = x => x; | |
const K = x => y => x; | |
const A = f => x => f(x); | |
const T = x => f => f(x); | |
const W = f => x => f(x)(x); | |
const C = f => y => x => f(x)(y); | |
const B = f => g => x => f(g(x)); | |
const S = f => g => x => f(x)(g(x)); | |
const P = f => g => x => y => f(g(x))(g(y)); | |
const Y = f => (g => g(g))(g => f(x => g(g)(x))); |
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
brew install readline | |
brew link --force readline | |
brew unlink postgresql | |
brew install postgreql | |
#should include readline | |
otool -L `which psql` |
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
// Here is a function that I use all the time when creating public | |
// async APIs in JavaScript: | |
const resolvePromise = (promise, callback) => { | |
if (callback) | |
promise.then(value => callback(null, value), callback) | |
return promise | |
} | |
// Sometimes I like to use callbacks, but other times a promise is |
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
import React from 'react'; | |
const toPromise = (load) => (new Promise((resolve) => ( | |
load(resolve) | |
))); | |
class LazilyLoad extends React.Component { | |
constructor() { | |
super(...arguments); |
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
import * as Ensure from '../../../../utils/lib/Ensure' | |
import markdownBlockDelimiter from './markdownBlockDelimiter' | |
import {BlockTypes, BlockTypeRegExps} from './Types' | |
import { | |
CharacterMetadata, | |
ContentState, | |
ContentBlock, | |
EditorState, | |
genKey, | |
} from 'draft-js' |