Skip to content

Instantly share code, notes, and snippets.

@logii
logii / script.php
Created May 9, 2016 19:59
Create A Node Programmatically on Drupal 8
<?php
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once 'autoload.php';
$kernel = new DrupalKernel('prod', $autoloader);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
@logii
logii / heaper.js
Created June 3, 2018 13:21 — forked from mpmckenna8/heaper.js
Vertical Tree diagram with v4 and collapsing and expanding
var numbs = [ 4, 7, 8, 2, 3, 1, 23 ]
var margin = {top: 20, right: 90, bottom: 30, left: 90},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
var i = 0,
duration = 750,
root;