Yeah, lots of people out there saying "leenucks doesn't have a dns cache!!1!" — well, recent versions of Ubuntu do ootb, and just restarting NetworkManager doesn't clear it for some ungodly reason… flush it with sudo systemctl restart systemd-resolved
mcomix system-level requirements
Say you don't want sweeping system changes for something idiosynchronous like an unstable build of a comic book viewer…
The "real way" to run X11 apps as another local user
xhost +SI:localuser:$someoneElse
Quick Fix: remove "Mozilla VPN" ads from Firefox Private Browsing window
/* ~/.mozilla/firefox/…/chrome/userContent.css */
/* Remove advertisements for Mozilla VPN */
@-moz-document url(about:privatebrowsing) {
.promo {
display: none;
}
}
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: …
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: 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: …
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 elements with .language-mathjax. Here's how that's done (for v3): MathJax = { tex: { inlineMath: [ ['$', '$'] ] }, startup: { elements: ['.language-mathjax'] } …