Skip to content

Instantly share code, notes, and snippets.

View matthewstokeley's full-sized avatar
🎯
Focusing

Matthew Stokeley matthewstokeley

🎯
Focusing
View GitHub Profile
@matthewstokeley
matthewstokeley / isolated-development.sh
Last active March 22, 2020 15:01
isolated-development
# Isolated Development Environment Installation
# Poor man's storybook for scripts, with glitch
# https://www.lucidchart.com/invitations/accept/d77e6095-bd82-41af-a9cf-a48e056f39ee
# tl;dr
# Problem:
# `return _cache( new Symbol( key ) )` should have been `return ( typeof key === 'Symbol' ) ? _cache( key ) : _cache( new Symbol( key ) )
https://docs.google.com/spreadsheets/d/1K4XK94PdH4l4NSHVMnh04ht0ZktJ70EG_4pfPpaSVbI/edit?usp=sharing
@matthewstokeley
matthewstokeley / key-lookup-strategies.js
Last active April 28, 2020 14:49
Key Lookup Strategies
// 0.0.2
type Key: Symbol | String
type KeyClosure: Function( str: String ): Key
// Symbol Strategy
export var symbolKeyHandler = function symbolKeyHandler(
_cache: Function
): KeyClosure {
@matthewstokeley
matthewstokeley / transpiler-installation.sh
Created March 3, 2020 01:22
configuration file population, modular dependencies and modular task workflows
#! /usr/bin/node
/* ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
* Bootload a Transpiling Environment
*
* @version 0.0.2
*/
/* ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
* Declare Modules
@matthewstokeley
matthewstokeley / express-jade-container
Last active March 1, 2020 16:03
containerized node development for express jade
#! /usr/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Containerized Express/Jade Development Environment
#
# This file implements a configuration workflow that allows for
# .env population and versioning of a composition file by
# ignoring the secrets file and separating the pre-populated composition file
# into a repo outside of the development environment.
#
#! /usr/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Containerized Node Development Environment
#
# @version 0.0.2
CONFIG=secret.env
COMPOSE=docker-compose.yml
@matthewstokeley
matthewstokeley / docker-compose.yml
Last active February 29, 2020 00:59
node docker compose file
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: "******"
https://drive.google.com/file/d/1Cz3WcOzeUX6tT6yaIcQnzLqTNtLkH3RC/view?usp=sharing
@matthewstokeley
matthewstokeley / inversion-of-control-poc.js
Last active April 15, 2020 01:44
inversion of control pattern for object-oriented javascript
// the simplest possible example of inversion of control
class IOC
{
/*
* @type {string}
*/
classProperty: 'hello world'
constructor(/** Function */ fn) {