Skip to content

Instantly share code, notes, and snippets.

Vaughan Rouesnel vjpr

Block or report user

Report or block vjpr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View with-require-ensure.js
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];

Atom Settings

Atom took ages to setup correctly to get the same functionality I was use to when doing Node.js, ES6/7 development in IntelliJ.

Therefore I want to share all my settings with the world to hopefully save some of you some time.

I use the synced-settings Atom module which syncs my Atom settings to a Gist.


vjpr /
Created Aug 9, 2015
npm README template



[![NPM Version][npm-image]][npm-url] [![Linux Build][travis-image]][travis-url] [![Test Coverage][coveralls-image]][coveralls-url]


vjpr /
Created Jul 25, 2015
Options for the file format for Live plugins.

Live plugin file format options

Options for the the file format for Live plugins.


Must implement a LivePlugin shape, but does not need to extend from it.

export default class {
vjpr /
Last active Aug 29, 2015
Research of existing Node.js plugin systems used by various modules.
vjpr /
Last active Aug 29, 2015
What is the best workflow for posting code snippets?

What is the best workflow for posting code snippets?

My Gist Workflow

  • Use Gist plugin for Sublime Text 3. (Add api token to settings).
  • Create new files in ~/Desktop/Notes.
  • Use OmniMarkupPreview Sublime Text 3 plugin to preview in browser.
  • When ready...
  • Open command palette (⌘+Shift+P) > Enter Gist > Create New Gist. (Or use keyboard shortcuts)
  • Delete file from ~/Desktop/Notes.
vjpr /
Last active Feb 4, 2016 — forked from skevy/gist:8a4ffc3cfdaf5fd68739
Reduce boilerplate in Redux

Reduce boilerplate in Redux

  • Create actions similar to Flummox.
  • Generate action ids.
  • Supports actions with promises, and therefore ES7 async.
View gist:5939a3c95e998ec43c55

Redux is super it may be useful to add some helper utils on top of it to reduce some boilerplate. The goal of Redux is to keep these things in user-land, and so most likely these helpers (or anything like them) wouldn't make it into core.

It's important to note that this is just ONE (and not particularly thoroughly tested) way to accomplish the goal of reducing boilerplate in Redux. It borrows some ideas from Flummox and the way it generates action creator constants.

This will evolve, I'm sure, as time goes on and as Redux's API changes.

Some helper functions to reduce some boilerplate in Redux:

import _ from 'lodash';
vjpr /
Last active Aug 29, 2015
NPM module patching workflow

NPM module patching workflow

Create a new project

npm init -f

Add a module

npm install --save something

vjpr / api.js
Last active Aug 29, 2015
koa-mount patch to allow hot reloading of routes
View api.js
const debug = require('debug')('server')
const mount = require('koa-mount-hot')
const config = require('config')
const route = require('koa-route')
// TODO: This should only be in one place. = (prefix, name, hot = false) => {
if (config.env !== 'development') return false;
return hot;
You can’t perform that action at this time.