Skip to content

Instantly share code, notes, and snippets.

View thehig's full-sized avatar

David Higgins thehig

  • Dublin, Ireland
View GitHub Profile
@thehig
thehig / ReduxInjector.js
Last active November 22, 2018 13:11
js: ReduxInjector
import { createStore, combineReducers } from 'redux';
import set from 'lodash/set';
import has from 'lodash/has';
let original_store = {};
let combine = combineReducers;
export function combineReducersRecurse(reducers) {
console.log('combineReducersRecurse', reducers);
// If this is a leaf or already combined.
@thehig
thehig / dnd_rulings.md
Last active October 21, 2018 21:54
md: D&D Rules and Rulings

Spellcasting

Material Components

  • If you have an arcane focus or component pouch it is assumed you have any material components necessary for spellcasting except if a material has a gp value, in which case you must have that Material Component in your inventory to cast the spell.

Combat

Name To Hit Damage
@thehig
thehig / screenshots.spec.js
Created September 19, 2018 12:33
js: Storyshots with multiple device/viewport puppeteer screenshots
import path from 'path';
import fs from 'fs';
import initStoryshots from '@storybook/addon-storyshots';
import { imageSnapshot } from './storyshots-puppeteer';
import devices from 'puppeteer/DeviceDescriptors';
// Store the screenshots outside the source folder to prevent jest from 'watching' them.
// Since they're outside the src directory we nav to them relatively
const ROOTDIR = path.join(__dirname, '../../../');
@thehig
thehig / dnd_acronyms.md
Created August 4, 2018 18:42
D&D Acronyms for new players

D&D Terms for New Players

Books

PHB Players Handbook
MM Monster Manual
DMG Dungeon Masters Guide
@thehig
thehig / Stylefile.yml
Last active August 2, 2018 11:20
Customizations for github.com via StyleURL.
---
version: 1.0
domains:
- github.com
url_patterns:
- github.com/*
timestamp: '2018-08-02T11:18:12Z'
id: wmfy
redirect_url: https://github.com/
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
@thehig
thehig / bookmarklet.js
Last active August 1, 2018 14:30
Show Scripts
// Show Script Bodies
javascript: (function() {
fetch(
"https://cdn.rawgit.com/thehig/2d754ff238d096f3e983bd62e5a94154/raw/showScriptBodies.js"
)
.then(response => response.text())
.then(text => eval(text));
})();
// Show Script Sources
@thehig
thehig / MyComponent.stories.js
Created April 25, 2018 14:16
js: Decorated Enzyme
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import {
storeDecorator,
paperDecorator
} from '../../../.storybook/decorators';
import { storySpec } from '../../../.storybook/storyTesting';
import { MyComponent } from './';
@thehig
thehig / ide_extensions.md
Last active October 18, 2017 12:50
tools: IDE Extensions

Sublime Text 3

  • AutoFileName
  • Babel
  • Better Coffeescript
  • DocBlockr
  • Emmet
  • Gist
  • JsPrettier

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one