Tuesday, December 22, 2020

Flash is dead to me

Whoever thought I would need a working copy of Flash in order to look at my tax return? You see, being the idiot I am, I assembled all of my previous tax returns — including this year's — using Adobe Acrobat. And I stupidly saved them as a "PDF portfolio," so I could collect all the documents in one place with a single password.

Well, guess what? Acrobat was apparently completely, entirely dependent on Flash to display these files, and now that Flash is DEAD, all I get is a black screen when I open my document — along with a completely unhelpful note that I need to reinstall Flash, which no longer exists.


So, is there anyway to retrieve all of my tax information? NO. Of course not. It's no longer available. Because of Flash. I can only hope now I have my physical copy still accessible before I have to call my accountant.

You'd think Adobe would have some kind of knowledge or experience in digital document creation or something, but that pales in comparison to their history as an enemy of backward compatibility.

So if you were dumb enough to save anything as a "PDF Portfolio" assuming you'd be able to access it indefinitely, you'd better download the Flash Player now before Adobe takes it away (and your documents) forever.

Download here.

Saturday, May 16, 2020

Making the Rii Wireless Keyboard function keys work on a Raspberry Pi

A while back I bought a Raspberry Pi. I wanted to use it to play videos on our downstairs TV, but I also use it to play Minecraft with the kids and do math lessons with my son using Khan Academy. It's a fun, versatile little device.

Then last Christmas, my wife gave me a Rii wireless keyboard/trackpad to use with the Raspberry Pi. It worked nicely for the most part, but for some reason the function keys wouldn't work. The function keys on this keyboard double as media keys (for volume, etc,), but even when pressing the "fn" button they refuse to act as function keys like they should. This made switching to "full screen" mode in Chrome a little difficult.

Fortunately, there's a way to make them work perfectly, and like most things in the Linux world, it's not at all straightforward or simple. Fortunately, I managed to figure out the steps to accomplish this fix not only once, but twice. I got most of the steps from this article here, but I decided to write them down here for anyone else as well (in my own clumsy way) who might need them.
  1. First, go and download this hid-apple-patch. Put it somewhere easy to find on your Raspberry Pi and unzip it (right clicking and choosing "extract here" works nicely). This is a "patched hid-apple kernel module."
  2. Next, you need to install something called "dkms" (Dynamic Kernel Module Support). Open the terminal app and enter "sudo apt-get update" then "sudo apt-get upgrade" to update everything first. Then do "sudo apt-get install dkms."
  3. Now with dkms installed, navigate your way in the terminal to the folder you unzipped in step 1. Then do the following commands to build and install the patch.
    1. sudo dkms .
    2. sudo dkms add .
    3. sudo dkms build hid-apple/1.0
    4. sudo dkms install hid-apple/1.0
  4. Next, use the nano text editor to open the config file:
    sudo nano /etc/modprobe.d/hid_apple.conf
  5. Add this single line to the empty text file: options hid_apple fnmode=2
  6. Save the text file and reboot
Ta-da! Your Rii wireless keyboard now has function keys that work when you press the "fn" button.


Thursday, April 16, 2020

Under-depreciated

Oh, how I hate programming — and in particular programmers who decide that easy bits of code that anybody can use need to be depreciated (because "security") and replaced with nothing, requiring you to go hacking away in PHP at the core bits of your WordPress installation to achieve something you used to get with one line of code and should be built into a plug-in to begin with.

Take the simple act of having a "success page" after filling out a form. Any decent contact form program written since the dawn of the web would have this as an option — a page you go to after filling out a form that says, "Thank you." Easy enough, right?

Not in Contact Form 7. Oh sure, you used to be able to do this with one line of code:

on_sent_ok: "location = 'http://www.example.com/thank-you-page'";
But then someone decided, "Oh that's too easy, let's mess with people a bit." So now the process is considerably more complicated, namely editing the functions.php file in your WordPress installation to do exactly the same JavaScript thing, just in a way more likely to break things.



  1. add_action( 'wp_footer', 'redirect_cf7' );
  2.  
  3. function redirect_cf7() {
  4. ?>
  5. <script type="text/javascript">
  6. document.addEventListener( 'wpcf7mailsent', function( event ) {
  7.        location = 'https://www.example.com/thank-you/';
  8. }, false );
  9. </script>
  10. }

And again, it does exactly what the "old" method did, so aren't there still security concerns? No, I guess not. Because reasons.

And shouldn't this be built into the plug-in anyway? You know, one field called "success page" that you just fill out with a URL and be done with it? But no, things have to be difficult. And stupid.

https://www.rocketclicks.com/client-education/contact-form-7-thank-page-redirects/