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
type None = null | undefined; | |
export class Maybe<T> { | |
private _value: T | undefined; | |
public constructor(value: T | None) { | |
this._value = value === null ? undefined : value; | |
} | |
public value(): T | undefined { |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"module": "esnext", | |
"strict": true, | |
"jsx": "preserve", | |
"importHelpers": true, | |
"moduleResolution": "node", | |
"experimentalDecorators": true, | |
"esModuleInterop": true, |
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
Run options: | |
include {:focus=>true} | |
exclude {:compat=>true} | |
All examples were filtered out; ignoring {:focus=>true} | |
Running with ActiveRecord 5.2.1 | |
..........................................................................................................................................................................F..............F......F..F...F....FFF.................F............F....F........F.......FF...FF............ | |
Failures: |
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
openapi: 3.0.0 | |
info: | |
title: MyAPI | |
description: MY API | |
version: 0.0.0 | |
servers: | |
- url: http://localhost:8080/api/ | |
paths: | |
/example: | |
get: |
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
openapi: 3.0.0 | |
info: | |
title: MyAPI | |
description: MY API | |
version: 0.0.0 | |
servers: | |
- url: http://localhost:8080/api/ | |
paths: | |
/example: | |
get: |
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 create = ({ | |
shouldBackoff, | |
factor = 5, | |
maxDelay = 32000, | |
maxAttempts = 20 | |
}) => { | |
const backoff = attempt => { | |
const randomMs = Math.floor(Math.random() * 1000); | |
const exponential = Math.pow(factor, attempt) + randomMs; | |
const delay = Math.min(exponential, maxDelay); |
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
<html> | |
<head> | |
<title>Apollo Query Reproduction</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<div id="app"> | |
<h1>These are the headers that get sent along:</h1> | |
</div> |
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 fs = require('fs'); | |
const path = require('path'); | |
const { CLIEngine } = require('eslint'); | |
const readline = require('readline-sync'); | |
const cli = new CLIEngine({ | |
parser: 'babel-eslint', | |
useEslintrc: false, | |
plugins: ['react'], | |
rules: { 'react/prop-types': ['error', {}] } |
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'; | |
import PropTypes from 'prop-types'; | |
import { set, get } from 'lodash/fp'; | |
/** | |
* This is a copy-pasta job of Formik's Field component. It's needed in | |
* order to handle nested values. Future versions of formik will support | |
* this. | |
*/ |
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
class After < Struct.new(:text) | |
def call | |
text.gsub(Model::FIXES[0], 'saved_change_to_\1?') | |
.gsub(Model::FIXES[1], '\1_before_last_save') | |
end | |
end | |
class Before < Struct.new(:text) | |
def call | |
text.gsub(Model::FIXES[0], 'will_save_change_to_\1?') |