Skip to content

Instantly share code, notes, and snippets.

View jacc's full-sized avatar
☁️

Jack LaFond jacc

☁️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jacc on github.
  • I am lafond (https://keybase.io/lafond) on keybase.
  • I have a public key ASAQAxmEJKiJIvqgNISuQB9JGrRvkVSAkS-3wDSvV5bppgo

To claim this, I am signing this object:

@jacc
jacc / convert.js
Created June 27, 2021 20:29
Function to convert Hypixel network experience to a level in JS/TS
// Code adapted from https://github.com/HypixelDev/PublicAPI/blob/master/Java/src/main/java/net/hypixel/api/util/ILeveling.java
const BASE = 10_000
const GROWTH = 2_500
console.log(BASE + GROWTH)
const REVERSE_PQ_PREFIX = -(BASE - 0.5 * GROWTH) / GROWTH;
const REVERSE_CONST = REVERSE_PQ_PREFIX * REVERSE_PQ_PREFIX;
const GROWTH_DIVIDES_2 = 2 / GROWTH;
@jacc
jacc / docker-compose.yaml
Last active June 9, 2024 02:38
Latest Plausible configuration for Coolify
services:
plausible:
image: ghcr.io/plausible/community-edition:v2.1.1
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
environment:
- DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@plausible_db/plausible
- BASE_URL=$SERVICE_FQDN_PLAUSIBLE_8000
- SECRET_KEY_BASE=$SERVICE_BASE64_64_PLAUSIBLE
- TOTP_VAULT_KEY=$SERVICE_REALBASE64_TOTP
depends_on: