Much of happiness is hope, no matter how deep the underworld, in which that happiness was conceived.

Called upon properly, the internal critic will suggest something to set in order, which you could set in order, which you would set in order, voluntarily, without resentment, even with pleasure.

Ask yourself: is there one thing that exists in disarray in your life or your situation, that you could and would set straight? Could you, and would you, fix that one thing, that announces itself humbly, in need of repair?

Could you do it now?

Imagine that you are someone with whom you must negotiate. Imagine further, that you are lazy, touchy, resentful, and hard to get along with. With that attitude, it’s not going to be easy to get you moving. You might have to use a little charm and playfulness. 😉 “Excuse me” you might say to yourself (without irony or sarcasm), “I’m trying to reduce some of the unnecessary suffering around here. I could use some help.” (keep the derision at bay).

“I’m wondering if there’s anything you would be willing to do? I’d be very grateful for your service.” Ask honestly, and with humility.

(offers reward for doing the dishes)

Then you could listen. Maybe you will hear a voice inside. Maybe it’s even the voice of a long lost child. Maybe it will reply. “Really? You really want to do something nice for me? You’d really do it? It’s not a trick?” This is where you must be careful. That little voice, that’s the voice of someone once burnt and twice shy. So you could say, very carefully, “Really. I might not do it very well, and I might not be great company, but I will do something nice for you. I promise.” A little careful kindness goes a long way. And judicious reward is a powerful motivator. … and then do the damned dishes.

And then you’d better not go clean the bathroom, and forget about the coffee or the movie or the beer, or it will be even harder to call those forgotten parts of yourself forth from the nooks and the crannies of the underworld.

Jordan B Peterson – Twelve Rules for Life: An Antidote to Chaos

Selling some stock

I happen to have a need to raise some cash, so it’s time to sell some stock. Some of it, I’m going to liquidate, and call the loses final. Others, I’m going to shave back and get the cash, but leave as much as I can in there, so that they continue to grow.

APRN – Man, what a stinker. I was using the Blue Apron service, and loved it (for a while), so I bought in shortly after they did their Initial Public Offering (IPO). The next day after, one of the stock guys I listen to said (essentially) “don’t buy APRN – this IPO is just a liquidity event for the initial investors; they are going to take your cash and run. It’s going to be a terrible stock.” That information was too late – I’d already bought. Worse, when it was near it’s bottom, my pride told me to put in some more, so as to dollar-cost-average my loss, so that if it did come back, it would be easier to cross into the black. All in all, I will be down 91%. All I’m really getting is peace of mind, to no longer be reminded of this stinker.

ADXS – Another stinker. This one was supposed to be a good biotech play; but something happened, and the entire market has just trashed this stock. I might as well get out, because it looks like it will never come back. Down 99%. Worse – the trading commission is actually more than the liquidation reap of what is left. Thankfully, I only had $500 in there in the first place. Again – peace of mind, getting rid of this stinker.

AA and ARNC – Way back when, I heard that Alcoa was a good idea, so I went with it. There was probably a momentary opportunity to make some money (listening to stock picker guys who don’t have that great a track record (again)). There was some sort of corporate fight over control of the Board, and it split into two stocks: Alcoa and Arconic. And then both fell. I don’t have much of this loser, but I’d like to get rid of it anyway. Down 15% on Arconic. Forgot to look at the down percentage on Alcoa.

XOM – At one time, Exxon-Mobile was the greatest petroleum company in the world. Might still be. But I had a single share, and I’m down 20% on it. I’ve held it a long time, but it never quite ever made it back into the black. Might as well be done with the mental overhead of seeing it on the list.

NUAN – Nuance Communications. This was another stock suggestion by one of the guys I listen too. Problem is, someone whispered in his ear that with all the AI stuff going on, these people were going to get swept up in the growth of the industry. But that’s not how technology companies work. So it’s been dead money for a long time; I will be down 1%, but at least I’ll have the cash I put in way-back-when. By the way, after I bought the stock, (months later) out of the blue, the networks team sends me work order to help integrate the Nuance software with our email system. I had no idea; but the fact that they were making sales (well, at least one) caused me to hang on to this stock probably longer than I should have.

SQM – This is a South American mining company; I bought it because I thought they had a lot of metals needed in the high tech battery industry. But the more basic resources are down, and South America in general is not a fun place right now, so I’m down 54%. I’m getting out.

REMX – VanEcke Rare Earth Metals ETF. Similar idea to SQM, but ETF’s are probably not a good long term hold. I’m down 40%, and getting out.

CRSP – Crispr Theraputics. Actually, I’m up 142% on this stock, so I’ve sold enough to cover my initial cost, and will let the rest ride.

INTC – Intel. Similar story: I’m up 90%, so I’m selling not quite 1/2 so that what remains is “free money”.

MU – Micron Technology. I bought both Intel and Micron about the same time, because I love the idea of their Optane memory technology. The two companies have a research / manufacturing partnership for this technology, and I think it’s great. Since I’m up 44%, I might as well sell enough to cover the cost I initially got in at, and let the rest ride as “free money”.

CY – Cypress Semiconductor. This was a 5G play, and I’m up 63%. Same story: sell what it cost, so the rest is free money.

SWKS – Sky Works Solutions. You know that stock picker guy I listen to, who so often steers me wrong? Well, he was talking to a different stock picker guy, and they both liked this stock, and they were right. Apparently the company makes wireless modem chips that go to a small cell phone company you might have heard on named Apple. I’m up 19% (although at times, this stock was up 50%). I needed to get the total amount a cash from today’s sales to a certain point, so I sold five shares.

And there you have it: thirteen sales to generate cash I will need in a few days. Some of it was getting rid of losers that make me feel bad. Some of it was selling the same dollar amount as it cost me to get in; what is left in, I am happy to let ride. If it goes up, that is great! If it goes down, I don’t really care, since I’ve gotten my initial investment out of it.

WordPress multisite and Let's Encrypt certificates for multiple sites

I’m using the Bitnami images for my WordPress installations, and am very happy with them. However, it got a little weird when I added a new site to my WordPress multisite instance.

The secret was to run a few commands by hand:

sudo /opt/bitnami/ctlscript.sh stop apache
sudo /opt/bitnami/letsencrypt/lego  --path="/opt/bitnami/letsencrypt/" --email="david@some-domain-name-i-am-not-publishing-here" --domains="gerisch.org" --domains="www.gerisch.org" --domains="test.gerisch.org" --http run
sudo /opt/bitnami/ctlscript.sh start apache

Earlier, I had run the Bitnami bncert-tool which wrangled my Apache configuration so that all attempts to go to an http:// address were re-written to go to an https:// address. This is very good. But when I added the test.gerisch.org web site, the certificate provided by Let’s Encrypt did not have a SAN (Subject Alternative Name) entry for “test”. So trying to visit that site got the ominous “this site is insecure – nothing provides for an SSL certificate for it”. True enough.

By running the /opt/bitnami/letsencrypt/lego script with multiple –domains arguments, I could update the requested certificate to have the additional SANs I wanted. Very nice. It was the Bitnami community support web site that gave me this information. The same page warns me that more than five requests for new certificates puts the certificate issuer into a time-out corner for one week. So that is something to be aware of.

How to make Ubuntu have a nice bash shell like OpenSuSE

There are two features of OpenSuSE that I love when logging in to the command line, that do not exist in Ubuntu. Problem is, I’m renting web servers from Amazon, and those are Ubuntu. So I log in to them with ssh, and the bash completion features I want are not there. This post will be documentation of how to get back to the settings I want.

Apparently, theses used to be the settings that most Linux distributions came with. But someone somewhere decided they had a better (in my opinion: worse) plan, and the rest of the world didn’t push back. Well, except for OpenSuSE. Since I cut my teeth on SuSE, I grew to really like those features, and badly miss them when I’m on a Ubuntu box.

First up: change the editor to VIM

On these new boxes, the file ~/.bash_profile does not exist. That’s fine; Ubuntu will read it on login if it does exist.

vim ~/.bash_profile

Get into insert mode with <ins>

export EDITOR=vim

Because the presence of .bash_profile breaks .bashrc (used later), add this to .bash_profile:

[ -r $HOME/.bashrc ] && source $HOME/.bashrc

Save and exit VIM with <esc> : w q

Now, if you are looking at a file with “less” and you want to then edit it, you can hit the letter “v” and be editing the file.

I imagine that way back when, “v” was a way to think “VIM”; but once Ubuntu changed it’s default to the nano editor, that doesn’t really map any more. This changes it back.

Second up: alias the change directory command up-one-level to ..

vim ~/.bashrc

Find the list of alias commands, and move to the bottom line in the list of aliases, and do a “yank”, then a “paste” in VIM:

yy
p

Then get into edit mode by hitting the <ins> key, and modify the pasted command to be this:

alias ..='cd ..'

Get out of insert mode with <esc> and :wq to write the file and quit VIM

If you exit your ssh session, and log back in, the .. command should now take you up one level in the directory hierarchy. Much nicer than having to type cd ..

Third up: bash history search command

We will be editing /etc/inputrc

The tricky part here is that /etc/inputrc is a system file, and attempting to edit it warns that I won’t be able to write and quit. I don’t have permission to edit this file. The solution is to edit it with permissions:

sudo vim /etc/inputrc

Nicely enough, the commands I want are already there; they are merely commented out:

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward

All I have to do is to delete the “#” character that declares \e[5~ and \e[6~ to be a comment. With VIM, this is the x key