Skip to content

Instantly share code, notes, and snippets.

View evanplaice's full-sized avatar
🏠
Working from home

Evan Plaice evanplaice

🏠
Working from home
View GitHub Profile
@evanplaice
evanplaice / persistent-store.js
Created June 24, 2019 18:40
PersistentStore
import { PubSub } from './pubsub.js';
export class PersistentStore {
actions = new Map();
state = {};
events = new PubSub();
constructor(name, params = {}) {
this.name = name;
@evanplaice
evanplaice / Markdown.sublime-settings
Last active October 9, 2019 18:58
Sublime Settings
{
"extensions": [
"md"
],
"color_scheme": "Packages/Predawn/predawn-markdown.tmTheme",
"draw_centered": true,
"draw_indent_guides": false,
"trim_trailing_white_space_on_save": false,
"word_wrap": true,
"wrap_width": 80
@evanplaice
evanplaice / WebComponent
Last active October 4, 2019 04:40
VSCode WebComponent Snippets
"WebComponent": {
"prefix": "wc",
"body": [
"export class WC$1 extends HTMLElement {",
"",
"\tconstructor() {",
"\t\tsuper();",
"\t}",
"",
"\tasync connectedCallback() { }",
@evanplaice
evanplaice / Async-Test
Last active October 4, 2019 05:01
VSCode Tape.js Snippets
"Tape: Async Test": {
"prefix": "tape",
"body": [
"test('$1', async t => {",
"",
"\t$2",
"",
"\tt.end();",
"});"
],
@evanplaice
evanplaice / docker.log
Created October 21, 2019 01:26
Kuma - Setup Troubleshooting
Attaching to kuma_web_1, kuma_worker_1, kuma_kumascript_1, kuma_api_1, kuma_mysql_1, kuma_ssr_1, kuma_elasticsearch_1, kuma_redis_1
web_1 | [2019-10-21 01:18:17 +0000] [1] [INFO] Starting gunicorn 19.7.1
web_1 | [2019-10-21 01:18:17 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
web_1 | [2019-10-21 01:18:17 +0000] [1] [INFO] Using worker: meinheld.gmeinheld.MeinheldWorker
web_1 | [2019-10-21 01:18:17 +0000] [12] [INFO] Booting worker with pid: 12
web_1 | [2019-10-21 01:18:17 +0000] [14] [INFO] Booting worker with pid: 14
web_1 | [2019-10-21 01:18:17 +0000] [16] [INFO] Booting worker with pid: 16
web_1 | [2019-10-21 01:18:18 +0000] [17] [INFO] Booting worker with pid: 17
web_1 | /usr/local/lib/python2.7/site-packages/django/template/backends/jinja2.py:6: ImportWarning: Not importing directory '/app/jinja2': missing __init__.py
worker_1
@evanplaice
evanplaice / flat-iterative.js
Last active November 6, 2019 05:01
A collection of Array.flat() implementations in Javascript
/* eslint no-labels: 0 */
/**
* Flattens an array of nested arrays using iteration w/ O(n) time complexity
*
* @param {Array} array input array
* @returns {Array} the flattened array
*
* @example
* const result = flatIterative([1, [2, [3, [4]]]]);
* console.log(result);