Skip to content

Instantly share code, notes, and snippets.

View brandonmp's full-sized avatar

brandon brandonmp

View GitHub Profile
@brandonmp
brandonmp / mimic-hover.js
Created July 20, 2017 02:28
mimic-dom-hover-event
const mimicHover = (ele/*: DOMNode*/) => {
var e = document.createEvent('MouseEvents');
e.initEvent('mouseover', true, false);
ele.dispatchEvent && ele.dispatchEvent(e);
}
@brandonmp
brandonmp / antd-react-animation-styles.css
Created April 11, 2018 22:59
animation css extracted from antd react
/* Even though we import all styles/js modularly, these
* global animation-related styles don't make it, so we add them separately. */
.move-up-appear,
.move-up-enter,
.move-up-leave {
-webkit-animation-duration: .2s;
animation-duration: .2s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-play-state: paused;
@brandonmp
brandonmp / gist:c8597bf7b48d308d57c19aaa32bfa8f6
Created November 18, 2018 02:27
retrieve schema from Segment dashboard
/*
When logged into Segment dashboard and looking at event schema for source, open dev tools and go to Apollo Dev Tools (chrome extension).
In GraphiQL run this query:
query getSourceData($workspaceSlug: String!, $sourceSlug: String!) {
me {
isAdmin
id
__typename
}