Skip to content

Instantly share code, notes, and snippets.

View boushley's full-sized avatar

Aaron Boushley boushley

  • Songtradr
  • Seattle, WA
View GitHub Profile
@boushley
boushley / test-node-server.js
Created March 1, 2016 21:32
Example KOA Server to serve static files
var fs = require('fs');
var koa = require('koa');
var r = require('koa-route');
var bodyParser = require('koa-bodyparser');
var app = koa();
app.use(function *(next){
var start = new Date;
yield next;
var ms = new Date - start;
@boushley
boushley / isobmff-mp4.grammar
Last active August 9, 2018 23:01
ISO BMFF - MP4 Grammar for Synalyze It
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.17">
<grammar name="ISOBMFF MP4" start="id:8" fileextension="mp4" uti="public.mpeg-4">
<structure name="Atom" id="9" length="Size" extends="id:10">
<number name="Size" id="11" fillcolor="68D6FB" type="integer" length="4">
<description>Atom Size</description>
</number>
<number name="Type" mustmatch="yes" id="12" fillcolor="FF7B7A" type="integer" length="4" display="hex">
<description>Atom Type</description>
</number>
@boushley
boushley / dllBootstrapPlugin.js
Created May 15, 2017 20:19
Boostrap Webpack DLL Chunk
// This plugin modifies the generated webpack code to execute a module within the DLL bundle in addition to preserving
// the default behavior of exporting the webpack require function
class DllBootstrapPlugin {
constructor(options) {
this.options = options || {}
}
apply(compiler) {
compiler.plugin('compilation', (compilation) => {
compilation.mainTemplate.plugin('startup', (source, chunk) => {