Skip to content

Instantly share code, notes, and snippets.

Avatar

papouch.com Papouchcom

  • Papouch s.r.o.
  • Strašnická 3164, Prague, Czech Republic
View GitHub Profile
@Papouchcom
Papouchcom / binary.js
Created Jun 26, 2020 — forked from mathewmariani/binary.js
A quick look at signed and unsigned integers in JavaScript.
View binary.js
var UInt4 = function (value) {
return (value & 0xF);
};
var Int4 = function (value) {
var ref = UInt4(value);
return (ref > 0x7) ? ref - 0x10 : ref;
};
var UInt8 = function (value) {
@Papouchcom
Papouchcom / mod_post_multicast_msg.lua
Last active Dec 15, 2020
Clone of Prosody mod_post_msg allowing sending multicast messages/chat via JSON + PHP script example.
View mod_post_multicast_msg.lua
module:depends"http"
local jid_split = require "util.jid".split;
local jid_prep = require "util.jid".prep;
local msg = require "util.stanza".message;
local test_password = require "core.usermanager".test_password;
local b64_decode = require "util.encodings".base64.decode;
local json = require "util.json";
local function require_valid_user(f)
You can’t perform that action at this time.