Skip to content

Instantly share code, notes, and snippets.

@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]
@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.

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 / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vjpr
vjpr / backbone-0.9.1.js
Created February 26, 2012 06:53 — forked from thickey/backbone-0.9.1.js
Externs for Backbone.js and Underscore.js
/*
* @fileoverview Externs for backbone-0.9.1.js
*
* built with http://www.dotnetwise.com/Code/Externs/index.html
* see also: http://blog.dotnetwise.com/2009/11/closure-compiler-externs-extractor.html
* via: http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file?
*
* Note: when building via that page, you first need to load in underscrore.js, as that's a dependency.
* also, after running the extern for Backbone, you need to manually run it for: