## Python: Nested in-line "for" statements

You must leave the fors in the same order as in the code-block form, only popping the inner expression itself to the front:…

## 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'] } …

## ESXi: auto-reboot after Purple Screen of Death

Shamelessly stolen / archived from / hat-tip to this other website, vSkilled, for their post on this. I'm just copying the important details here for when they go under or get consumed by advertisements. esxcfg-advcfg -s 120 /Misc/BlueScreenTimeout # (That's for a two-minute wait; adjust to taste)

## 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

## 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 …

## Applying highlight.js to inline code on WordPress

If you're using the plugin Prismatic to apply highlight.js to your code excerpts, but you want it to also affect inline <code> tags (i.e. not only those wrapped in <pre> blocks), simply go Settings > Prismatic > Highlight.js and paste this into the “Init Script” field: hljs.configure({ cssSelector: 'code' }); hljs.highlightAll(); — then be sure to remember to add the language-* classes to your inline <code> tags! You may …

## Breaking out of multiple "for" loops in Python

Python doesn't support break some_label; or break 3;, but it does support for-else