Skip to content

Instantly share code, notes, and snippets.

@sockbot
sockbot / K3-Pro-ANSI-White-v1.0-fixed.json
Created August 7, 2024 15:20 — forked from zeevro/K3-Pro-ANSI-White-v1.0-fixed.json
Fixed version of the Keychron K3 Pro white-backlight VIA JSON file
{
"name": "Keychron K3 Pro",
"vendorId": "0x3434",
"productId": "0x0233",
"lighting": {
"extends": "none",
"keycodes": "qmk"
},
"customKeycodes": [
{"name": "Left Option", "title": "Left Option", "shortName": "LOpt"},
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
@sockbot
sockbot / index.js
Created July 26, 2019 22:02
sum-all-numbers-in-array
function sumItems(array) {
// console.log(typeof 1)
// let isAllNumbers = array.every(x => (typeof x === 'number'));
// console.log(isAllNumbers);
let sum = 0;
array.forEach(function(x){
if (typeof x === 'number') {
sum += x;
} else {
sum += sumItems(x);