Skip to content

Instantly share code, notes, and snippets.


Tom Wilson twilson63

View GitHub Profile
twilson63 /
Created Apr 29, 2019
Setup for Frontend Tests - tape - puppeteer - rollup

Testing Front End code

Testing front end code using rollup, tape-modern, and puppeteer.

These are just some notes for me to write down so that I have a good cheatsheet to set this up in the future.

Using rollup to build front end code is the way to go, it is small and provides tree shaking and the plugins are easy to manage. Using rollup to build a test bundle and using puppeteer to run the test bundle will create a chromium head browser and give you similar results as if you are running it in the browser.

Getting started

twilson63 / settings.json
Created Mar 28, 2019
My VS Code settings.json
View settings.json
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.cursorStyle": "underline-thin",
"editor.hover.delay": 1000,
"editor.lightbulb.enabled": false,
"editor.matchBrackets": false,
"editor.renderLineHighlight": "none",
"editor.formatOnSave": true,
View .vimrc
call plug#begin('~/.vim/plugged')
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'drewtempelmeyer/palenight.vim'
Plug 'jxnblk/vim-mdx-js'
call plug#end()
twilson63 /
Last active Jan 17, 2019
Sharing files with dat

Sharing Files with dat

The datproject is a p2p protocol that enables users to exchange information without having to use a centralized platform, as long as you have an internet connection, you can use the dat protocol.

In this post, we will walk through sharing files using the dat cli.

How to install the dat cli

First you will need NodeJS, you can download and install node from

twilson63 / deploy.js
Last active Oct 31, 2018
Deploying API Server and React Client using now
View deploy.js
const colors = require("colors");
const shell = require("shelljs");
if (!shell.which("now")) {
return console.log("exited: now is not installed - npm install now -g");
if (!shell.which("json")) {
return console.log("exited: json is not installed - npm install json -g");
twilson63 / create.js
Last active Jul 11, 2018
Basic React App Setup Script
View create.js
const shell = require("shelljs");
const fs = require("fs");
const project = process.argv[2] || "app";
shell.echo("Installing code extensions...");
shell.exec("code --install-extension esbenp.prettier-vscode");
shell.exec("code --install-extension dbaeumer.vscode-eslint");
shell.echo("Create React Project " + project);
twilson63 /
Created Jul 3, 2018
Parcel and Hot Module Reloading for React

Note to Self

React HMR using Parcel

Enabling HMR for React using Parcel steps:

  1. Install dev dependencies
yarn add babel-preset-env babel-preset-react babel-plugin-transform-class-properties --dev
twilson63 / app.js
Last active May 25, 2018
Swagger Example
View app.js
* @swagger
* /profiles/:
* post:
* description: "Description here"
* parameters:
* - name: FHIRBundle
* in: body
* required: true
* schema:
twilson63 /
Last active May 20, 2018
Creating an Express Project

Node Express Setup

This setup should be converted to a cli when it becomes stable.

Use Case

To create an express web application with common tools and middleware.


twilson63 /
Created May 20, 2018
Install CouchDB Server on AWS using Bitnami and LetsEncrypt

How to install CouchDB on AWS in 5 minutes

Install CouchDB

Create an AWS Account, then open the console at EC2 and launch a bitnami couchdb

  • Create an aws account