Skip to content

Instantly share code, notes, and snippets.

View AdamMcCormick's full-sized avatar
🚂
Just chugging along.

Adam McCormick AdamMcCormick

🚂
Just chugging along.
View GitHub Profile
@AdamMcCormick
AdamMcCormick / modules.spec.js
Created August 18, 2018 22:54
Test Setup Example
/* eslint-env node, mocha, chai, chai-spies */
/* eslint max-nested-callbacks: ["error", 6] */
import chai from 'chai';
import spies from 'chai-spies';
import {
mapObjIndexed,
} from 'ramda';
@AdamMcCormick
AdamMcCormick / ScrollBarAdapter.jsx
Last active July 22, 2019 09:28 — forked from OrganicPanda/hacky-scrollbar-resize-listener.js
A sham that will throw a window resize event even when scrollbars are added/removed (this is not something the standard window resize event does). Tested in IE9+, Chrome & Firefox latest.
/**
* A drop-in component to listen for resizes or scroll-bar show/hide
*
* Based on https://gist.github.com/OrganicPanda/8222636
*/
import React from 'react'
var ScrollBarAdapter = React.createClass({
onResize() {