Skip to content

Instantly share code, notes, and snippets.

View jwill9999's full-sized avatar
💭
working

Jason Williams jwill9999

💭
working
View GitHub Profile
@jwill9999
jwill9999 / README.md
Last active November 22, 2018 15:50
Graphql Node Setup

Set up Graphql Node Server

  1. In index.js/server.js add an end point for graphql
const graphqlHTTP = require('express-graphql');
const schema = require('./schema/schema');
@jwill9999
jwill9999 / package.json
Last active November 22, 2018 15:07
Quokka Create-React-App
{
"quokka": {
"babel": {
"presets": ["react-app"]
},
"plugins": [
"jsdom-quokka-plugin"
]
}
}
@jwill9999
jwill9999 / README.md
Created October 28, 2018 23:30
React typescript command

React Typescript create react app

create-react-app my-app --scripts-version=react-scripts-ts

Generate vscode react typescript snippets / Extension

vscode-react-typescript

article

@jwill9999
jwill9999 / Dockerfile
Last active October 25, 2018 21:52
docker in production and testing
FROM drupal:8.5
RUN apt-get update && apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
# this next part was corrected in 2018 to be more clear on how you'd typically
# customize your own theme. first you need to clone the theme into this repo
# with something like downloading the lastest theme for bootstrap
# https://www.drupal.org/project/bootstrap and extract into themes dir on host.
@jwill9999
jwill9999 / README.md
Last active October 25, 2018 21:35
docker dev environment files

Instructions

In development you must use a file based secret however in production this can be set to use the

docker secret create [OPTIONS] SECRET [file|-]

In production swarm / stack docker-compose file below.

@jwill9999
jwill9999 / vim_cheatsheet.md
Created October 8, 2018 17:40 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@jwill9999
jwill9999 / .eslintrc
Last active September 23, 2018 21:57
Eslint and Prettier configuration for JavaScript VSCode
module.exports = {
"env": {
"mocha": true
},
"extends":[
"airbnb-base",
"prettier"
],
"plugins": [
@jwill9999
jwill9999 / CustomPage.js
Last active September 20, 2018 02:27
Puppeteer setup using Proxys
const puppeteer = require('puppeteer');
/**************************************************
SETUP CLASS USING PROXYS FOR PUPPETEER
***************************************************/
class CustomPage {
@jwill9999
jwill9999 / test.js
Created September 19, 2018 16:29
Simple assertion test function
/*===========================================
assertion function
=============================================*/
function test(str, bool) {
console.log(
bool ? '\x1b[32m' : '\x1b[31m',
bool ? '[PASS]' : ' [FAIL]',
str
)
}
@jwill9999
jwill9999 / README.md
Last active November 4, 2019 15:35
Git Branch create and push new branches

> Create a new branch:

git checkout -b feature_branch_name

> Push your branch to the remote repository:

git push -u origin feature_branch_name

> To delete a local branch

git branch -d the_local_branch