Skip to content

Instantly share code, notes, and snippets.

@kapilghimire
kapilghimire / filterArray.js
Created May 25, 2020 08:11 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@kapilghimire
kapilghimire / p4merge-git-tool.md
Created May 17, 2019 12:39 — forked from dgoguerra/p4merge-git-tool.md
Setup p4merge as difftool and mergetool on Windows

Setting up p4merge as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.

Two alternatives are explained: using the command line, and directly editing the config file.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

$ git config --global diff.tool p4merge
@kapilghimire
kapilghimire / links.md
Created March 3, 2019 14:27 — forked from g0t4/links.md
Starting Point Files for Jenkins2 Getting Started course