
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
heatmap-pkg
Advanced tools
Heatmaps for node.js and the browser!
const Heatmap = require("heatmap");
const fs = require("fs");
const heat = new Heatmap(500, 500, { radius: 30 });
for (let i = 0; i < 5000; i += 1) {
let rho = Math.random() * 2 * Math.PI;
let z = Math.pow(Math.random(), 2) * 200;
let x = 250 + Math.cos(rho) * z;
let y = 250 + Math.sin(rho) * z;
heat.addPoint(x, y);
}
heat.draw();
fs.writeFileSync("blob.png", heat.canvas.toBuffer());
There are two ways of creating a new heatmap:
Optionally, you can set the opts.radius
and opts.threshold
to control the
rendering a little.
Add a point to the heatmap with a radius
.
params
must be an object and can have:
Scale the canvas by the coefficients x
and y
.
If y
is undefined, scale both x and y by the first parameter, x
.
Render all the points onto the canvas element.
The HTML Canvas element.
Protip: with the canvas module for
node you can heat.canvas.buffer()
to get a Buffer with a PNG file all up in it.
With npm, just do:
npm install heatmap-pkg
Or with yarn:
yarn add heatmap-pkg
FAQs
A package for heatmaps on node.js and the browser
The npm package heatmap-pkg receives a total of 1 weekly downloads. As such, heatmap-pkg popularity was classified as not popular.
We found that heatmap-pkg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.