Author: jay-s

  • Linux terminal commands: showing non-match

    Sometimes you want to weed out the “cannots.”

    The following is as I recall it.

    Yesterday I was in a server file system using the Linux terminal. I wanted to know about the folders the terminal could access, not the ones it couldn’t. Yet, there were more it couldn’t.

    I pipelined the command into grep:

    command | grep -v “cannot”

    but it was still showing the “cannot” lines.

    I learned from another source that the reason is grep only works on standard output, file handle 1 in the terminal, whereas “cannot” typically will come from standard error, file handle 2.

    When I tried

    command 2>&1 | grep -v cannot

    I got what I was hoping for. Apparently 2>&1 feeds standard error into standard output, so grep can work on it.

    Interesting, eh?

    Source:

    stackoverflow.com

    man7.org

    -JS

  • Document types, formats: file size, part 0

    Looking at relative file sizes for the same content.

    The following is by my understanding.

    One issue that’s long interested me is file size. I opened a plain-text document, then typed Hello world! and saved it. Next, I did the same for a Word (docx) document. Then, I also saved the docx as a pdf in Word. Finally, I compressed both the docx and the pdf to respective zip files.

    Here are the relevant file sizes:

    • .txt file: 12 bytes
    • .docx file: 13 kilobytes
    • .pdf file: 71.9 kilobytes
    • compressed .docx file: 10.4 kilobytes
    • compressed .pdf file: 60.6 kilobytes

    Today I looked into the .docx format specifically, why it might be so much bigger than its plain-text version.

    It turns out that the .docx format consists of numerous .xml files that describe said document. Said files, one might suspect, amount to overhead of about 13 kilobytes.

    Interesting, eh?

    Source:

    agiledocumentation.co.uk

    -JS

  • Web: is my site on a LiteSpeed server? (Finding out from Firefox)

    Being on a LiteSpeed server, you can possibly use the LiteSpeed Cache.

    The following is by my understanding.

    Once a site gets busy, for instance a WordPress site, a cache can make the difference between the site being slow versus normal.

    On my oldest WordPress site, which went up in 2012, I have always used LiteSpeed Cache, except for a couple of interruptions during updates. When I had to run the site without it, I really noticed how much slower it loaded. On that site, LiteSpeed Cache is the only plugin I use. (See my post from June 5, 2026 for some background thoughts about plugins.)

    So, LiteSpeed Cache is a plugin that I like. However, as I understand, in order to use the LiteSpeed cache, one needs to be hosted on a LiteSpeed server. (Perhaps that’s a slight oversimplification, but likely good enough for a starter’s perspective.) How does one discover if they are?

    Here’s how I did so on Firefox:

    1. On a page from the site, right-click on a non-active part. From the drop-down, click Inspect.
    2. On the new pane that appears, find Network and click on it.
    3. Reload the page. A bunch of resources will be listed as they load.
    4. Click on any of the resources. A new pane will appear; on it, find Headers and click it.
    5. Underneath the Headers title, find Response Headers and scroll down. An entry like server: LiteSpeed indicates that, indeed, the site is on a LiteSpeed server.

    There are many potential directions to follow from this post. One motivation for finding if one’s on the LiteSpeed server is to discover whether using the LiteSpeed Cache is a possibility, perhaps even as a plugin if the site is WordPress.

    For follow-up I intend to mention corresponding directions relevant to Chrome and related browsers.

    Source:

    docs.litespeedtech.com

    w3.org

    -JS

  • LibreOffice Calc: circular reference

    A formula in which the answer depends on itself is called recursive in computer science. Some spreadsheets call it a circular reference.

    The following is my understanding.

    Let’s imagine the following case: tax is assessed as 35 percent of an earner’s after-tax income. Such a calculation is a circular reference: tax=0.35*(Income-tax).

    LibreOffice Calc allows such a calculation. However, circular reference needs to be enabled. Under Tools->Options->Calculate, check a box Iterations. I set the Minimum change to 0.001, then clicked OK.

    Next, I went to cell a1 and typed 75000, then to c1 and typed =0.35*(a1-c1). The answer appeared in c1: 19444.44.

    In that case, 19444.44 should be 35 percent of (75000-19444.44). Well, 75000-19444.44=55555.56, and 35 percent of 55555.56 seems to be 19444.44. Apparently, LibreOffice Calc delivered:)

    Source:

    software.codidact.com

    -JS

  • Email: did you become spam?

    A user’s email address might suddenly be downgraded to “spammer”: what it might look like and what can be done.

    The following is my understanding.

    Last fall (around eight months ago) I sent an email from an account I’d used for years. It bounced back. I’ve had that happen before, but rarely, and typically it turned out the problem was at the intended receiver’s end. However, this time seemed different, especially when I sent an email to a colleague and never got a reply. I was intrigued.

    I tried sending emails to some of my own, other email addresses. One gave a bounce back. The other received the email, but put it in Junk. Yet, that account had received emails from the sending one before, and had never done so. Something had changed.

    I realized that one can find headers on email that explain how the handling facilities perceive the email. In the receiving account, I checked the headers.

    Three headers of interest are DMARC, SPF, and DKIM. In broad strokes, DMARC comes up with the decision to label a message as spam or not, based on DKIM, SPF, and possibly other reasons.

    SPF is Sender Policy Framework, where a domain may list all servers whence they send emails. If an email comes from a server not listed by that domain’s SPF, it’s classified as spam or worse.

    DKIM is DomainKeys Identified Mail, and is cryptographic confirmation that an email came from the domain it says it did.

    DMARC is Domain-based Message Authentication and Reporting Conformance. It is the rule set that is used to classify an email, based on DKIM and SPF.

    DMARC, SPF, and DKIM may each have “PASS” or “FAIL.” FAIL can mean Spam or not even delivered, depending on local settings.

    In my case I checked the email headers and discovered that the SPF didn’t align: my emails were being sent from a new server that wasn’t listed with that domain’s SPF. I alerted my internet host and they cleared it up. As I recall, one of the headers cleared in a few hours, the last one within 48 hours (possibly within just 24 hours).

    After that, I sent a few practice emails that yielded good results at the receiving accounts. Next I sent a few emails to colleagues explaining I was testing the account. Things have been fine ever since, it seems.

    Source:

    askleo.com

    cloudflare.com

    -JS

  • LibreOffice Calc: Goal Seek

    Goal Seek can be used to solve equations.

    The following is how I understand it.

    Let’s imagine this scenario: cost is 1000 +0.44x, while revenue is 1.5x, where x is units sold. What, then, is the break-even point for units sold?

    In LibreOffice Calc, Goal Seek could be used to find the break-even point.

    In one cell (say a3), one types the formula 1.5*c3 – 0.44*c3 – 1000.

    It seems to me that the variable cell (in this case c3) needs to be initialized in order for Goal Seek to work. So, in this case, one might just enter 0 in c3.

    Next, in the Tools menu, find Goal Seek. It first asks what the Formula cell is, which in this case would be a3. Next, it asks what the Target value is: in this case, 0. Finally, it asks for the Variable cell: in this case, c3. Next, click OK or else press Enter.

    When I did so, Goal Seek replied that it had succeeded, and that the answer would be 943.396 (to 3 decimal places). It asked if I would like that value entered into the variable cell, and I clicked Yes. 943.396 then appeared in c3.

    Slick, eh?

    Source:

    help.libreoffice.org

    -JS

  • Web: subdirectory vs subdomain

    Subdirectories and subdomains can be used to organize web content. What are they, and how are they used?

    The following is my understanding.

    Let’s imagine a site called site101.tld101. In such a case, tld101 is the top-level-domain or tld. The domain, aka root domain, is site101.tld101. Furthermore, site101.tld101/blog is a subdirectory.

    Imagine then the address uppersite.site101.tld101. In that case, uppersite is a subdomain.

    Subdomains, it seems, are seen by search engines as separate sites from the domains they are hosted on. A subdomain, therefore, can be used to host separate content from what’s on the root domain. A subdirectory, on the other hand, is treated by search engines as part of the root domain site.

    Source:

    lovable.dev/guides

    namecheap.com

    -JS

  • Energy, accessories: charging banks

    You often see charging banks, aka power banks, among accessories. How are they used, and are they needed?

    The following is by my understanding.

    For this post, and commonly on this blog, phone refers to smartphone.

    My wife and I were recently in Vancouver, where we were bargain shopping, as usual. We found, in one store, a clearance deal on some power banks, which I call charging banks since one might charge their phone from one.

    Power banks I recall from the early 80s (but likely existed before that), advertised in computer magazines. The idea was that if you lose power, you lose everything in RAM. To prevent that, one could hook up their system to a power bank. Then, power from the wall could simultaneously maintain the bank at one hundred percent and also run the computer like normal. When power from the wall was lost, though, power could flow from the bank to the computer, so its power wouldn’t be interrupted. Back then, some ads I saw claimed they could run the computer for up to twenty minutes after power loss. One imagined that was easily enough time to save everything, close everything, and power off the computer normally. Then, one would wait for the power to return. Said power bank wasn’t meant to run the computer normally, just as a stopgap from power outage to safety. I never saw one of those power banks; only serious enterprises had them.

    Nowadays, of course, some people’s phones seem to run out of juice (aka energy) fairly often. It’s no wonder why: some phone apps can drain one percent of battery per minute, and it’s common for people to have numerous apps going at one time. One imagines having to replenish the phone’s energy one to several times per day, besides charging it in the evening at home (for instance).

    The charging bank is an obvious answer to the above scenario. I didn’t know how they are used exactly. The ones we found on clearance in Vancouver said, on the box, the energy capacity (10000mAh) and types of plugins on it (USB C and USB A). Nevertheless, the power banks seemed a very good deal, and we have two gen-Z sons, so we bought a couple of the charging banks. I hoped for more instructions inside the box.

    Yesterday my wife presented one of the charging banks to my younger son. He immediately opened the box. “Are there instructions?” I asked. “No,” he answered, “but I think I can figure this out.” He just took his phone charging cord (USB C both ends), plugged one end of it into the charging adapter at the wall, and its other end into the charging bank. “There: it must be charging now,” he said. I think there were lights on it that also suggested that. Later that day, away from home, he recharged his phone from it.

    One assumes both charging to the bank, then later receiving energy from it to his phone, would have been accomplished from the same port on the bank, since it only has one USB C port.

    Being a gen-Xer, I thought the idea of the USB C port being able to both accept energy from the wall, then later supply it to a device, was a lot to assume. To my son, however, it makes perfect sense. He seems very happy with the charging bank.

    Interesting, eh?

    Source:

    planhub.ca

    -JS

  • WordPress: Plugins: another let-down

    WordPress: Plugins, continued…

    The following is my take.

    I start about WordPress plugins in my post from June 2, 2026. I typically run a cache one, and sometimes that’s it.

    I thought about doing a post today about a plugin to make backups. Backups are important to safeguard content from errors, malfunctions, etc. Before doing any manual update, making a backup is likely a good idea. That’s what I do, anyway.

    So, I had a plugin installed which I was going to use to do a backup, then report about it.

    The plugin crashed: it just remained stuck at 0 percent completion. When I clicked the “Stop” button in its menu, I got a message back saying the process couldn’t be stopped.

    I logged into the server and stopped the plugin from there. Next, I deactivated, then deleted the plugin.

    I never keep plugins around that don’t stop when I click “Stop.”

    A plugin isn’t needed to make a backup of a WordPress site; a backup can be created manually. However, some plugins, assuming they work, might make it more convenient.

    Not in this case, apparently:)

    -JS