Skip to content

Instantly share code, notes, and snippets.

Avatar

Yang He abruzzihraig

View GitHub Profile
@abruzzihraig
abruzzihraig / attach-events.js
Last active Jun 18, 2016 — forked from idiotWu/attach-events.js
attach-events decorator for react
View attach-events.js
/**
* @decorator
* Attach events to DOM element
*
* @param {Element|Function} elemOrFunc: DOM Element, or a function returns element
* @param {String} events: a list events separated with ','
* @param {String} preventDecorator: prevent decorate when it doesn't need
*
* Usage:
* @attachEvents(window, 'click')
@abruzzihraig
abruzzihraig / jsdoit.css
Created Jan 23, 2018 — forked from obenjiro/jsdoit.css
Canvas Conical Gradient
View jsdoit.css
body {
margin: 0;
padding: 0;
background-color: #fff;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAANUlEQVQ4jWM8c+bMfwY8wNjYmBGfPBM+SWLAqAGDwQDG///xJgOGs2fP4lUw8F4YNYAKBgAA2NYKfxDn4ZUAAAAASUVORK5CYII=);
overflow: hidden;
}
You can’t perform that action at this time.