Since Marco d'Itri's whois(1) v5.5.0 released in July 2019, most sysadmins no longer need to do trial-and-error or detectivework to guess which of the 5 RIRs controls the IP attacking you and then hunt down the appropriate WHOIS server—the -I
flag will now do that annoying accounting on your behalf
Switching to Picom (Compton) on the MATE desktop
You may have read some convoluted (and outdated—Compton was abandoned in 2017) tutorials on the matter like MakeTechEasier's, or perused the excellent Arch Wiki article's page on it to some despair, but if you are just a layperson who installed the MATE desktop for e.g. Ubuntu 20.04 (Fossa) and wants a slightly faster (i.e. GPU-accelerated) environment, there is a workaround that doesn't take too long to set up: …
[DRAFT] U.S. Obscenity Ban: Name & Blame
An 1873 federal bill to ban smut, abortion pamphlets, and sex toys was never found unconstitutional; instead, only the clauses that meaningfully impacted the ability of the American public to be sexually promiscuous were overturned, piecemeal, under the banner of "civil rights". I will attempt to give a breakdown (including partisan affiliation) of the people behind this bill's tortured history.
Transcript: Dr. Ryan Cole on Vitamin D and COVID
Transcribed from 0:52–24:13 of the Week 8 recording at lgo.idaho.gov/capitol-clarity/
[DRAFT] Ghetto Guide to CMS
Interpretive labor on RFC 5652 and RFC 5280
mcrcon: auto-parse password
alias mcrcon='env MCRCON_PASS="${MCRCON_PASS=$(sed -n -e '\''s/^rcon\.password=\(.\+\)/\1/p'\'' < server.properties)}" mcrcon'
Javascript: calling asynchronously-initialized libraries from synchronous code
With the power of await, this isn't so difficult: let nacl, scrypt; function main() { /* Synchronous code that calls nacl and scrypt */ } (async () => { [nacl, scrypt] = await Promise.all([new Promise(nacl_factory.instantiate), new Promise(scrypt_module_factory)]); return main(); })();
Auto-updating userscripts hosted on Github Gist
In the process of crafting this small set of improvements to Advance Wars By Web, I found out about the proper URL for auto-updating userscripts which are hosted on Microsoft's "Gist" service: // @updateURL https://gist.githubusercontent.com/������/����������������/raw/�����.user.js This will always redirect to the latest version of the file.
Javascript: getElementByXPath
function getElementByXPath(path, context=null, document=null, namespaceResolver=null, first_ordered=true) {
if (context === null) context = window.document.documentElement;
if (document === null) document = context.ownerDocument;
if (namespaceResolver === null) namespaceResolver = document.createNSResolver(context);
const result = document.evaluate(path, context, namespaceResolver, first_ordered ? XPathResult.FIRST_ORDERED_NODE_TYPE : XPathResult.ANY_UNORDERED_NODE_TYPE, null);
return result.singleNodeValue || null;
}
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 …