Skip to content

Instantly share code, notes, and snippets.

@IPWright83
IPWright83 / README.md
Created April 24, 2024 16:12
Sublime Text JavaScript Test Explorer Plugin

This is a basic unpacked Sublime Text Plugin designed provide a Test Explorer view within a JavaScript file. It looks for describe and it blocks to put together a menu that you can then explore with the standard navigation controls in a Sublime menu. It should therefore work with Jest/Jasmine etc.

image

The file needs to be in included within the Packages\User directory within Sublime. You can get to this by going to Settings > Browser Packages. Once included you'll need to setup a key binding like so:

{ "keys": ["command+t"], "command": "test_explorer_menu" }

I designed it for my own personal use but anyone is free to use it, just don't redistribute without permission.

@IPWright83
IPWright83 / index.html
Last active July 14, 2021 13:10 — forked from syntagmatic/index.html
Nutrient Parallel Coordinates
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Nutrient Database Explorer</title>
<link rel="stylesheet" type="text/css" href="parallel.css" />
</head>
<body>
<div id="header">
<h1>Nutrient Explorer</h1>

Example System DAG

This is an example of a System DAG using a forceSimulation with images

mockComponent.js

This is designed as a simple React component mock to be used with Jest, that still presents enough information to be useful in a Snapshot test. It's handy when you either don't want to shallow render, or are unable to.

Usage

To use this mock, insert the following into your test file, to mock the sub-components, substituting out the names:

jest.mock("../MyComponent", () => ({ MyComponent: (props) => mockComponent("MyComponent", props) }));
@IPWright83
IPWright83 / .block
Created June 21, 2018 12:37 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0
@IPWright83
IPWright83 / README.md
Created March 23, 2018 15:08 — forked from mbostock/.block
Spline Editor

Click to add new points. Hit the DELETE key to remove the selected point. Use the dropdown menu to change the interpolation mode.

@IPWright83
IPWright83 / .block
Last active December 1, 2017 11:06 — forked from mbostock/.block
Canvas Swarm
license: gpl-3.0
@IPWright83
IPWright83 / .block
Last active December 1, 2017 11:06 — forked from mbostock/.block
SVG Swarm
license: gpl-3.0
@IPWright83
IPWright83 / .block
Created July 31, 2017 08:57 — forked from mbostock/.block
Beeswarm
license: gpl-3.0
height: 200
@IPWright83
IPWright83 / README.md
Last active September 26, 2017 14:23 — forked from etiennecrb/README.md
d3-xyzoom demo

This plugin is a fork of d3-zoom that adds several features by separating scaling on x and y:

Scale independently along x-axis and y-axis

Constrain scale extent on zoom out to respect translate extent constraints

Apply "scale factor ratio" on user input. For instance, with a scale ratio of 0.5 on x-axis and 1 on y-axis, when user zoom with its mouse, the increase of scale factor on x-axis will only be half of the increase on y-axis.