Skip to content

Instantly share code, notes, and snippets.

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;
}
{
"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.

INSTALL CTA GOES HERE

**Selector to choose between GitHub actions and Circel CI, styled somethign like https://twitter.com/steveschoger/status/1024720091546562560/photo/1 **

# Config for graphql-code-generator
schema: ./schema.graphql
overwrite: true
generates:
./__generated__/types.ts:
plugins:
- add: '/* tslint:disable */'
- add: '// This file was automatically generated and should not be edited.'
- add: import ResolverContext from '../ResolverContext';
<style>
main {
width: 100%;
display: flex;
}
.column {
flex-basis: 0;
flex-grow: 1;
}
img {
@ForbesLindesay
ForbesLindesay / settings.json
Created September 14, 2018 10:56
VSCode Settings
{
"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 (https://keybase.io/forbeslindesay) on keybase.
  • I have a public key ASBrPwWIE8YtNKrmxJFoff2yxrmSMF5GMwoVQUCChuxcvwo

To claim this, I am signing this object:

Deploying a static website to Amazon S3 with express stop and mandate.

There are two key points I want to get across in this blog post.

  1. Dynamic websites are always easier to build than the equivallent static ones
  2. Automate everything that has to be done more than once

STOP

Dynamic Websites are Easier to Build

@ForbesLindesay
ForbesLindesay / iter.js
Last active October 20, 2017 18:11 — forked from nanot1m/iter.js
Push iterator
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) {
@ForbesLindesay
ForbesLindesay / microdata.js
Last active April 18, 2017 06:54
Parse schema.org style microdata
var request = require('request');
//Decode HTML entities:
var decode = require('ent').decode;
//todo: fix this
var ISO8601 = undefined;
var htmlparser = require('htmlparser');
function parse(domstr) {