Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@leostaples
leostaples / lx-page-deps.js
Created June 27, 2019 16:59
Script to find recursively search lx-page dependencies to find which ones reference bbc-morph-grandstand
function parseDependencies(module) {
console.log("parseDependencies", module);
if (!parseDependencies.results) parseDependencies.results = [];
if (!parseDependencies.seenBefore) parseDependencies.seenBefore = {};
if (!(module in parseDependencies.seenBefore)) {
parseDependencies.seenBefore[module] = true;
var package_json = require('/Users/stapll/code/morph-modules/' + module + '/package.json');
@leostaples
leostaples / triangle.rb
Created November 26, 2018 16:07
triangle kata
# https://github.com/Tarqwyn/Kata-Triangle
# This test is all about finding the shortest route.
# Given we have triangle, find the shortest path expressed as a sum of the values from top to bottom.
# At each step you may move to adjacent numbers on the row below.
triangle = [
[2],
[3,4],
[6,5,7],
@leostaples
leostaples / triangle_recursion.rb
Created November 26, 2018 16:05
triangle kata - recursion
# https://github.com/Tarqwyn/Kata-Triangle
# This test is all about finding the shortest route.
# Given we have triangle, find the shortest path expressed as a sum of the values from top to bottom.
# At each step you may move to adjacent numbers on the row below.
triangle = [
[2],
[3,4],
[6,5,7],
@leostaples
leostaples / .block
Last active September 14, 2018 10:07
Vega Bl.ocks example - horizontal
license: bsd-3-clause
@leostaples
leostaples / README.md
Last active May 14, 2018 10:37
Market Data comments
@leostaples
leostaples / swarm.md
Last active December 12, 2017 15:07
Market data overview tables - Accessibility Swarm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leostaples
leostaples / uk-bounds.js
Created September 15, 2017 15:14
uk-bounds
define(function(){
var geoJson = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"color": "#000",
"fill": false,
"weight": 1.5,