Mattress-Firm

How to make your too soft Tempur-pedic Bed comfortable

We’d suffered far too long. Our 2 year old Temper-pedic mattress was painful to use.

I couldn’t find a comfortable way to sleep anymore and was tired nearly every day and had too many aches and pains many mornings. My wife complained that her neck hurt frequently and that her shoulders and back were sore. As our Temper-pedic mattress was nearly $2500, we were reluctant to replace it so soon. But, we had to do something. I hated that bed and was dreading trying to sleep at night. The marketing by manufacturers suggests a memory foam mattress nearly to be the fix to every problem you have sleeping. Yeah, sorry. It’s not.

I’d done quite a bit of research and there were several schools of thought.

  1. Buy a new mattress. There’s no fix.
  2. Place something firm under the mattress.
  3. Buy a mattress topper of some type
  4. Crazy ideas…

As a last resort, buying a new mattress remained an option. However, not only did we not want to spend that amount of money again on another mattress, we were uncomfortable with throwing out a mattress that was so new. It hasn’t even developed the slightest hint of wear (there aren’t any sunken spots where we obviously sleep most frequently).

The second option didn’t make much sense given the density of the mattress. While I could see how it could potentially work for traditional box spring mattresses, our mattress didn’t require or need a base. Further, the base our bed rested on was pretty firm anyway. So, I didn’t see much reason to pursue that.

The challenge then was to buy a mattress topper. Was there something that was firm enough that it would mask the overly soft Tempur-pedic bed?

I read so many blogs and advice sites, with no clear answer. The general opinion was that a mattress topper could help, if you bought the right one and it was properly supported. In fact, some people bought toppers and then placed hard rubber mats underneath the topper to help provide a more solid foundation. As I was worried a bit about the off-gassing and smell of that solution, I looked for other options.

After extensive research, we settled on this:

Pure Green 100% Natural Latex Mattress Topper – Firm (3″ King Size)

The king sized topper arrived in a large box, folded once in half, rolled and protected in a thick plastic “bag.” We were careful to not damage the bag when removing the mattress topper in case we needed to return the topper. It did make removing the topper from the bag a bit more work than if I’d carefully sliced the bag open. Thankfully (according to the seller on Amazon), they do accept returns and offer to send a box to return the mattress topper if necessary.

Can I return the topper?
Yes!

So, after a few minutes on the floor, we hefted it onto the bed. It’s not lightweight, and as it’s extremely flexible, it was more awkward than we would have liked. I’d recommend folding it back in half so it’s easier to lift and move onto your bed. As you shouldn’t need to do this often, I wouldn’t be concerned about the one time lift. If you’re by yourself and trying to place a King sized topper, it may take a few more minutes and some grumbling. It apparently weighs about 65 pounds, so some amount of dragging it into place may be necessary.

Our sheets JUST accommodated the extra height. Just. If the topper had been 4″, the sheets wouldn’t have worked. The topper, while designed for a king was a bit “proud” of the size of the bed and was about 2″ total wider than it needed to be. I’m not sure if that’s normal, but it didn’t affect our sheet fit thankfully. Be prepared to potentially buy new taller sheets.

The first night was a welcome relief, even though the bed was noticeably more firm. We were both worried at first that the topper would still “sink” too much into the Tempur-pedic, but it doesn’t seem too. The next morning, we both felt far more rested and less sore than we had in 6 months. The second night, ahhh. Nice.

Some folks online have said it’s not “firm” enough. As firmness is subjective and personal, I can only say that it’s a comfortable firmness for us. If it were less firm, I’d suspect that it wouldn’t do much good. We’ll probably need to rotate the topper occasionally to prevent sunken/wear spots.

There was zero smell that we could notice both out of the packaging and when placed on the bed. Older reviews mentioned that the latex would crumble some. As ours is new, we haven’t experienced that. If it does, we’ll buy a simple cover for it. The topper is manufactured in many different sizes, from Twin to California King.

If you’re like us, suffering for buying a mattress that’s too soft and doesn’t offer enough support, I’d recommend the mattress topper (or something similar). Of course, it’s a bit risky to buy something like this sight unseen given the price, but as you shop around, make sure there’s a liberal return policy and be willing to return it if it doesn’t work out.

Two weeks later, our only regret is not buying it sooner.  

Other Information

Our current memory-foam Tempur-pedic mattress is of medium softness (we own the TEMPUR-Cloud Prima). I sleep in nearly every way possible, except flat on my back, and my wife sleeps mostly on her back.

An IKEA mattress topper was suggested in a number of forums. As we don’t have a nearby IKEA, we couldn’t evaluate the option in person. While it is an option that IKEA will sell online, the shipping/handling was extremely high to our location and most people said that it would still need another layer of very firm support under the topper. While overall the option may have been less expensive I suppose, it didn’t seem as promising as the option we purchased.

Quick demo of Go’s context.WithTimeout

To better understand Go’s context withTimeout functionality (and as a reference for myself), I’ve created this small self-contained demo. I didn’t find the published documentation’s example to be clear enough. The interesting part, coming from other programming languages and platforms, was that the WithTimeout function only was a signal that something happened. It doesn’t do anything when there’s a time out (like abort a goroutine or anything dramatic like that).

The essential pieces:

  1. Call WithTimeout passing the Background() context and specify the timeout (I’ve specified  3.2 seconds)
  2. Be a good citizen and defer the cancellation (to be sure that it’s called) and defer close the channel
  3. Start the go routine which waits for the Done channel
  4. When the Done is signaled, display the current time in seconds and what caused the signal
  5. The main app is waiting for the goroutine to end, so signal that.
  6. In the main function, the code sleeps and wakes emitting some time stamps to the console
  7. Depending on whether cancel is called, the goroutine signal may be one of two things.
    1. If cancel is not called prior to the second sleep in the code, the ctx.Err() returns
      <-ctx.Done():  context deadline exceeded
    2. If cancel however is called, the ctx.Err() returns:
      <-ctx.Done():  context canceled
  8. Then, the goroutine uses the channel to signal completion (wait<-true).

You can experiment with this sample here.

With cancel called (the line cancel() not commented out):

first sleep completed,  02.00
Timeout: 02.00
in <-ctx.Done():  context canceled
after second sleep done,  04.00

And, with // cancel() commented out:

first sleep completed,  02.00
Timeout: 03.20
in <-ctx.Done():  context deadline exceeded
after second sleep done,  04.00

Hopefully this helps someone besides me.

Code-signing and self-signed certificates in Windows 10 with Powershell

I wanted to allow all signed Powershell scripts to run on a PC in our house on Windows 10. To do that, I needed a code-signing certificate.

Unfortunately, the days of easily obtaining a free code signing certificate seem to have ended. Have no fear! You can create a self-signed certificate if you don’t expect to use the certificate anywhere but on the PC where the certificate was created.

First, I enabled Powershell scripts to run. From an administrative Powershell command prompt:

> Set-ExecutionPolicy AllSigned

Acknowledge the warning and you’re ready to execute only signed scripts.

But, if you create your own script, you’ll need to sign it. To create the necessary code-signing certificate, you’ll again use Powershell. From an administrative Powershell command prompt:

PS C:\Dev>New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\ -Type CodeSigningCert -Subject "CN=PowershellScripts" -NotAfter (Get-Date).AddYears(10)

You can change the Common Name (CN) to anything you’d like, or adjust the expiration date (using -NotAfter). I’ve got the expiration as 10 years from today.

Once you’ve got the code signing certificate created as shown above, you’ll need to move the certificate to the Trusted Root Certification Authorities. If you don’t, when you sign the powershell script, it still won’t be allowed to run (and the act of signing will produce an UnknownError).

Start the certificate manager (press Windows key, type cert, and select “Manage computer certificates“, or hit Windows+R, then type: “certmgr.msc“).

Drag Certificate Into Trusted Root Certification Authorities

Expand Trusted Root Certification Authorities first, then expand Personal > Certificates and select the PowershellScripts Code Signing certificate and then drag it into the Trusted Certificates list as shown above (or you can right click, cut, and then paste it as well).

Now that you’ve got a trusted code signing cetificate, you can sign your Powershell scripts.

If you’ve only got one code signing certificate (which I presume you do otherwise you wouldn’t have needed a new one), from an administrative Powershell command prompt first switch directories to where the script you want to sign is located, then do these commands:

> $cert = (Get-ChildItem Cert:\LocalMachine\my -CodeSigningCert)[0]
> Set-AuthenticodeSignature .\reconnect-iscsi-targets.ps1 $cert

You should then see a table with the SignerCertificate, Status, and the Path. If everything went well, the Status should be Valid.

Here’s something interesting you can do with iSCSI targets and PowerShell using a signed PowerShell script.

 

 

Automatic Reconnection of iSCSI Targets in Windows 10 using PowerShell

When my highly recommended Synology Disk Station reboots for a required update (I’ve got it set to automatically reboot), a shared Windows 10 PC in our house cannot always successfully reconnect to the iSCSI targets without manual intervention. Unfortunately, I haven’t always noticed which has led to several features of Windows not functioning the way I want (I have mapped the iSCSI drives/disks via Windows and made them into network shares for the other PCs/laptops in our house — this way I can use Windows bitlocker encryption on the iSCSI drive contents).

To make the connection more automatic, I created a simple one line PowerShell script that periodically attempts to connect to any disconnected iSCSI targets using the Windows Task Scheduler.

I saved this into a script file called reconnect-iscsi-targets.ps1:

Get-IscsiTarget | where ($_.isConnected -eq $false) | Connect-IscsiTarget

Then, in the Task Scheduler, I created a new task set to run every 10 minutes daily. The script just gets all iSCSI targets, filters only those that aren’t connected, and then passes the results to the connection cmdlet.

For the action, I selected “Start a program” for program/script, I entered: “powershell.exe”, and then added the arguments “-File” and the full path to the file name, like:

-File c:\Users\aaron\Documents\reconnect-iscsi-targets.ps1

If there are spaces in the path to the PowerShell file, be sure to add quotes around the full path and file name.

You shouldn’t need the start in option set (leave it empty if you’d like).

On the General tab of the task, make sure you’ve set the “Run whether user is logged on or not” option and “Run with highest privileges.”

Next up — how to quickly create a Self-Signed Code-Signing certificate. And, how to actually allow scripts to run!

Frustrated by the DocumentDB Emulator

I was very excited about the announcement of a DocumentDB emulator!

I could finally explore the magic of this new document-based database (I can’t say “NoSQL” as it supports a SQL dialect) without spending money just to explore the database (it was a “pay to play”).

However, it’s not to be for me:

  1. Worst: It supports requests from LOCALHOST only. Its ports are bound to 127.0.0.1 rather than 0.0.0.0, thus preventing it from being usable from other machines. I wanted to install this on an always-on PC in our house rather than install it on my home workstation. I can sort of see why they want to limit it, but come-on, this is for development purposes. It’s not set up for availability, performance, etc. One simple right click of the app-tray icon resets and clears all the data. There are a number of effective ways for making it developer only — and I wouldn’t have picked this one.
  2. It has constantly used CPU, even when it’s not being used. On my laptop for example, it was hovering around 10-15% CPU, even when there were zero active connections. This problem isn’t consistent as I installed it on a secondary workstation and it’s using a lot of RAM (nearly 400MB), but only 1% CPU.
  3. It’s Windows only. This is actually a minor point if you’re using Windows, but if you want to use a Mac and do development, even with a VM hosted emulator, you won’t be able to.

So, for the best experience with DocumentDB, you’ll likely need to stick with the pay-to-play option of hosting it in Azure. I’m disappointed. I’ll look for a different database … something that doesn’t have this limitation.

Bummer.