Skip to content

Instantly share code, notes, and snippets.

View Dletta's full-sized avatar
🚌

Jachen Duschletta Dletta

🚌
View GitHub Profile
@Dletta
Dletta / sendBlobJson.js
Created July 11, 2019 17:29
sending JSON objects via Blobs
var obj = {name:"test", result:"hello world"};
var string = JSON.stringify(obj);
console.log(obj)
var arr = [];
encode = Array.from(string);
while(encode.length>0){
arr.push(encode.shift().charCodeAt(0));
}
var u16 = new Uint16Array(arr);
var blob = new Blob([u16], {type:'application/json'});
@Dletta
Dletta / index.html
Created September 7, 2019 03:37
Gun in Service Worker
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Concept Chat</title>
<link rel="stylesheet" href="index.css" >
</head>
<body>
@Dletta
Dletta / Readme.md
Created July 11, 2022 13:00
Logsender - NodeJS, QRYN

Log Sender for QRYN

This gist outlines a logsender that can be used as a template to send logs to QRYN. This may be used to manipulate logs or create certain types of logs. In the example we assert 2 log types as an example:

JSON Log Stream

A JSON object that asserts some random values on each message.

Metric Stream