Skip to content

Instantly share code, notes, and snippets.

View mukhtyar's full-sized avatar

Shruti Mukhtyar mukhtyar

View GitHub Profile
@1wheel
1wheel / README.md
Last active January 16, 2020 13:54
heat-histogram
@armollica
armollica / .block
Last active May 2, 2019 08:22
HTML Annotation
height: 960
@jrbalsano
jrbalsano / index.html
Last active May 23, 2016 00:11
D3 Scatterplot Rendering - 3
<!doctype html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var height = 500;
var width = 960;
var timer, startTime;
var startTime;
var BATCH_SIZE = 100;
@paulirish
paulirish / what-forces-layout.md
Last active May 21, 2024 09:11
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@nbremer
nbremer / .block
Last active July 25, 2023 13:20
Storytelling with Chord Diagram
height: 750
@sagivf
sagivf / FileDownload.js
Last active July 21, 2016 23:23
The power of promises in file downloading
angular.module("fileDownload", []);
@airportyh
airportyh / browserifiability.md
Last active February 23, 2016 07:16
Browserify Search Request For Help

Browserify Search Request For Help

I have been working on making a search index for npm modules that work with browserify. In order to do this, obviously, for each module on npm, I need to determine whether or not it works with browserify. Easy! I thought. I will run the browserify cli tool on the module browserify node_modules/that_module, and if it exits normally, it works with browserify. So I did that, and implemented a search engine on this premise. Except that, in the search results, I found a lot of modules which, although it "passed the test", they still were useless because simple the act of loading the bundle in a browser would result in a runtime error - a lot of these were a result of the module testing for process.versions.node which doesn't exist in the browserify process shim. Okay, I thought, I'll run the resulting bundle in jsdom, genious! That did reject lots of modules, but it still wasn't good enough. I still got a lot of modules in the search inde