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.
View GitHub Profile
@mihanvr
mihanvr / UnityLoader_2021.3.32_original.js
Last active May 14, 2025 15:45
Support splitted wasm and data files in WebGL builds for Unity 2021.3.16f1
function createUnityInstance(canvas, config, onProgress) {
onProgress = onProgress || function () {};
#if USE_THREADS
// Polyfill Atomics.wake for old Emscripten fastcomp compiler.
// TODO: When we update to new Emscripten, this can be removed.
if (typeof Atomics !== 'undefined' && Atomics.notify && !Atomics.wake) {
Atomics.wake = Atomics.notify;
}
#endif
@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