Paste and Match Style on MacOS

I can never remember this key combo – when pasting content from a webpage to somewhere else like Evernote, it’s incredibly useful to be able to paste just as plain text. Honestly, I don’t know why this isn’t the default behavior on the Mac.

Shift-Command-V

From here.

Adding new drives to an HP DL380 G7 Homelab

I recently ran out of space on my Homelab ESXi running on my HP DL380 G7 server, so it’s time to add some more storage. First, I checked the list of supported drives known not to have the thermal runaway issue on the DL380 and similar models. I have a couple of WD Blacks right now, but the model numbers on those are hit and miss, some models work, some don’t, and I couldn’t find the exactly same model number on sale again (the working model I have is WD7500BPKX). I noticed though there’s a longer list of WD Blue drives that are known to work ok, and looking on Amazon I found some refurb 1TB drives for $40. Since this is just a hobby server and I don’t need to store anything critical on there, this sounded like a good deal.

I needed a couple of extra drive caddies too, here’s what I picked up:

  • 2x KKmoon HHD Tray Bracket For HP G7 2.5″ Drive Caddy SAS SATA 371593-001 DL380 DL370 DL360 G5 G6 G7″
  • 2x WD Blue 1TB Mobile Hard Disk Drive – 5400 RPM SATA 6 Gb/s 128MB Cache 2.5 Inch – WD10SPZX (Certified Refurbished)

The WD drives arrived same day from Amazon – they were in sealed bags but obviously not the original packaging as they were refurbs. They were also wrapped in plenty of bubblewrap which was plenty adequate to protect them during shipping, and shipped in a Jiffy bag:

The HP server drive caddies arrived the following Monday (ordered on Saturday). Again, packaged well, in a box and in a Jiffy bag:

Here’s the assembled drives ready to go:

And here’s the new drives going in:

Space before:

Space after – ready to go:

AWS Lambdas: “Process exited before completing request”

While testing a React frontend for my SudokuSolver Lambda, I kept getting this error when calling the Lambda using superagent from React:

RequestId: 35934232-xxx Process exited before completing request

Testing from Postman it completed as expected.

This error message means what it says, the Lambda quit before it completed executing.

There are 2 possible paths through my SudokuSolver:

  1. The input puzzle has a single, unique solution
  2. The input has more than one possible solution

If there is more than one solution, the Solver finds the first solution and then exits. Yes, it does a System.exit(). There’s the cause of my problem. I was testing from Postman with a puzzle with a single solution, but the test from my React app only had a couple of values in the grid.

Lessons learned:

  • read and understand what the error message means. Once you understand what it’s telling you, ask how and where this applies to your code
  • when changing variable aspects of your test, don’t change too many at one time. If possible only make one change, so if something is unexpected you’ll know it’s as a result of that change (in my case I changed my test data from Postman to the React app and so wasn’t comparing the results with the same inputs. The issue was unrelated to React or superagent, it was completely related to my test data)