Skip to content

Instantly share code, notes, and snippets.

View msigwart's full-sized avatar

Marten Sigwart msigwart

View GitHub Profile
@msigwart
msigwart / soketi-node-healthcheck.js
Created November 13, 2023 09:21
soketi-node-healthcheck
#!/usr/bin/env node
const http = require('node:http');
const options = {
hostname: 'localhost',
port: process.env.SOKETI_PORT || 6001,
path: '/',
method: 'GET'
};
@msigwart
msigwart / reason.js
Last active July 11, 2022 07:29 — forked from gluk64/reason.js
// This is universal, works with Infura -- set provider accordingly
const ethers = require('ethers')
//const provider = ethers.getDefaultProvider('rinkeby')
const provider = new ethers.providers.JsonRpcProvider(process.env.WEB3_URL)
function hex_to_ascii(str1) {
var hex = str1.toString();
var str = '';
for (var n = 0; n < hex.length; n += 2) {