Skip to content

Instantly share code, notes, and snippets.

@vjpr
vjpr / README.md
Last active August 29, 2015 14:22
NPM module patching workflow

NPM module patching workflow

Create a new project

npm init -f

Add a module

npm install --save something

Redux is super lightweight...so 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
vjpr / README.md
Last active February 4, 2016 21:29 — 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.
@vjpr
vjpr / code-snippets.md
Last active August 29, 2015 14:25
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
vjpr / plugin-research.md
Last active August 29, 2015 14:25
Research of existing Node.js plugin systems used by various modules.
@vjpr
vjpr / live-plugin-spec-options.md
Created July 25, 2015 06:59
Options for the file format for Live plugins.

Live plugin file format options

Options for the the file format for Live plugins.

Class

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

export default class {
@vjpr
vjpr / README.md
Created August 9, 2015 01:23
npm README template

live-xxx

${DESCRIPTION}

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

Install

@vjpr
vjpr / README.md
Last active February 26, 2024 04:39

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.

Usage

/******/ (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 = [];
@vjpr
vjpr / .gitconfig
Created June 23, 2023 07:17 — forked from iliakan/.gitconfig
Git Diff and Merge Tool - IntelliJ
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]