Skip to content

Instantly share code, notes, and snippets.

View StringInput.ts
import leven from 'leven';
import {Result, error, ErrorResult} from './ParserTypes';
export default class StringInput {
public readonly index: number;
public readonly value: string;
constructor(index: number, value: string) {
this.index = index;
this.value = value;
View package.json
"dependencies": {
"@databases/pg-test": "^0.0.1",
"jest": "^24.1.0"
"pg": {
"test": {
"migrationsScript": ["yarn", "migrations", "up"]

Getting Started

Install the GitHub App

To get started, you will need to install the GitHub App. This allows us to detect pull requests, comment on your pull requests with a preview of the change log, update build statuses, and trigger GitHub actions workflows if you use them for releases.


**Selector to choose between GitHub actions and Circel CI, styled somethign like **

View config.yml
# Config for graphql-code-generator
schema: ./schema.graphql
overwrite: true
- add: '/* tslint:disable */'
- add: '// This file was automatically generated and should not be edited.'
- add: import ResolverContext from '../ResolverContext';
View index.html
main {
width: 100%;
display: flex;
.column {
flex-basis: 0;
flex-grow: 1;
img {
View settings.json
"editor.fontFamily": "FiraCode-Regular, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"window.zoomLevel": 4,
"editor.formatOnSave": true,
"[html]": {
"editor.formatOnSave": false
"[json]": {
"editor.formatOnSave": false

Keybase proof

I hereby claim:

  • I am forbeslindesay on github.
  • I am forbeslindesay ( on keybase.
  • I have a public key ASBrPwWIE8YtNKrmxJFoff2yxrmSMF5GMwoVQUCChuxcvwo

To claim this, I am signing this object:

ForbesLindesay / iter.js
Last active Oct 20, 2017 — forked from nanot1m/iter.js
Push iterator
View iter.js
const Queue = require('then-queue'); // async queue that doesn't care what order you call push and pop.
const queue = new Queue();
// push sends to the first waiting `pop` if available, otherwise it acts as a buffer
listenToNewMessages(message => queue.push(message));
async function* MessagesGenerator() {
try {
while (true) {
View flow-error.js
type Children = {
children: void | Array<Children>
message: [MessageBlame, MessageBlame, MessageBlame, MessageBlame, MessageComment, MessageBlame]
type Extra = {
children: void | Array<Children>
message: [MessageBlame, MessageBlame, MessageBlame, MessageBlame, MessageComment, MessageBlame] | [MessageBlame, MessageBlame]
type FlowErrorDuplicateProvider = {
kind: "duplicate provider"
View cabbie jscodeshift.js
// Press ctrl+space for code completion
export default function transformer(file, api) {
const j = api.jscodeshift;
let source = file.source;
let root = j(source);
// remove "use strict"
root.find(j.ExpressionStatement).filter(path => (
path.value.expression.type === 'Literal' &&
You can’t perform that action at this time.