View BasicServer.re
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) {
View ApolloWrapper.js
// @flow
import {Component, type Node} from 'react'
import authenticatedApolloClient from '../shared/authenticatedApolloClient';
/**
* Example usage:
*
* const ScreenWithLoader = (props) => <ApolloWrapper
* queryOptions={{
View gist:a5e0102c060b7a1b40525d41f87843a8
let module Styled = {
let module Create (Config: {
let name: string;
let style: ReactNative.Style.style;
}) => {
let component = ReasonReact.statelessComponent Config.name;
let make ::paddingVertical=? => {
let style = combineStylesSomeHow Config.style paddingVertical; /* <- this is an optional btw */
View.make ::style
View template-function-syntax.re
/* Template for proposals to update the syntax. Base template: https://gist.github.com/jordwalke/6935739b74eb9b8496670cc7860f5acf */
let a = 10;
let b = 20;
/* A */
let nonNamed = (a, b) => a + b;
type nonNamed = (int, int) => int;
View index.html
<html>
<head>
<title>onpaste</title>
</head>
<body>
<div id="root"></div>
<script>
const log = txt => {
const div = document.createElement('div')
document.body.appendChild(div)
View reboost
#!/usr/bin/env python
# Toss this in your ~/bin/ as ~/bin/reboost and `chmod +x ~/bin/reboost`
"""\
Usage:
reboost [cmd]
Commands:
first - follow upstream until just before master
last - follow downstreams all the way
up - go to parent
View about.md

Here's part of my ~/.gitconfig.global

[user]
	name = Jared Forsyth
...
[alias]
    # View the tree!
    tree = log --oneline --decorate --all --graph
    tr = log --oneline --decorate --all --graph
    t = log --color --date-order --graph --oneline --decorate --simplify-by-decoration --branches
View resultUtils.swift
import * from PackTypes.Result
let module P = PackTypes.Parsing
let rec getChild = (children, mapper) => switch children {
case []: None
case [child ...rest]: switch mapper(child) {
case None: getChild(rest, mapper)
case x: x
}
}
let rec getChildren = (children, mapper) => switch children {
View error.ml
type something = | Something 'a :something;
module type ChildType = {let makeSomething: int => something;};
let module MakeThing (ChildA: ChildType) (ChildB: ChildType) => {
type childArg = | A int | B int;
let doThing arg =>
switch arg {
| A n => ChildA.makeSomething 10
| B n => ChildB.makeSomething 5
View ReactNativeComponent.swift
public class ReactNativeComponent: UIViewController {
let callbacks: [Int]
let properties: [String: AnyObject]
let name: String
init(name: String, properties: [String: AnyObject], callbacks: [Int]) {
self.name = name
self.properties = properties
self.callbacks = callbacks