Skip to content

Instantly share code, notes, and snippets.

View dmnsgn's full-sized avatar

Damien Seguin dmnsgn

View GitHub Profile
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active May 3, 2024 17:07
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@mattdesl
mattdesl / cli.js
Created September 13, 2022 10:37
colour palette from text prompt using Stable Diffusion https://twitter.com/mattdesl/status/1569457645182152705
/**
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts.
*
* Note that this uses an older fork of stable-diffusion
* with the 'txt2img.py' script, and that script was modified to
* support the --outfile command.
*/
var { spawn, exec } = require("child_process");
var path = require("path");

NFT Thoughts, Essays, Writings

I'm collecting here a few essays on the net about tokenization in the art world. This list is likely biased and by no means exhaustive.

@munrocket
munrocket / wgsl_3d_sdf.md
Last active April 24, 2024 00:45
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/407

Sphere - exact

fn sdSphere(p: vec3f, r: f32) -> f32 {
  return length(p) - r;
}
@jackrusher
jackrusher / trinity.js
Created March 29, 2021 09:23
A fast, minimal JS triple store implementation in ~70 lines of code
// three indices to efficiently support all lookups
function createDB() {
return {eav: new Map(),
ave: new Map(),
vea: new Map()};
}
function addToIndex(xs, x, y, z, triple) {
let ys = xs.get(x);
if(ys == undefined) {
@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2024 10:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.

NFT Statement

Feb 26, 2021

I have decided to release a small set of single-edition NFTs on OpenSea.

I plan to place 100% of direct proceeds from the first sale toward the Bounty for More Eco-Friendly NFTs being developed by Artnome and GitCoin, and 25% of direct proceeds of each of the subsequent 9 artworks in this series toward the same fund.

You can bid/purchase/view the first minted artwork here, and the full series here. At the time of writing, I have only placed 1 artwork on auction, but will place the other 9 in the coming days/weeks.

//MIT License
//Copyright (c) 2021 Felix Westin
//Source: https://github.com/Fewes/MinimalAtmosphere
//Ported to GLSL by Marcin Ignac
#ifndef ATMOSPHERE_INCLUDED
#define ATMOSPHERE_INCLUDED
// -------------------------------------
/**
* Try to fix iOS lock on audio.
*
* By default, audio on iOS is locked until a sound is played within a user interaction,
* and then it plays normally the rest of the page session.
*/
// Inspired from https://github.com/goldfire/howler.js/blob/2.0/src/howler.core.js#L212
export default class IosUnlock {