Skip to content

Instantly share code, notes, and snippets.

View kohlmannj's full-sized avatar

Joseph Kohlmann kohlmannj

View GitHub Profile
@kohlmannj
kohlmannj / customDevServer.js
Created July 9, 2017 22:43
An example of using BrowserSync, webpack-dev-middleware, and webpack-hot-middleware together in a script that boots up a custom dev server
#! /usr/bin/env node
/* eslint-env node */
// Boot it up with:
// $ node customDevServer.js
// ...or:
// $ chmod +X customDevServer.js
// $ ./customDevServer.js
const webpack = require('webpack');
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
"jest",
"json",
@kohlmannj
kohlmannj / sceneHasLights.ts
Created April 23, 2019 02:59
A Three.js helper function which determines if the given scene contains lights
import * as THREE from 'three';
/**
* Determine if the given scene contains any lights, i.e. objects
* that are subclasses of the `THREE.Light` abstract base class.
*
* @param scene the scene to check for lights
*
* @returns whether or not the scene contains lights
*/
@kohlmannj
kohlmannj / opml-generator.ts
Created November 1, 2019 22:57
Sketch of a TypeScript version of https://npm.im/opml-generator
/* eslint-disable no-underscore-dangle */
import xml from 'xml'
/**
* Created by azu on 2014/01/18.
* LICENSE : MIT
* @see https://github.com/azu/opml-generator
*/
/**