alias mcrcon='env MCRCON_PASS="${MCRCON_PASS=$(sed -n -e '\''s/^rcon\.password=\(.\+\)/\1/p'\'' < server.properties)}" mcrcon'
Python: Using XOFs for general-purpose Random
As always, one's own stack overflow answers make the best blog posts. In this case, we craft a version of random.Random with a few modifications: Pulls its data from an arbitrary stream (in our case, a DRBG such as a hash function or deterministic CSPRNG) Wastes noticeably fewer bits when generating random integers Has fixed code for .shuffle, on the offchance CPython ever changes theirs, and to make it …
Javascript: Parsing query parameters
There are at least 2×5×7×3×3×1=630 different things you might unambiguously mean by "parsing" a query string in Javascript: …
Converting SVG to .ico with Python
Just a super rudimentary script that I made which hooks CairoSVG up to Pillow because apparently Firefox doesn't support SVG-formatted browserAction images
Python: "with epoll"
If you're using Python 3.4+, select.epoll
already supports context — you're clear to just write with epoll() as E: …
and everything will be OK. If not, here's how to shim it:
Is Gab a controlled-opposition operation?
This post will be sort of an "archive" of everything about Gab that gives me the heebie-jeebies.
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, it'll schedule the next invocation before the current invocation is finished, which can lead …
[DRAFT] Pleroma on Docker Compose
This testing was done with Pleroma 2.4.1, in environment Rocky Linux 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=10 "https://git.pleroma.social/pleroma/pleroma.git" && cd pleroma git fetch –depth=20 "https://git.lain.church/squeegily/pleroma.git" "feature/docker-compose":"feature/docker-compose" && git -c "user.name=Anonymous" -c "user.email=nobody@localhost" merge –no-commit "feature/docker-compose" read -p "Enter your domain name: " pleroma_domain Build it: mkdir -vp uploads …