Skip to content

Instantly share code, notes, and snippets.

View bumbeishvili's full-sized avatar
🏠
Working from home

David Bumbeishvili bumbeishvili

🏠
Working from home
View GitHub Profile
@robschmuecker
robschmuecker / README.md
Last active October 19, 2024 14:15
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.

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 18, 2025 09:10
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@ganeshv
ganeshv / .block
Last active June 5, 2024 17:05
Zoomable Treemap Template
license: gpl-3.0
@mathisonian
mathisonian / index.md
Last active August 10, 2024 20:59
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@fhernand
fhernand / README.md
Last active May 18, 2018 11:55
Visualization of passes in a soccer game

A graph of passes done between players of Real Madrid in the 1st half of the 23.09.2014 game vs. Elche.

@bmershon
bmershon / README.md
Last active March 21, 2018 10:13
Holes in Sensor Networks

Sensor networks allow for regions to be scanned for the presence of a particular object. Many small devices, each capable of making some measurements, can be distributed over the desired region. The types of measurements a sensor might make include taking temperature readings, detecting electromagnetic frequencies, and recording sound levels. A more complex sensor could process video footage and find valuable information automatically.

A critical consideration for sensor networks is the “blanket” of coverage that is produced. Wherever holes exist in this coverage, it is possible to miss critical information in the region we would like to scan.

If we have sophisticated sensors capable of measuring their exact position, then it is a fairly easy task to compute the coverage of the network. However, if we have simple sensors which can only record local information, then we are

@syntagmatic
syntagmatic / README.md
Last active December 22, 2017 12:59 — forked from mbostock/.block
Hexbin Heightmap
@brattonc
brattonc / README.md
Last active April 3, 2025 17:43
D3 Liquid Fill Gauge

Liquid Fill Gauge v1.1 - 7/14/2015

Changes:

  • Added support for updating the gauge value after loading is complete. The loadLiquidFillGauge method now returns an object with an update method which allows the gauge value to be changed. Click any of the gauges above to randomly update their value.

Configurable features include:

  • Changeable min/max values.
  • All colors.
@Neilos
Neilos / README.md
Last active June 17, 2024 22:35
Bi-directional hierarchical sankey diagram

This is a demonstration of a bi-directional hierarchical sankey diagram produced in javascript, html and css using d3. (Refresh page to generate new random data)

Sankey diagrams represent flows between nodes by varying the thickness of the connecting links.

This diagram was based off of Mike Bostock's sankey diagram, but additionally incorporates bi-directionality into the flow and caters for hierarchical relationships between nodes to allow drill down into the data.

All javascript code to generate the diagram markup is contained in the app.js file, but the underlying calculations are performed using a custom plugin: bihisankey.js.

@1wheel
1wheel / geometry.js
Last active March 2, 2018 11:53
two line intersection
//creates new point
function P(x, y, color){
var rv = {x: x, y: y, color: color || 'black'}
rv.toString = function(){ return rv.x + ',' + rv.y }
return rv
}
//dist