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 / 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 / avrae-cheat-sheet.md
Last active February 10, 2023 14:05
md: Cheat sheet for using Avrae Discord bot with D&D Beyond

Avrae Cheat Sheet

Get Avrae bot here

Note: Some servers use ! as the "command" identifier. In my server, and in this document, I use /. This character can be changed using the command /prefix <prefix> (eg: !, #, $, !!, /)

Setup & Character Management

Command Description Notes
@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 / Github Projects Collapse.js
Created May 23, 2022 11:49
[tampermonkey] Github Projects Collapse
// ==UserScript==
// @name Github Projects Column Collapse
// @namespace https://github.com/thehig/tampermonkey_github_projects
// @version 0.6
// @description Collapse empty columns on Github Projects Kanban Boards
// @author David Higgins
// @match https://github.com/*/*/projects/*
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==
@thehig
thehig / .gitconfig
Last active July 6, 2021 10:38
git: gitconfig aliases
[alias]
# Show last commits in nice format
last = log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=relative
# https://stackoverflow.com/questions/17195861/undo-git-update-index-assume-unchanged-file#17195901
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
# https://stackoverflow.com/questions/2363197/can-i-get-a-list-of-files-marked-assume-unchanged#37083903
unhide-all = update-index --really-refresh
hidden = !git ls-files -v | grep \"^[a-z]\"
@thehig
thehig / aggregateDebounce.js
Last active December 7, 2020 07:37
js: Aggregate Debounce
/*
Client wishes to emit a number of actions
Actions are identical RSAAs, with varying meta properties (usually the ID to request)
Ideal scenario
* Numerous actions are taken in within a timeout/debounce window
* After the timeout has expired, the actions are aggregated into a single API call
dispatch({
type: "SOME_FETCH_REQUEST",
@thehig
thehig / spoonday.md
Created June 16, 2020 22:11
md: 5 steps to managing a 🥄spooney🥄 day

5 steps to managing a 🥄spooney🥄 day

A list of things I tell my spooney wife regularly enough she asked me to write it down. 🤷‍♂️

  1. Obligatory self-care
  2. Self-assessment
  3. Other-assessment
  4. Self-discipline
  5. Obligatory self-care 6. Future self-care
@thehig
thehig / WWIII starts the Great Expansion.md
Created August 24, 2019 19:25
🔬: WWIII starts the Great Expansion

World War III starts the Great Expansion

Tone Icon
Dark
Light
@thehig
thehig / sc2-archon.md
Last active June 24, 2019 20:23
sc2: Archon Mode

Archon Mode

IF THEN
Enemy Fast Expanding 3x Reaper Sneak Attack
@thehig
thehig / Crit-Fumble.md
Last active June 18, 2019 16:27
D&D: Crit/Fumble Table

CRITICAL HIT TABLE (NATURAL 20 ONLY)

Note: Regaining a spell slot applies only when casting a spell that involved using a spell slot. The spell slot regained is of a level lower than the original spell was cast, and can be at maximum a 5th level Spell Slot.

d100 DICE EFFECTS
0-15 2x 1 ON DMG DICE COUNTS AS MAX DMG
16-30 " 1 ON DMG DICE COUNTS AS MAX DMG
31-45 " FREE ATTACK WITH SAME WEAPON (OR REGAIN SPELL SLOT)
46-60 " TARGET FUMBLES