I hereby claim:
- I am sugendran on github.
- I am sugendran (https://keybase.io/sugendran) on keybase.
- I have a public key whose fingerprint is D3B1 FA86 D98B 978E 463C 7FD8 822B F48E AD45 57C9
To claim this, I am signing this object:
| (function (text) { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = 600; | |
| canvas.height = 100; | |
| var ctx = canvas.getContext("2d"); | |
| ctx.font = "28px monospace"; | |
| ctx.textBaseline = "top"; | |
| ctx.textAlign = "start"; | |
| var w = Math.ceil(ctx.measureText(text).width) + 2; | |
| var h = 45; |
| // Welcome to plzxplain.com | |
| // ------------------------ | |
| // | |
| // Sometimes when you're learning JavaScript things can get | |
| // a little confusing. This website hopes to help fix that. | |
| // Just paste in the JavaScript that is confusing you and | |
| // we'll convert it into a flowchart so that you can try and | |
| // work out what's actually happening. | |
| // | |
| // Oh and you can load a gist using plzxplain.com/?gist=gistId |
| // binary search function taken from http://rosettacode.org/wiki/Binary_search | |
| function binary_search_recursive(a, value, lo, hi) { | |
| if (hi < lo) | |
| return null; | |
| var mid = Math.floor((lo+hi)/2); | |
| if (a[mid] > value) | |
| return binary_search_recursive(a, value, lo, mid-1); | |
| else if (a[mid] < value) | |
| return binary_search_recursive(a, value, mid+1, hi); | |
| else |
| /* | |
| * Yes this CSS is ugly, but it's a demo | |
| * about canvas and not styling html+css. | |
| */ | |
| html, body { | |
| background: black; | |
| color: white; | |
| font-family: monospace; | |
| margin: 0; |
I hereby claim:
To claim this, I am signing this object:
| // Assumes all apple data is tab seperated and in the current directory | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var cwd = process.cwd(); | |
| var contents = fs.readdirSync(cwd); | |
| var _headers = []; | |
| var _data = []; | |
| function parseHeaders (cols) { |
| // based around the setup in https://www.npmjs.com/package/nativescript-media-generator | |
| // all %s come from it | |
| // npm install imagemagick async | |
| // update the source and target paths | |
| // then run node mkgraphics.js | |
| // It should put correctly sized images in the right folders | |
| var im = require('imagemagick'); | |
| var fs = require("fs"); | |
| var path = require("path"); |
Some sort of script to parse the webpack stats file into a list of nodes and edges.
very much leveraging the code in here https://github.com/webpack/analyse/blob/master/app/graphs/modules.js