Skip to content

Instantly share code, notes, and snippets.

View travishorn's full-sized avatar
💡
Trying new ideas

Travis Horn travishorn

💡
Trying new ideas
View GitHub Profile
@mxstbr
mxstbr / webpack-for-node-modules.js
Last active February 13, 2021 20:28
How to use webpack to compile node modules
/* eslint-disable no-var */
var path = require('path');
var autoprefixer = require('autoprefixer');
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i;
module.exports = [{
output: {
filename: '[name].js',
library: 'atrium-react-plugin-beta',
@gmetais
gmetais / gzip-conf.txt
Last active February 28, 2021 14:06
This is a list of Content-Type / mime-type for a server Gzip/Brotli compression configuration
This list was moved to https://letstalkaboutwebperf.com/en/gzip-brotli-server-config/
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];