Skip to content

Instantly share code, notes, and snippets.


Iddan Aaronsohn iddan

View GitHub Profile
View notion_to_pandas.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
iddan / convert-json5.js
Created Feb 26, 2017
Convert JSON5 to JSON
View convert-json5.js
const fs = require('fs');
const JSON5 = require('json5');
const [file] = process.argv.slice(2);
file.replace(/\.json5$/, '.json'),
JSON5.parse( fs.readFileSync(file) ),
iddan / elementsfrompoint.js
Last active Sep 29, 2020
document.elementsFromPoint Polyfill
View elementsfrompoint.js
'use strict';
if (!document.elementsFromPoint) {
document.elementsFromPoint = elementsFromPoint;
function elementsFromPoint(x, y) {
var parents = [];
var parent = void 0;
do {
iddan / .bash_profile
Created Jul 14, 2020
My Bash Profile
View .bash_profile
#! /bin/bash
# Load all SSH keys
ssh-add -A 2>/dev/null;
# Enable colours
### Terminal
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
iddan / settings.json
Created Jul 14, 2020
My VSCode settings.json
View settings.json
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": null,
"window.zoomLevel": 0,
"editor.fontSize": 14,
"editor.fontFamily": "Monaco, 'Courier New', monospace",
"": "/usr/local/bin/bash",
"terminal.integrated.fontSize": 14,
"terminal.integrated.fontFamily": "Monaco",
"git.confirmSync": false,
iddan / cayley-add-context-to-test-cases-documents.go
Created Jul 8, 2020
Script used for adding context to JSON-LD test cases documents in Cayley
View cayley-add-context-to-test-cases-documents.go
package main
import (
iddan / delete-connections.js
Last active Mar 30, 2020
Batch delete connections on LinkedIn
View delete-connections.js
// Get data
let d = [];
for (const element of document.querySelectorAll(".mn-connection-card")) {
d.push([element.querySelector("a").href, element.querySelector(".mn-connection-card__name").textContent.trim(), element.querySelector(".mn-connection-card__occupation").textContent.trim()])
// Copy data to clipboard
iddan /
Created Dec 27, 2019
Refactor Cayley LinkedQL steps
import re
directory = "query/linkedql/"
with open(directory + "steps.go") as file:
content =
def convert(name):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
iddan /
Created Sep 2, 2019
Transforms give iterables of tuples of iterables to tuples of iterables
from itertools import starmap, chain
def flat_unzip(iterable):
Transforms given iterable of tuples of iterables to tuple of iterables
return starmap(chain, zip(*data))
iddan /
Last active Aug 25, 2019
Sync Pipfile and
# Sync Pipfile with dependencies
# Assumptions:
# - You are running in a directory with Pipfile, Pipfile.lock &
# - Your calls a function named setup()
# - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists)
# - All your remote dependencies are HTTPS git
import pipfile
import ast
import json