Skip to content

Instantly share code, notes, and snippets.

@NHZEX
NHZEX / scan_all_nodes.js
Last active May 5, 2024 05:15 — forked from Luckz/tabsoutlinerdupes.js
Tabs Outliner: kill duplicate windows
async function scanDupes() {
let dupes = {};
for (const nod of treeView.treeModel.currentSession_rootNode.subnodes) { // only check root level nodes, don't do complex recursive checks for "sub-roots"
const strbld = [];
nodeterate(nod, strbld);
const crashDetectedDate = nod.chromeWindowObj.crashDetectedDate
? new Date(nod.chromeWindowObj.crashDetectedDate).toLocaleString()
: 'not crash';
console.log(nod.id, crashDetectedDate, nod);
@NHZEX
NHZEX / base94.c
Created May 29, 2018 03:40 — forked from iso2022jp/base94.c
base94 encoder/decoder
#include "base94.h"
void base94_encode(const unsigned char *plain, unsigned char *code) {
// high * 2^64 | low
unsigned long long value
= ((unsigned long long)plain[1] << 56) | ((unsigned long long)plain[2] << 48)
| ((unsigned long long)plain[3] << 40) | ((unsigned long long)plain[4] << 32)