Skip to content

Instantly share code, notes, and snippets.

View LambdAurora's full-sized avatar
🦊
Foxxo

LambdAurora LambdAurora

🦊
Foxxo
View GitHub Profile
@unascribed
unascribed / randomUUID.js
Last active October 5, 2023 11:35
A simple and readable way to generate valid v4 UUIDs in JavaScript. CC0 https://creativecommons.org/publicdomain/zero/1.0/
function randomUUID() {
return randhex(8) + "-" + randhex(4) + "-4" + randhex(3) + "-" + choice(["8", "9", "a", "b"]) + randhex(3) + "-" + randhex(12);
}
let scratchTarr = new Uint32Array(1);
function choice(arr) {
crypto.getRandomValues(scratchTarr);
return arr[Math.floor(scratchTarr[0]%arr.length)]
}
function randhex(count) {
crypto.getRandomValues(scratchTarr);
@Patbox
Patbox / cardboard-not-so-great.md
Last active March 24, 2024 05:11
Why you shouldn't use cardboard, banner or any other "hybrid" server

By looking that you are here you most likely use Cardboard/Banner/some other weird bukkit + Fabric project (or just someone linked to it).

Don't do it, it will cause more harm/instabilities to your server than good. But let's start at the beginning.

Few definitions before we start:

  • Bukkit - It means bukkit, spigot, paper and any forks of these,
  • Cardboard - mod by IsaiahPatton that tries to port bukkit ecosystem to fabric.
  • Banner - another mod trying to make plugins work with Fabric, similar to Cardboard.
  • Fabric - a Minecraft modding platform, includes Fabric Loader and Fabric API, everything written in this gist also applies to Quilt.
  • Mods - Mods designed for fabric and compatible platforms
@FredEckert
FredEckert / framebuffer.c
Created August 22, 2012 13:15
Paint Pixels to Screen via Linux FrameBuffer
/*
To test that the Linux framebuffer is set up correctly, and that the device permissions
are correct, use the program below which opens the frame buffer and draws a gradient-
filled red square:
retrieved from:
Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2)
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html
*/