Skip to content

Instantly share code, notes, and snippets.

View dievardump's full-sized avatar

Simon Fremaux dievardump

View GitHub Profile
@dievardump
dievardump / docker-compose-nginx-node-postgres.yml
Last active December 20, 2023 16:25
Creating a server (VPS, EC2, anything you have access to) that can handle several VIRTUAL_HOST without the hassle of managing `sites-enabled` etc...
version: "3"
services:
postgres:
image: postgres:16
container_name: myWebsite_postgres
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=E8FiIVyP5DPiHLwCRMXPHGZYa # change that password
@dievardump
dievardump / openRarity.js
Last active March 20, 2025 14:23
OpenRarity in JavaScript / js without any dependencies
// code highly inspired by https://github.com/kongnet/openrarity
// rewritten and removed all dep
// the function exported by this file expects data of type Record<string, any>[]
/*
import openRarity from './openRarity.js';
const data = [
{ trait1: value1_1, trait2: value1_2, trait_3: value1_3 },