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 / app.js
Last active February 16, 2020 21:15
hyper boilerplate
const html = hyperx(hyperapp.h)
const model = 0
const click = model => model + 1
const actions = {click}
const view = (model, actions) => {
return html`
<div>
<h1>Clicked ${model}</h1>
<button onClick=${actions.click}>click</button>
</div>
@matthewstokeley
matthewstokeley / javascript-composition.js
Last active February 9, 2020 20:24
composition and javascript
// composition and javascript
// @todo review
// composition is often contrasted with inheritance as a mechanism for allowing different components,
// modules or classes to communicate. both inheritance and composition are considered highly coupled -
// composition is less coupled than inheritance.
// object-oriented composition with dependency injection
class Book {
@matthewstokeley
matthewstokeley / tsconfig.json
Created February 9, 2020 15:21
sample typescript config boilerplate
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es6",
"jsx": "react"
}
}
@matthewstokeley
matthewstokeley / modular-dependencies.config.toml
Created February 8, 2020 06:49
modular-dependencies-config-file-boilerplate
[application-framework]
framework = "vue"
[ci]
vendor = "circleci"
[component-tests]
framework = "storybook"
[development-environment]
@matthewstokeley
matthewstokeley / gist:0725ec2e6c01db12191e27d5fe063dcf
Last active February 5, 2020 16:35
node - express boot script
#! /usr/bin/bash
# @version 0.0.1
# @todo integrate with node-express-boilerplate
if [ config.js -e ]
then
touch config.js
fi
echo "ENV=DEVELOPMENT" >> config.js
@link https://docs.google.com/document/d/1OB_1yO1XKYvzI6Zy_tylGNcvfFh0vwDOPRN6EvN-HsQ
@matthewstokeley
matthewstokeley / gulpfile.js
Last active February 8, 2020 15:42
generic gulp boilerplate
/**
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* Gulpfile Boilerplate
*
* @version 0.0.1
*/
const gulp=require('gulp')
const env=require('./config.js')
@matthewstokeley
matthewstokeley / versioned-config-files.sh
Created January 27, 2020 21:24
Versioned Configuration Files
#! /usr/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Leibowitz Branding and Design
# Versioned and Environment-specific WP Config Script
#
# @version 0.0.1
CONFIG=config.js
@matthewstokeley
matthewstokeley / containerized-local-wp-development-env.sh
Last active February 5, 2020 01:28
Leibowitz Containerized Local WP Development Environment
#! /usr/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Containerized Local Wordpress Development Environment
#
# @version 0.0.1
CONFIG=config.js
## Docker-Compose Aliases
@matthewstokeley
matthewstokeley / modern-stylesheet-boot-script.sh
Last active February 8, 2020 15:42
Modern Stylesheet Boot Script
#! /usr/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Modern Stylesheet Build Environment
#
# @version 0.0.1
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#