Parsing the HTTP "Date" header in Python

As per RFC 7231 §7.1.1.1: A recipient that parses a timestamp value in an HTTP header field MUST accept all three HTTP-date formats. These formats are then described as (with the first being the only preferred format; the latter 2 are designated as "obsolete"), converted for this post into strftime(3) syntax: %a, %d %b %Y…

Basic JS Async Cookbook

// aXMLHttpRequest: an asynchronous XHR function function aXMLHttpRequest(method, location, responseType="", body=undefined) { // somewhat basic; improvements welcome return new Promise( (resolve, reject) => { const xhr = new XMLHttpRequest(); xhr.open(method, location); xhr.responseType = responseType; xhr.onload = resolve; xhr.onerror = reject; xhr.send(body); return xhr; }); } // asleep: an asynchronous sleep function asleep = (delay =>…

Minecraft: switching from Forge to Fabric

The only amenities I needed were increased FPS, NBT Tooltips, Fancy-leaves-on-Fast-graphics, Zoom, and Saturation Display. These are provided on Fabric, respectively, by: Sodium NBT Tooltip Also Sodium (once they fix #233) Cull Leaves, for now WI Zoom AppleSkin I will update this post as I use more stuff. I will cross out, but not delete,…

Minecraft: Opening a Java sever to console and mobile clients

Due to the work of some brilliant people, it’s now possible to open a Minecraft Java Edition server to Bedrock Edition clients; and, due to another brilliant dude, it’s possible to connect even the nerfed console ports up to an arbitrary server. This means you can have simultaneous crossplay among the whole cornucopia of PC,…

JS: Tail-call optimized recursive setTimeout

If you're writing some code on a time-delayed-loop in JavaScript, there are 2 main options: setInterval setTimeout, recursively However, each has a potential downside: setInterval schedules the code to run at the given interval, regardless of whether the last invocation has completed. This means that, if the function takes longer than the delay to execute,…

[DRAFT] Pleroma on Docker Compose

This testing was done with Pleroma 2.2.0, in environment CentOS 8 (Before starting, be sure docker and docker-compose are installed, as well as git, and NGINX.) Fetch and prepare the source code: git clone -b stable –depth=1 "https://git.pleroma.social/pleroma/pleroma.git" && cd pleroma git fetch –depth=2 "https://git.lain.church/squeegily/pleroma.git" "features/docker-compose":"features/docker-compose" && git -c "user.name=Anonymous" merge –no-commit "features/docker-compose" sudo chown…