Skip to content

Instantly share code, notes, and snippets.

View bjacobel's full-sized avatar

Brian Jacobel bjacobel

View GitHub Profile
@bjacobel
bjacobel / nr-spa-118.js
Created April 23, 2019 13:56
nr-spa-118.js
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requireuires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
(function (modules, cache, entry) { // eslint-disable-line no-extra-parens
// Save the require from previous bundle to this closure if any
@bjacobel
bjacobel / rreaddir.js
Created January 11, 2019 15:27
Recursively turn a folder into a JS object, where the directories are subtrees and the files are Buffers
const fs = require("fs");
/**
* Recursively turn a folder into an object, where directories are sub-objects and files are Buffers.
* Works nicely with github.com/tschaub/mock-fs
* Requires Node >= 8.6
* @param {string} dirpath
* @param {bool} full - pass this as true at the start to make the top level dir an absolute path
*/
const rreaddir = async function(dirpath, full = false) {
@bjacobel
bjacobel / plates.txt
Created May 10, 2017 15:18
List of banned North Carolina license plates, extracted from PDF and sorted. Thanks to the Charlotte Observer for the FOIA.
:-)KLAN
:DH00KER
?0RBDAMU
@ZZKIKR
*NCMF*
*SUHKIT*
#1 DMF
#1GNGSTA
#1SPBTCH
#1ST0NER
@bjacobel
bjacobel / bootstrap.rtl.css
Created May 9, 2017 16:31
bootstrap 4.0.0a6 run through rtlcss with default configuration
/*!
* Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
line-height: 1.15;
@bjacobel
bjacobel / bok_choy.txt
Created May 4, 2017 17:25
Output of bok choy setup
edxapp@vagrant:~/edx-platform$ paver test_bokchoy -t studio/test_import_export.py:TestCourseImport
---> pavelib.bok_choy.test_bokchoy
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
Node prereqs unchanged, skipping...
---> pavelib.prereqs.install_python_prereqs
---> pavelib.prereqs.uninstall_python_packages
Python uninstalls unchanged, skipping...
Python prereqs unchanged, skipping...
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
@bjacobel
bjacobel / oep-11-andy-backup.rst
Created March 31, 2017 18:35
Backup of OEP 11 draft 2
@bjacobel
bjacobel / output.txt
Created October 17, 2016 14:25
yarn vs. npm3
# npm3
wheatley > ~ > code > rak > $ > rm -rf node_modules
wheatley > ~ > code > rak > $ > time npm install
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global marked@0.3.6 should be installed with -g
npm WARN prefer global colorguard@1.2.0 should be installed with -g
> fsevents@1.0.14 install /Users/bjacobel/code/rak/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
@bjacobel
bjacobel / speedtest.txt
Created September 9, 2016 20:18
HTTP2 speedtest of bjacobel.com
$> # First force HTTP/1.1 with the --h1 flag
$> h2load --h1 -n 100 https://bjacobel.com
starting benchmark...
spawning thread #0: 1 total client(s). 100 total requests
TLS Protocol: TLSv1.2
Cipher: ECDHE-RSA-AES128-GCM-SHA256
Server Temp Key: ECDH P-256 256 bits
Application protocol: http/1.1
progress: 10% done
progress: 20% done
{"ruby_version":"2.2.3","platform":"universal.x86_64-darwin12.0","vagrant_version":"1.8.1","box":"devstack-periodic-2016-05-16","action_name":"environment_plugins_loaded","initialized_at":"2016-07-12 13:58:54 UTC","started_at":"2016-07-12 13:58:54 UTC","ended_at":"2016-07-12 13:58:54 UTC","init_duration":0.002582,"call_duration":1.0e-05}
{"ruby_version":"2.2.3","platform":"universal.x86_64-darwin12.0","vagrant_version":"1.8.1","box":"devstack-periodic-2016-05-16","action_name":"environment_load","initialized_at":"2016-07-12 13:58:55 UTC","started_at":"2016-07-12 13:58:55 UTC","ended_at":"2016-07-12 13:58:55 UTC","init_duration":0.001971,"call_duration":7.0e-06,"previous_action_name":"environment_plugins_loaded","since_previous_action":0.178213}
{"ruby_version":"2.2.3","platform":"universal.x86_64-darwin12.0","vagrant_version":"1.8.1","box":null,"action_name":"machine_action_halt","initialized_at":"2016-07-12 13:58:56 UTC","started_at":"2016-07-12 13:58:56 UTC","ended_at":"2016-07-12 13:59:09 UTC","init_durati