Scott’s No-Canned-Cream-of-Mushroom-Soup Green Bean Casserole

Over on Threads I offered to share this if anyone wanted me to, and someone took me up on it. It’s too long to put in a Threads post though, so I’m posting it here.

This isn’t a recipe website, and I hate it when those sites start recipe posts with 5,000 word essays, so I’ll just get into it. The title says it all anyway.

As I noted on Threads, I’m winging it these days, so the ratios might be slightly off. (Specifically, I’m not sure I used 3 pounds of beans… it was just a big bag at the supermarket.)

INGREDIENTS:

  • 3 lb fresh green beans, ends trimmed
  • 8 oz fresh mushrooms, cleaned and sliced
  • 1 medium-large onion, thinly sliced in half rings
  • 1 Tbsp olive oil
  • 4 Tbsp butter
  • 4 Tbsp flour
  • 1/2 cup dry white wine
  • 2 cups vegetable broth
  • 1 cup milk or cream
  • About 1 cup crushed potato chips (or panko; I used chips this year because I forgot to get panko, and it was good)
  • Salt, pepper & seasoning blend to taste (I like Trader Joe’s 21 Seasoning Salute)

PREPARATION:

  1. Blanch the beans for 5-6 minutes in boiling, heavily salted water. Drain and shock with cold water, drain thoroughly and set aside.
  2. In a small skillet, heat oil over medium-high heat. Add sliced onion and a generous amount of seasoning and cook (stirring occasionally) until soft and just starting to brown at the edges. Set onions aside on a paper towel to drain.
  3. In a 12″ skillet, melt butter over medium heat. Add mushrooms and cook (stirring occasionally) until soft and liquid is released. Add white wine and cook down for another 2-3 minutes.
  4. Add flour and some of the seasonings and whisk until flour is thoroughly blended in, about 30 seconds to 1 minute.
  5. Add broth about 1/4 cup at a time and whisk gently until completely absorbed and smooth before adding more. (Trick to a smooth gravy/roux/white sauce!)
  6. After all broth is added, stir in the milk and continue whisking as sauce thickens for 5-8 minutes. Taste and season as needed.
  7. Remove from heat and stir in beans. Transfer the mixture to a 13×9 casserole.
  8. In a small bowl, toss cooked onions and crushed potato chips (or panko). Sprinkle evenly over top of casserole.
  9. Bake uncovered at 375°F (190ºC) for 30-40 minutes or until bubbling and top is golden brown.

How to transfer files over 4 GB from Android to a Mac

I had to do some fairly deep digging to get this answer, so maybe I can help someone else.

I’m an Apple guy. But lately I’ve been having to record some video with a phone on a tripod, unattended. I don’t want to risk getting my iPhone stolen, so I’ve been using my Android testing phone instead (a Google Pixel 3a). It actually shoots pretty decent video, but getting that video off the Pixel and onto my Mac has been… a challenge.

After some initial digging the first time around, I discovered Android File Transfer. It’s a Mac app that lets you access the Android file system and transfer files over a USB connection. It’s just hard to remember exactly how to get it to work, at least for someone like me who is not super familiar with Android. The short version is you have to go into the Android device’s USB settings and turn on File Transfer mode.

Today I had a new problem. Once I got connected, I started to transfer two very large video files (16 GB and 9 GB) over to my Mac. All seemed to be going well, until I hit exactly 4.00 GB in the transfer, then it just stalled. No warning, no error. It just stopped transferring. Trying to cancel the transfer also didn’t work.

It’s really stupid that the app doesn’t just tell you this up front — or, like, you know, ever — but after digging into the issue, I learned the app has a 4 GB file size limit. I didn’t investigate why, but having dealt with this kind of nonsense on the Windows FAT file system in the past, I suspect it’s a stupid legacy quirk no one has ever considered important enough to fix.

Anyway, I needed another solution, and I found it. FTP. Specifically, I chose to use the WiFi FTP Server app. I mean really, you could use an FTP client app to transfer files to an FTP server, or install an FTP server on your Mac, but it just seemed easier to me to make the Android phone the FTP server, and let my Mac connect to it with Panic’s trusty (well… it used to be trusty, but that’s another blog post) FTP client, Transmit.

The FTP transfer is over WiFi, as the name implies, so yes, it’s slower than the wired USB connection. But… and here’s the key thing… it works.


P.S. After several minutes of the transfer running, I glanced down and noticed that the WiFi FTP Server app (which, of course, like most Android apps, is free to download) has an ad bar at the bottom. I hate to break it to those advertisers, but they are not getting any kind of R.O.I.

Don’t use JPEG for logos… and don’t think you can solve the problem by re-saving the JPEG as a PNG

Once you go JPEG, you can’t go back.

You may recall having seen this previously on my blog:

DON'T USE JPEG FOR LOGOS…...USE PNG INSTEAD

I’ve been singing the “Don’t use JPEG for logos!” refrain for so long that most of my clients (and whoever they’re dealing with to deliver logo image files to them) know logos on the web should be in PNG format (or even better, SVG), not JPEG.

But a lot of people don’t seem to understand that you can’t turn a JPEG into a PNG.

Oh, sure, you can technically do that. By which I mean, you can open a JPEG in Photoshop or a similar image editing program, and save it as a PNG. But doing that won’t fix anything.

JPEG is a “lossy” format. That means that its compression algorithm permanently loses data about the image for the sake of a smaller file size. There’s no way to get that data back. PNG is not a lossy format, which means that it compresses the image data in a way that it can faithfully recreate the original input image.

So, what do you think happens when you open a JPEG and re-save it as a PNG? That’s right… it looks exactly like the JPEG did.

Like I said at the beginning, once you go JPEG, you can’t go back. The only option is to track down the original source image in a lossless format, or to manually clean up the results as best as you can.

I wish I could say I’ve never done this, but I’m a pragmatic individual, and I also like to try to solve problems myself… it’s often faster and easier than tracking down the original source. More times than I can remember, I have used the flood tool to turn splotchy logos back into blocks of solid color — doing my best to clean up the anti-aliased edges. And when the characteristics of the logo are right, I’ll often re-set the text in the original fonts (recognizing fonts by sight is a valuable skill), tweaking Bezier curves if the logo has any customizations, and then try my best to faithfully recreate object shapes by tracing them with the pen tool.

It’s perversely kind of fun, and I especially like when I can do it without even bothering to tell the client. They usually just care about the results, not about how the sausage gets made. Except when the client is an Italian restaurant. Then I let them worry about the sausage.

Moments

You don’t see it coming until it’s here. The day you realize that you’re not going to be arranging any more funerals. You’re the one who’s next. It may not — you hope and believe — be for years. Decades! But it’s coming. And it’s coming for you.

You see the fading memories of the ones who went before you differently in that light. When you realize you’re the only person left who remembers the things you experienced together. And when you’re gone, that’s it. Those events never happened. At least, not to anyone who is still alive to care about them.

And what did your time amount to, anyway? What impact have you left on the world, and is it a good one? Bad? Or, most likely, utterly inconsequential. You never existed.

Maybe it’s melodramatic. But that doesn’t mean it’s not true. So if all that matters is the moment, while you’re in it… how are you going to live it?

WooCommerce code snippet: add customer IP address to admin Orders page

First off, this is not solving a problem. It’s making it easier to deal with the fallout of the problem.

Here’s the problem: bad actors steal credit card numbers, and sell batches of those credit card numbers to other bad actors who like to find ways to test out the credit card numbers to see if any are still active.

One way they like to do this is to find WooCommerce sites that sell cheap products — especially stickers, which are generally priced at $5 or less — and they use a script to spam the site with fake orders… well, real orders… for these cheap items, using fake contact information and the stolen credit card numbers. Most of them are already canceled and the transactions fail, but a small percentage of the cards are often still active, and the ability to place an order with them confirms it. I suspect the reason they place very small orders is that it’s easier for those transactions to go unnoticed by the real card owners.

Anyway, this is a problem I am seeing with increasing frequency on my clients’ WooCommerce sites, and there are generally two ways I address the problem.

First, I install Brian Henry’s WooCommerce Checkout Rate Limiter plugin. This can be very effective at throttling the scripts that place these huge blasts of orders from the same IP address, which leads to…

Second, I get the fake orders’ IP addresses and block them in the server’s firewall. You can get the customer IP address of any order in WooCommerce by clicking through to the detail page for an order. There are various ways to block IP addresses, including WordPress plugins, but I like to go straight to the source and block them in the ufw firewall right at the Linux OS level.

But the bad actors are perhaps becoming aware of these techniques to block them, and are modifying their tactics. I can see three ways they would do this, although I am only personally able to observe two of them: 1) slowing the rate of submissions, 2) spreading the submissions across multiple different sites, and 3) using different IP addresses. The first and third are the ones I can observe, of course, unless by chance the multiple sites are all maintained by me. (I do support a very large number of client sites, but not enough that this has happened yet.)

Anyway, we are now getting to the point of this post. I wanted a way to quickly see the customer IP address for a whole list of orders, instead of having to click through to each individual order’s detail page. Sure, I could fire up phpMyAdmin and do direct SQL queries, but I prefer the convenience of having this happen right within the WordPress admin. And so, I present to you a code snippet that will add an IP Address column to the WooCommerce admin Orders page:

add_filter('manage_edit-shop_order_columns', function($columns) {
    $columns['ip_address'] = 'IP Address';
    return $columns;
});

add_action('manage_shop_order_posts_custom_column', function($column, $post_id) {
    if ($column == 'ip_address') {
        $order = wc_get_order($post_id);
        echo $order->get_customer_ip_address();
    }
}, 10, 2);

That can go into your theme or a small plugin. The first block of code adds the IP Address column to the table on the Orders page, and the second block outputs the customer’s IP address in that cell in each row of the table.

Of course, this won’t stop bad actors from being bad actors. But it might help you reduce the number of fake orders your clients have to refund.