Skip to content

Instantly share code, notes, and snippets.

View cqvo's full-sized avatar

Chris Vo cqvo

View GitHub Profile
@cqvo
cqvo / Iris-Keyboard.kbd.json
Last active December 2, 2024 13:47 — forked from lewisridden/Iris-Keyboard.kbd.json
Iris Keyboard
[
{
"name": "Iris Keyboard",
"author": "Lewis Ridden",
"switchMount": "cherry",
"plate": true
},
[
{
"x": 3,
@cqvo
cqvo / generateRandomUuid.js
Created October 23, 2024 18:15
Generates a random UUID compliant to version 4 of the standard as described in RFC 4122 section 4.4 (https://www.ietf.org/rfc/rfc4122.txt)
function generateUuid() {
var hexChars = "0123456789abcdef".split("");
var uuidFormat = [8, 13, 18, 23];
var uuid = Array(37).fill(null).map(function(_, idx) {
if (uuidFormat.includes(idx)) {
return "-";
} else {
return hexChars[Math.floor(Math.random() * 16)];
}
});