Coding Websites

Stop CloudFlare from injecting beacon

I have a client that uses CloudFlare, which I recommend, not only because I approve of their service, having been using it since they started up, but I love how they are fighting patent trolls!

So where was I? Oh, right! The client turned on Web Analytics which started causing a ruckus with some pages that provided API-like responses to certain automated functions by injecting a link of code to the rendered html output.

So in this case we turned off “automatic setup” for that site using CF dashboard -> analytics & logs -> web analytics -> manage site link

Now I bet there is another more elegant solution like making sure the page outputs a different content-type or something that would prevent this, but for a quick fix on this issue, doing the above works.


GeForce Experience Stops Recording Itself

I like to use the Nvidia GeForce Experience built-in game recording feature to record various things, other than games — like for example recording a google meet I need to reference later. It’s a nice quick way, and I use the default “Alt-Z” binding to get the overlay up, and doing the basic recording has been great.

But just recently this stopped working as expected! It would record around 5 seconds and then just stop.

I tried the usual steps, updating drivers, rebooting, even running with no other applications, but nothing fixed it.

The solution turned out to be that I had HDR turned on! Apparently Alan Wake 2 turned that on for my one monitor and that caused the issue. I went into windows display settings and turned off HDR and everything is good now!

Curse you, Alan Wake! But also bless you, that game is soooo good.

Coding Unix

Perl – SSL connection error: Validation of SSL server certificate failed

I have a VM running Rocky Linux release 8.7 (Green Obsidian) and have some Perl programs that use DBI/DBD for mysql connections to a Google Cloud database that requires a SSL connection.

All the parameters (i.e., ssl cert/key/server-ca) work fine when running the mysql command line to connect to the database. However, when running the Perl programs, they fail with that error.

So it is NOT a bad certificate on the server side (at least in my case), but instead something with the Perl libraries.

Some resources talk about how mariadb is the culprit, but I was running mysql-community server and still had an issue, and I even downgraded MySQL to 5.7 from 8.0 with no luck. It turns out however that when I installed Perl libraries for perl-DBD-MySQL and perl-DBI those did a dependency install of a mariadb connector!

So basically I removed all mariadb packages, and then made sure we had the packages for:

  • mysql-community-common
  • mysql-community-devel
  • mysql-community-libs

And then used CPAN to install the DBI and DBD::mysql packages

Then things worked! So the key I believe is to not use the yum/dnf versions for DBI/DBD that tie to mariadb, and instead install those via CPAN.

Hope this helps someone out there, because I really went through a lot of attempts on this to get it going.

Unix Windows

Powershell in Linux

If you are having to work with a Microsoft email server but typically use a Linux box for your daily work, being able to use Powershell to access it can be handy!

The page that MSFT provides to show how to install is at:

Now one note is that version 7.2 can have trouble with some versions of Linux, and this page could be helpful to explain that:

The error that I got when using v7.2 was: “New-PSSession: This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.”

The solution is to downgrade, this worked for me:

yum –showduplicates list available powershell

yum “downgrade” powershell-7.1.5-1.rhel.7


KDE Screen Edge Gestures

I’ve been working on a new Fedora32 install these past few weeks for my personal desktop, and so far it has been great! Faster, more memory, nicer dual monitors and 20 virtual desktops!

But it seems whenever I do a yum/dnf update to get a new kernel and keep packages updated, SOMETHING always goes amiss! That latest mystery was my KDE Desktop effects stopped working, specifically the one where you move your mouse to the upper-left corner and you get to see every window across all the desktops. Since I literally will have 100 windows total across all my virtual desktops, this feature has been pretty helpful!

My clue was in /var/log/messages, “kwin_core: Compositing is not possible”

The solution is to edit ~/.config/kwinrc and update this variable to be “false”:


And that did the trick for me, hope this helps.


Prevent GPG Popups

So I just installed a fresh install of Fedora 32 w/ KDE and when I go to decrypt a GPG (PGP) file from a shell window, a GUI popup asks for the password. Now in the past, this would be inline so I would get the prompt in the shell.

But now with the popup, my mouse pointer would almost be never near it, and since I had strict focus under mouse, I would constantly have to move my mouse to the popup window!

Anyway, I found a number of ways to fix this out there, but here are the steps that worked for me:

Edit ~/.gnupg/gpg-agent.conf and add:

pinentry-program /usr/bin/pinentry-curses

And then add this to your environment variables (i.e., .bashrc, .profile, etc):


And then you can restart the gpg agent via:

pkill -HUP gpg-agent

Websites Windows

Windows Media Keyboard Keys Not Working

I have a windows box I use for certain things, and on it I have a music player that plays from my local library and I use the keyboard play/pause/next/prev buttons to control it.

But recently I found these keyboard buttons were refusing to work! After much diagnoses it turns out that Chrome was over-riding the functions, Now this is actually helpful if you are using Google Music or other music players in the browser. But if you want to disable that so your other player takes control you need to go to: chrome://flags/

And search for “hardware media” and disable that! Hopefully that helps someone from music player frustration syndrome.


Google Chrome Show Full URL

One of Chrome’s recent updates hides the protocol name (HTTP/HTTPS) and the WWW prefix from the URL when the address bar is not focused.This can be confusing if you trying to test different http/https setups and need to see the designation in the URL bar.

To fix that you can visit chrome://flags/#omnibox-ui-hide-steady-state-url-scheme-and-subdomains

And do a search on “ui hide” — I personally disabled all 3 of the options that showed up, but you can pick and choose to your liking.

Coding Unix

Stopping vim8 from auto inserting on paste

After updating my linux system I found that when I went to do a mouse-paste in VIM that instead of just interpreting the characters, it went right into insert mode. This is a problem when I want to paste in a bunch of vim commands, which can be helpful if you need to re-do a series of actions multiple times.

It turns out the fix has to do with “xterm-bracketed-paste” and I had to put this in the .vimrc:

set t_BE=

I hope this helps someone who got surprised by vim version 8 functionality!



Having trouble accessing your Alexa skill

We have done a number of Alexa skills for clients and recently one of them would give this message to users: “Sorry, I’m having trouble accessing your {} skill right now”

Not much to go on! It turns out the problem was the content that was getting delivered for Alexa to say had some non-ASCII characters in it. The skill has dynamic content the client would update, and apparently they pasted from a Word doc which then translated a quote character into one of those annoying double wide Word characters which Alexa does not like!

So basically run your content through an ASCII-only parse before delivering it and you’re good.