Skip to content

Instantly share code, notes, and snippets.



  • London
Block or report user

Report or block Izhaki

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
Izhaki /
Created Sep 13, 2019
Updating yarn on Mac

Ensure you have GPG installed:

brew install gpg
curl -o- -L | bash
Izhaki / globTest.js
Created Aug 31, 2019
Tiny script to test glob matches
View globTest.js
var glob = require('glob');
const pattern = 'docs/**/*.js?(x)';
glob(pattern, function(er, files) {
Izhaki / memx.js
Last active Mar 20, 2019
My memx content
View memx.js
var memxContent = [{
title: 'Force Directed Graph',
links: [{
title: 'Interactive & Dynamic Force-Directed Graphs with D3',
note: 'Simple Medium tutorial with code examples',
url: '',
title: 'Official D3 example',
url: '',
Izhaki / webdriverUpdate.js
Last active Dec 11, 2018
A small script to update webdriver if needed prior to running protractor.
View webdriverUpdate.js
const isWebdriverUpToDate = () => {
const fs = require('fs');
const path = require('path');
const SeleniumConfig = require('webdriver-manager/built/lib/config').Config;
const updateJson = path.resolve(SeleniumConfig.getSeleniumDir(), 'update-config.json');
return fs.existsSync(updateJson);
const updateWebdriver = () => {
View getInsertionIndex.js
// Finds the insertion index for an item in an array.
// Uses compareFn (similar to that provided to array.sort())
const getInsertionIndex = (arr, item, compareFn) => {
const itemsCount = arr.length;
// No items in array, so return insertion index 0
if (itemsCount === 0) {
return 0;
Izhaki /
Created Jul 15, 2018
Some examples of comparison between imperative and more function style - hinting the latter is not always better.


export default expressions => mapIterator(row => {
  const projection = {};
  for (const colName in expressions) {
    const expression = expressions[colName];
    projection[colName] = expression(row);
  return projection;
Izhaki / gqlFetch.spec.ts
Created May 5, 2017
Client GraphQL Fetch ( Typescript )
View gqlFetch.spec.ts
import * as nock from 'nock'
import {
} from 'chai'
import * as chaiAsPromised from 'chai-as-promised'
Izhaki / CoreNLP-part-of-speech-Penn-Treebank-Project.js
Last active May 12, 2016
Part of Speech tokens used by CoreNLP, based on the Penn Treebank Project.
View CoreNLP-part-of-speech-Penn-Treebank-Project.js
// Based on
// Note that CoreNLP sometimes emit POS that are not in this list, like "``" or "."
var iCoreNlpPos = [ "CC", "CD", "DT", "EX", "FW", "IN", "JJ", "JJR", "JJS", "LS", "MD", "NN", "NNS", "NNP", "NNPS", "PDT", "POS", "PRP", "PRP$", "RB", "RBR", "RBS", "RP", "SYM", "TO", "UH", "VB", "VBD", "VBG", "VBN", "VBP", "VBZ", "WDT", "WP", "WP$", "WRB" ];
You can’t perform that action at this time.