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.

WordPress: Restrict MathJax to a class

I write on a variety of topics, only some of which it's appropriate to have mathematical typesetting for. To avoid triggering a math rendering engine on unrelated use of $purious dollar sign$, while activating it when $\text{necessary}\wedge\text{appropriate}$, I decided to restrict them to only <… lang="x-mathjax">. Here's how that's done (for v3): MathJax = { tex: { inlineMath: [ ['$', '$'] ] }, startup: { elements: [':lang("x-mathjax")'] } }; …

Getting OpenNIC to work with pfSense

If you're using an alternate DNS root server such as OpenNIC, and your network uses a pfSense-based router, you may find that clients are, strangely, unable to resolve unofficial TLDs, getting SERVFAIL or NXDOMAIN. There are 3 ways I can think of to quickly solve this problem for the whole network, listed here in increasing order of complication: 1. Disable the DNS resolver Go to Services > DNS Resolver …

[WIP] Namecheap let's encrypt

First, go to cPanel's SSL/TLS, Private Keys, View. Note the ID of your TLS key; copy it to your clipboard or something. (Be careful not to grab any extraneous spaces or anything; triple-clicking to select the whole line did work for me, but just be sure you're paying attention.) Then, go to cPanel's Terminal and execute the following commands: mkdir -p ~/virtualenv /opt/alt/python37/bin/python3 -m venv ~/virtualenv/simp_le bash . ~/virtualenv/simp_le/bin/activate …