Skip to content

Instantly share code, notes, and snippets.

View meszaros-lajos-gyorgy's full-sized avatar

Lajos Mészáros meszaros-lajos-gyorgy

View GitHub Profile

Skagen Hybrid communication

Basics

Every command starts with 1 byte indicating if the command is a request-, write- or response-command. (All bytes are hexadecimal). Every group of bytes is little endian.

A request-command starts with 01 and gets a response-command from the watch, starting with 03. (See Requests for more info)

A write-command starts with 02. (See Writes for more info)

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active June 10, 2025 19:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@miguelmota
miguelmota / buffer.js
Created August 24, 2014 18:33
Node.js Buffer to ArrayBuffer
// @credit: http://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer
// From Buffer to ArrayBuffer:
function toArrayBuffer(buffer) {
var ab = new ArrayBuffer(buffer.length);
var view = new Uint8Array(ab);
for (var i = 0; i < buffer.length; ++i) {
view[i] = buffer[i];
}
@paulirish
paulirish / gist:5558557
Last active February 26, 2025 18:07
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa