Skip to content

Instantly share code, notes, and snippets.

View lostthetrail's full-sized avatar

Mark Reynolds lostthetrail

  • Winston-Salem, NC., USA
View GitHub Profile
Docker
# Build a new image locally
docker build --no-cache -t hello-world:latest .
# Run a new image built and enter bash
docker run --name hello-world --rm -p 8080:8080 -it hello-world:latest bash
@lostthetrail
lostthetrail / timerRace.js
Created March 23, 2017 18:44
process.hrtime vs date.now
'use strict';
const tests = 25;
const total = 1e6;
let holder;
// const action = () => {
// const x = process.hrtime();
// const y = process.hrtime(x);
// holder = Math.round(y[0] * 1e3 + y[1] / 1e6);
// };
@lostthetrail
lostthetrail / babel-unlink-enoent
Created February 11, 2016 17:04
Babel unable to unbuild without ENOENT unlinking .bin/babel
@lostthetrail
lostthetrail / react-router-server-render.js
Last active February 10, 2016 01:01
react-router-server-render-issue
// Actually in HomeRoute.js, but object here for simplicity
const HomeRoute = {
path: 'home',
getComponent(location, cb) {
require.ensure([], (require) => {
console.log('I got here.');
cb(null, require('./components/home'));
});
}
}
var console = (function(window) {
/**
* Simple simulator to convert the JSFiddle results panel into a console
* @author mreynolds
*/
var Console, console;
if (typeof console === 'undefined') {
Console = function Console() {
var target;
this.el = window.document.createElement('div');