PhillipBlanton.com

Phillip H. Blanton invites you and a guest to talk about him.

Preparing a GoDaddy Shared Hosting Environment for a Node.JS Application

I am working on a Node.JS project for a friend and he decided to use a GoDaddy shared hosting package to host the site once it's done. So... as part of my development and testing, I went and bought the same package and set up my CICD to deploy the project to it so that I'd have no ugly surprises when I went to ultimately deploy the project to production.

Unfortunately the GoDaddy shared hosting packages don't support Node.JS apps natively and without the ability to sudo and install very many tools, many people think they are stuck and cannot use GoDaddy shared hosting for Node.JS. That's not necessarily true and if you carefully follow this guide, you should have node.js installed and hosting apps in about 15 minutes - barring any unforseen problems.

  1. Either set up SSH to your GoDaddy shared hosting package, or just use the "terminal" available in your CPanel.
  2. Install Node.JS on your instance
    1. download the latest version of Node.JS to your local machine and unpack it.
      https://nodejs.org/en/download/
    2.  Then zip it back up as a "zip" file and upload the zip file to your Shared Hosting installation using the CPanel File Manager.
    3. Using the CPanel's terminal or a terminal connected via SSH, unzip the file using the "unzip" program and rename the result to just "nodejs"...
      $ unzip <filename>.zip
      $ mv node-v14.5.0-linux-x64 nodejs
    4. If one doesn't exist, create a "bin" folder in the home directory on your shared hosting home directory.
      $ cd ~
      $ mkdir bin
    5. Move the extracted Node.JS binaries to the bin directory and set its permissions...
      $ mv nodejs/bin/node ~/bin
      $ chmod 755 node
    6. switch to the bin directory and add  a symlink for the npm program...
      $ cd ~/bin
      $ ln -s ../nodejs/lib/node_modules/npm/bin/npm-cli.js npm
    7. Check that everything is working ...
      $ node -v
      $ npm -v
      $ nvm --version
      If each command returns with no error then you are good. If however, node, or npm throws an error, then you'll need to roll back to an earlier Node.JS version that GoDaddy supports. At the time of this writing, anything below version 12.0.0 will work. Versions 12.0.0 and up will not. so...
    8. Install Node.JS version 11.15.0
      $ nvm install v11.15.0
      and test it again...
      $ node -v

      $ npm -v
  3. Once you have Node.JS installed on the server, using the terminal, navigate to /home/<your username>/public_html and check for the .htaccess file. If it doesn't exist then create it and put this content in it...
    RewriteEngine on
    RewriteRule  (.*)  http://localhost:3000/$1  [P,L] 
  4. Create a new file in the public_html directory called "app.js" and add this content to it...
    const http = require('http');
    const hostname = '127.0.0.1';
    const port = 3000;
    const server = http.createServer((req, res) => {
      res.statusCode = 200;
      res.setHeader('Content-Type', 'text/plain');
      res.end('NodeJS server running on Shared Hosting\n');
    });
    server.listen(port, hostname, () => {
      console.log(`Server running at http://${hostname}:${port}/`);
    });
  5. From the public_html directory, run these commands...
    $ which node
    This should return the the path to node.js, ie: "~/bin/node". If so then you're good to go. If not, figure out why and fix it.
    $ node app.js &
    This will start the app.js file as a node.js server and the "&" will instruct the platform to run it in the background.
  6. Browse to the domain name associated with your GoDaddy hosting package and you will see the following line from your app.js file...
    NodeJS server running on Shared Hosting
    If so, then your shared hosting package has node.js installed on it! 

VMWare Workstation error "VMware Workstation unrecoverable error: (vcpu-1)" on Windows 10 host.

Update 1/12/21: My PC took updates again yesterday that re-enabled the Hypervisor, making my VMWare machines refuse to start up again. Ugh. Stop it Microsoft!

Update 12/17/20: I wrote this article on December 14. Here it is three days later, and a Microsoft update has broken my ability to run VMWare virtual machines AGAIN. This is getting OLD Microsoft!! 

Additionally, the updates keep breaking my mouse scroll wheel settings. This is a new "feature" of Microsoft updates. For a long while the updates left my mouse scroll wheel settings alone, but they have started reversing my settings on that again.

Reversing The Mouse Wheel Scroll On Windows 10

I recently started getting an error whenever I tried to launch a virtual machine using VMWare Workstation version 16.1.0, build-17198959; on my Windows 10 Pro Insider Edition (Build 20277.fe_release_201207-1545) host:

"VMware Workstation unrecoverable error: (vcpu-1)"

The same VMs work fine when I launch them in VMWare Workstation on an Ubuntu or Mint Linux host.

I recently fixed it by turning off Hyper-V and went on my merry way. Here it is exactly seven days later, and my PC took another update from Microsoft which broke it again. How the heck did I find that fix?!?!?

A little browser history snooping and I found it here: https://kb.vmware.com/s/article/2146361

Apparently Microsoft is dead-set on breaking my VMWare regularly so I am going to copy the relevant bits out of that article here, in case that other page dies someday.

HEY MICROSOFT! WHEN YOU DO UPDATES, RESPECT MY SETTINGS AND QUIT REVERTING THEM BACK TO YOUR PREFERENCES!!! I HAVE THEM THAT WAY FOR A REASON!!!

If you have searched for this error and found this article, you're welcome. For the full-details on this error and why it happens, click the link above and go read the knowledgebase article on the vmware.com website.

The following is not by my hand, rather it is shamelessly copy/pasted from the aforementioned article...


Steps to Disable Hyper-V:

Note:
It is recommended to take back up of your data and have system restore points as a safety measure. The following features would not work anymore once the Hyper-V is disabled
  • Credential Guard/Device Guard
  • Windows Sandbox
  • Virtual machine platform
  • WSL2
  • Hyper-V

Verify Virtualization-based Security (VBS) is Enabled/Not Enabled:

      1. Open msinfo32/system information on Windows 10
      2. Under System Summary on the Right-hand page, scroll down to Virtualization-based Security and
          ensure the Value is set to Not enabled.
      3. If the value is set to enabled follow the steps given below according to disable Hyper-V.

1. Turn Off Hyper-V

  1. Go to "Turn Windows features on or off"
  2. Make sure Hyper-v is not ticked.
  3. If it is Ticked, untick it and click "Ok".

2. Open command prompt window as an administrator   

  1. Run “bcdedit /enum {current}”
  2. Note down the hypervisorlaunchtype in case this needs to be reverted
  3. Run “bcdedit /set hypervisorlaunchtype off” to disable hypervisor Close the command prompt after   executing the commands and restart the system.

The password as a security mechanism is long dead.

Your password must be at least 18770 characters long...

That is a real warning message I got some years ago. I saved the screenshot and while looking through old images in my computer, I came across it. It was obviously a programming error, as it was not the real password requirements, but it got me thinking about passwords and how totally broken the idea of securing computer systems with passwords has become.

Red Hat Linux 8 is Available!

Red Hat Linux 8 has been officially released. If you are a developer and want to use Red Hat, but don't want to pay the $99 developer licensing fee, go register for a free developer account at https://developer.RedHat.com.

Follow these instructions for creating a RHEL 8 x64 Hyper V VM on Windows 10.

If you're not using Windows, or you already have VMWare or Fusion, or Parallels, or VirtualBox that you'd rather use, then skip the Hyper V part of the instructions and  follow the rest of them to create your RHEL8 development environment and configure it with the software development suite.

Don't forget to Have a Lot of Fun! --- that doesn't seem right ;-)

Foxit's PDF to Word Convertor Seriously Misses The Mark

Today I was working on a PDF document that needed some changes. For instance, the part where you are supposed to enter your name and address looks like this...

...and the form is not editable. If I were to just print it out, I'd have to use White-Out to cover that up, then find my old typewriter so I can fill in the right information.

While looking at the document in Foxit Reader, I see a link at the top, advertising their "Free PDF to Word Covertor!" so I bonk on it and upload the file.

The resulting *.docx file it returned to me contains the result of taking a screen-shot image of each of the PDF pages, and pasting each one into a word document. It made absolutely no attempt to actually convert a simple text-based PDF document into editable text in a Word document. Purely useless.

I noticed in the botton-right corner of the web page, a little javascript chat window asking me if I needed help. I clicked it and typed "I really don't need help, but since you're asking... your PDF to Word convertor sucks."

They replied, "Great!".

Does anybody actually test any of their software?

 

Microsoft Abandons the Edge Browser.

Microsoft building Chrome-based browser to replace Edge on Windows 10

https://thehackernews.com/2018/12/edge-browser-anaheim-chromium.html

Why is Microsoft spending ANY money on building browsers? Why does Microsoft *NEED* a browser? They've NEVER been good at making them. Let Firefox and Chrome have the browser "market".

I simply don't get why Windows NEEDS to have a "default" browser. Especially one so deeply ingrained into the operating system that it cannot be removed. The only thing the people that I know, use Edge for is to install Chrome and Firefox on a new Windows machine. I wish I could uninstall it after that. It seems a tremendous waste of money for Microsoft to keep investing in browser development. ANYTHING Microsoft deliver will be thought a joke, and only used to ... download Chrome and/or Firefox in a new installation.

In the corporate world eight to ten years ago, ALL websites only had to be IE compatible. Now I regularly see corporate websites that say "Do not use Internet Explorer. This site will only work on modern browsers like Chrome or Firefox." No mention of Edge EVER.

Microsoft. Focus on creating a stable, high-performance, secure operating system that doesn't spy on its users, and let other people worry about building the application stack.

The best things you've  ever done application-wise is the Office Suite (except for Outlook) and the Visual Studio development tool stack. Your servers like SQL Server and IIS are great too, but your other client software has always sucked - Microsoft Bob anyone?.

Your browsers have been garbage for so long that they are perceived as a slightly off-color, mildly offensive joke that just makes people roll their eyes and quietly wish it would just stop. Edge may be a technologically superior application, but nobody is ever going to use it in any real numbers, and whatever you replace it with will be treated the same way.  You've lost the browser war so thoroughly, that you're like Hiroo Onoda; the Japanese soldier found in the Philippine Lubang jungle in 1974, not having been told the war was over. At least that fine man was driven by an overwhelming sense of honor.

Stop fighting a war that's been over for years, and go do something you're good at.

Warby Parker - Crazy, Broken, Bad Experience

I am experiencing one of the things my father warned me about when I was a cocky, know-it-all kid. "Someday that 20-10 vision will fade, and you'll have a hard time seeing things. You'll have to wear glasses and glasses suck." Well, here I am; and I've been here for a while now.

I normally get my eyes examined every three years or so, and that's when I get two new pairs of glasses. One pair of sunglasses and one pair of what I call, "Night-Vision glasses". They're really just clear-lensed versions of my "Day-Vision" sunglasses. I recently got my eyes examined, and armed with my shiny-new prescription, headed to $39 glasses .com

$39 Glasses Dot Com

The last time I bought glasses, I got them from $39 glasses Dot Com and it was a good experience overall, aside from the fact that on the first pair of sunglasses they made for me, the lenses were polarized oppositely from each other, making the world appear a surreal, shiny thing. I sent them back and they fixed it for me, but it did take about ten days to get it remedied.

Of course their name is misleading. My glasses cost about $250 each and NOT $39.

Unfortunately they no longer carry wide frames and I have skull that is a little wider than normal at my temples. Since their site is not equipped to let you search by frame size, I wasted about an hour there before hit the chat button and was told that they no longer carry frames wide enough for me. Dismayed, I moved on to Warby Parker.

Warby Parker

I'm not a hipster, doofus, millennial but Warby Parker has some nice frames that are priced well, plus they offer a "Try Five For Free" deal where you pick five frames that you like, and they mail them to you for a personal fitting session. Plus, they let you search frames by size. They also have a quiz that you can spend about a minute on, that will narrow down the frame selection to only things you'll like. We were off to a good start! I picked five frames and "checked out".

The frames arrived yesterday and none of them fit well except one. The Gilbert in Mission Clay Fade. It was like they were custom made for my head. They sort of "snapped" into place when I put them on and rested lightly wherever they touched me, without slipping in any direction; plus they looked good on this old cowboy-hippie-hacker's face. They were perfect. I packed up all of the test frames and headed to the Warby Parker website to complete my order.

I selected the Gilbert in Mission Clay Fade, and went to select my lens package. I prefer prescription lenses with a standard, lined +2.25 bifocal in both dark gray sunglasses and clear lens packages. I was prepared to buy two pairs of the Gilbert, with different lens packages.

The first hint of trouble was when I noticed that they don't offer regular lined bifocals. Apparently Warby Parker customers are more about vanity and ONLY wear progressives. I tried progressives once and HATE THEM! I'll ONLY wear lined bifocals. They are the perfect multi-vision eyeglasses and I really don't care what others think of the lines. I thought, surely this can't be true. Surely I can get regular lined bifocals from a hugely popular eye-wear company like Warby Parker!? So I chose the Progressives and moved forward, hoping I could change it later; but I cannot.

No Lined Bifocals Available = FAIL

The next choice was the lens color. I was going to order two pairs of glasses. One in clear and one in dark gray, polarized sunglasses. Unfortunately the only choices I had at Warby Parker is clear, and "Light Responsive". I don't like Light-Responsive sunglasses, because I mostly need my sunglasses while driving, and the UV protection in windshields prevents the light-sensing / auto-darkening feature in those from darkening. They're fine for outside, but they are mostly useless in a car.

No Polarized Dark Lens Option for Sunglasses = FAIL 

Disappointed, I moved on to GlassesUSA.com

GlassesUSA.com

I ended up buying two pairs of new glasses with Oakley frames from GlassesUSA.com. When you first hit the website, they will offer you a 60% discount coupon code if you enter your email address. I did that, and then later learned that the discount doesn't apply to "premium" frames. Since I ordered Oakley frames, the discount code didn't work. I called their customer service line and the lady on the phone suggested a few discount codes until I was able to find one that took $100 off of the glasses I chose. I ended up paying $180 for the sunglasses.

By the way, their "Keyword Search" box is useless. I tried entering "Crosslink" "Twoface" and "Oakley" into it but the results were as if it were totally ignoring my search term and randomly showing me things.

The ones I chose were Oakley Twoface Steel with my prescription in lined polarized, dark-gray bifocals with silver mirror tint. I searched through a lot of frames before I realized that you must limit your search to those that will accept bifocals.

The next pair I selected for my clear glasses, were the Oakley Crosslink 0.5 Black. I got them with my prescription in lined bifocals with all of the coatings, and a new thing called "Digital Block Lenses". I'm not sure about that. It may be hokum, but I paid $30 for it because these are the glasses I'll use while at the computer. We'll see how it turns out.

Here's what GlassesUSA says about "Digital Block Lenses"...

Overall I highly recommend GlassesUSA.com. Before you checkout, be sure to call their customer service line and ask for the best discount code. The operator will work with you to get you the best discount she can.
For posterity, in the event that those links go down, here are the glasses I chose...

 

Stitcher is abusing its "Player Controls" permission to show ads.

I just got a "notification" on my Pixel XL phone. It was from Stitcher and it was the normal "Player Controls" that are allowed in the notification area when you're playing a podcast, except this time it was for an audio program that was clearly marked as an ad for something called "Threedom".

I immediately checked the app's ability to send me notifications, and noticed that the permission it apparently used was "Player Controls" which it used to provide podcast controls in the notification area, which is useful. If Stitcher is going to abuse that permission to show un-wanted ads, then it will be a fatal error in their judgement and the application is going to be DELETED.

I know that Stitcher is free, and if the product is free, then you're the product; but abusing a permission to slide an ad into the user's notifications is NOT OK. Free or not.

   
 

Admittedly, this is a knee-jerk reaction. I have no proof that Stitcher is doing anything untoward. I recently downloaded a photo montage app that behaved normally for exactly one week, then started tossing full page ads up over my phone's home screen even when the app wasn't running. Luckily for me, I don't install apps very often so I knew EXACTLY which app was the offender. I deleted it and ripped it a deservedly bad review.

My daughter has the same phone as I do, and is plagued by ads that cover her phone all the time. Since she installs apps often, she has no idea which app is the offender. My knee-jerk reaction to this perceived slight by Stitcher may be an overreaction based on these events, but I will be keeping an eye on the app's behavior.

Amazon Only Allowing Positive Reviews.

I am beginning to seriously mistrust Amazon reviews. There have been a number of times recently where I went to put in a review on a product that I have purchased and I got this...

I understand things like the Comey book, where people with differing political opinions may deluge the item with negative reviews, but I still think that Amazon should allow anyone who has actually purchased the item, to review it in any way he/she feels.

That said, there is NO WAY that the PowerLix milk frother that I was reviewing, had any "unusual reviewing activity".

My complete review is here. It is too bad that Amazon is doing this. I used to value their product reviews, but now I have no reason to believe they are anything less than shill-driven BS.