View md-diff.sh
#!/bin/bash
# ./md-diff.sh xep-0001.xml 40afc22 40afc22^ [fancydiff] [some pandoc supported format]
${4:-diff} \
<(git show "$2:$1" | ./xep2md.sh | pandoc -st ${5:-markdown}) \
<(git show "$3:$1" | ./xep2md.sh | pandoc -st ${5:-markdown})
View mod_s2s_certinfo.lua
local xmlns = "http://zash.se/protocol/s2scertinfo";
local st = require"util.stanza";
-- local dump = require"myserialize".serialize;
local base64_encode = require"util.encodings".base64.encode;
local s_char, s_gsub = string.char, string.gsub;
local tonumber = tonumber;
local function unhexbyte(c) return s_char(tonumber(c, 16)) end
local function unhex(s) return s_gsub(s, "..", unhexbyte) end
local function hex2b64(s) return base64_encode(unhex(s)) end