View gist:82ea6fe3959a7d0879af
looper = eval('(function () { return \ | |
function ' + (request.name ? request.name + 'Looper' : 'looper') + ' (timestamp, startTime) { \ | |
if (_locks.global || _locks[request.namespace] || _locks[request._fid]) return; \ | |
\ | |
request(timestamp, startTime); \ | |
} \ | |
})()'); |
View index.js
function getScrollTop() { | |
return (isBlink || isSafari || isEdge) ? document.body.scrollTop | |
: document.documentElement.scrollTop; | |
} | |
function setScrollTop(scrollTop) { | |
if (isBlink || isSafari || isEdge) { | |
document.body.scrollTop = scrollTop; | |
} else { | |
document.documentElement.scrollTop = scrollTop; |
View index.js
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera) | |
isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
// Firefox 1.0+ | |
isFirefox = typeof InstallTrigger !== 'undefined'; | |
// At least Safari 3+: "[object HTMLElementConstructor]" | |
isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; | |
// At least IE6 | |
isIE = /*@cc_on!@*/false || !!document.documentMode; | |
// Edge | |
isEdge = !!window.MSAssertion; |
View gist:36dc0095b9d24ce93b045e2ddc60d7a0
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: content-box, border-box; | |
} |
View .hyper.js
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
View webpack.config.js
// The motivation is to avoid having to explicitly import infrastructure Sass files | |
// (those containing only variables/mixins/functions etc). This enables a more classic | |
// Sass dev experience, with the end result still being good ol' CSS Modules. | |
// First, make a shared.scss file which imports all of your Sass variables, mixins and functions. | |
// Note that nothing in that bundle should create CSS, otherwise, that CSS will be prepended to any | |
// Sass file you import with CSS modules. Then: | |
// With Webpack 1, add a sassLoader options object to your webpack.config.js module: | |
module.exports = { |
View index.css
//----------------------------------*\ | |
// TRIGONOMETRY FUNCTIONS | |
//----------------------------------*/ | |
// # Trigonometry in CSS | |
// | |
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf | |
// - Useful if you don't want to use JS. | |
// - With CSS Variables. | |
// - `calc()` can't do power (x ^ y) so I used multiplication instead. |
View gist:b1ca15587030a1013e4172d1f2b076ec
module.exports = { | |
config: { | |
windowPosition: [40, 40], | |
windowSize: [540, 380], | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', |