Skip to content

Instantly share code, notes, and snippets.

View sahlouls's full-sized avatar

sahlouls sahlouls

View GitHub Profile
@sahlouls
sahlouls / README.md
Created July 1, 2020 23:57 — forked from robschmuecker/README.md
Multiple Parent Nodes D3.js

Multi Link Example for http://www.robschmuecker.com/d3-js-drag-and-drop-zoomable-tree/#comment-6190

Added an additional link between nodes at the bottom of the dndTree.js file.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

@sahlouls
sahlouls / readme.md
Created January 9, 2019 16:53 — forked from lounagen/readme.md
Example for decoding a JWT Payload with your Shell (bash, zsh...)

Setup

Add this to your .profile, .bashrc, .zshrc...

BASE64_DECODER="base64 -d" # option -d for Linux base64 tool
echo AAAA | base64 -d > /dev/null 2>&1 || BASE64_DECODER="base64 -D" # option -D on MacOS

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
 if [ $len -eq 2 ]; then result="$1"'=='