Skip to content

Instantly share code, notes, and snippets.

View bamtang-dev's full-sized avatar
💭
I may be slow to respond.

Github bamtang-dev

💭
I may be slow to respond.
  • Lima, Peru
View GitHub Profile
@tophtucker
tophtucker / README.md
Last active February 21, 2024 22:11
d3 color-legend example

In response to a question on Twitter by @everybody_kurts:

“Hi @mbostock, I was looking at your stacked area chart at https://observablehq.com/@d3/stacked-area-chart. At the end of the file, you import swatches from "@d3/color-legend". I tried finding this on npmjs but to no avail. Is this exclusive to @observablehq only?”

This shows how to use the swatches function from the @d3/color-legend notebook in a plain HTML page. The example data for the swatches (the color scale and margin) is copied from the @d3/stacked-area-chart notebook.

@marcesher
marcesher / gist:7168642
Last active December 27, 2022 10:29
install 7zip on linux
In this case, in AWS Linux:
yum-config-manager --enable epel
yum install -y p7ip
cp /usr/bin/7za /usr/bin/7z
7z