Skip to content

Instantly share code, notes, and snippets.

Tom Wilson twilson63

Block or report user

Report or block twilson63

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@twilson63
twilson63 / README.md
Created Apr 29, 2019
Setup for Frontend Tests - tape - puppeteer - rollup
View README.md

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
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
twilson63 / README.md
Last active Jan 17, 2019
Sharing files with dat
View README.md

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 https://nodejs.org

@twilson63
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
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
twilson63 / README.md
Created Jul 3, 2018
Parcel and Hot Module Reloading for React
View README.md

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
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
twilson63 / README.md
Last active May 20, 2018
Creating an Express Project
View README.md

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.

Requirements

@twilson63
twilson63 / install.md
Created May 20, 2018
Install CouchDB Server on AWS using Bitnami and LetsEncrypt
View install.md

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

https://console.aws.amazon.com

You can’t perform that action at this time.