Hide mobile menu on phone and tablet in Divi

I’ve had several Divi WordPress sites now where the mobile menu (hamburger) was unwanted. The mobile menu is great to hide a complicated navigation structure but for a simple site it can be overkill.

By default the Divi menu component will collapse the menu into a mobile hamburger menu by default and there is no way to disable this functionality in the Divi builder.

A little CSS will solve the problem.

I discovered the solution here but will also put it below in case that site ever disappears.

  1. Add a custom class to your Divi menu module: hide-mobile-menu
  2. Add the following CSS to your Divi site (style.css or Divi options)
.hide-mobile-menu.et_pb_menu .et_pb_menu__menu,
.hide-mobile-menu.et_pb_fullwidth_menu .et_pb_menu__menu {
  display: flex !important;
}
.hide-mobile-menu .et_mobile_nav_menu {
  display: none;
}

React translation keys with a colon

I am using the react-i18next package in one of the projects I am currently working on.

I recently encountered an issue with some translation keys that contain a “:” not working.

Example: A key with a colon like this does not work

The issue was a low priority but I finally got around to fix it today.

The solution was fairly simple, it just required modifying 2 of the package’s initialization options.

I added the keySeparator and nsSeparator options and set them both to false.

i18n.init({
  keySeparator: false,
  nsSeparator: false,
});

Problem solved.

Fixing no 60Hz display refresh rate option on macOS Monterey with cscreen

I use 2 Sharp 43 inch 4K displays as my Mac mini’s monitors. I love them. What I don’t love is when my Mac decides to drop my refresh rate down to 30Hz instead of the nice smooth 60Hz I am so accustomed to.

When I go into display settings to correct this I no longer even have a 60Hz option.

This issue has been bugging me for years, over at least 3 macOS releases. I was hoping perhaps Monterey would fix this but no.

Usually I would just reboot to fix this issue, but I hate rebooting my computer. I have a reboot reminder that I frequently ignore. It’s just a pain to restart all my apps but my love for 60Hz forces me to do it.

But rebooting is a thing of the past (at least for this particular issue). I finally found a solution, an application to solve this. It’s a command like app named “cscreen”.

cscreen allows you to view the configuration of your displays but more importantly it allows you to force set the configuration of your displays.

The following are the steps I took to install cscreen on macOS Monterey.

  1. First you need to install Homebrew. There may be alternate installation methods, but I use Homebrew for a lot of things so this method makes the most sense to me.

    Open Terminal and run:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install the cscreen cask
    brew install cscreen
  3. Unfortunately if you try to run the cscreen command at this point you will get a “This app is from an unknown developer” error. The easiest way around this is to do a “right-click, open” on the app from inside Finder.
    1. Open Finder
    2. Click on the “Go” menu
    3. Select “Go to folder”
    4. Enter the path /usr/local/bin
    5. In the Finder window, scroll down to the cscreen app
    6. Right-click on the cscreen app and choose “Open”
    7. Read the warning and then click the “Open” button
    8. cscreen will run and then exit, and that should be the last time you get the “unknown developer” warning
  4. Go back to your Terminal window where you installed Homebrew
  5. Run the following command: cscreen You should see a list of your displays and their stats
  6. To update the refresh rate (or other setting) enter a command like this:
    cscreen -d 32 -x 1920 -y 1080 -r 60 -s 1 cscreen -d 32 -x 1920 -y 1080 -r 60 -s 2
    Note: d: colour depth, x: horizontal resolution, y: vertical resolution, r: refresh rate, s: display numberYour display will likely turn on/off as it adjusts.
  7. That’s it! You can confirm the new setting is correct in Display Settings or just run the cscreen command with no arguments (which I now do way too often to be sure I always have my 60Hz)

My Credit Card Stack (2021)

I love to optimize my finances. If I can figure out a way to legally and ethically save money I am going to do so.

One of my favourite money optimizations is to use a credit card for everything. I never carry a balance so any cash back is pure savings. I’m always looking for new credit cards that will give me the highest percent of cash or rewards possible.

Currently, my wife and I share 4 credit cards:

  • Amazon.ca Rewards MasterCard
  • Brim MasterCard (Affiliate link)
  • Rogers World Elite MasterCard
  • Scotia Momentum Infinite Visa

Why so many cards? Well each card has unique features that fit in with our spending habits.
Below is a brief overview of each card and why I chose it. I skip over most of the card benefits
that I don’t care about, and I do not mention any sign up bonuses as I try to focus on the
long-term card benefits.

Amazon.ca Rewards MasterCard

We shop at Amazon a lot. As Amazon Prime members this card gives us a 2.5% cash back on all our Amazon purchases. All other purchases receive 1% cash back, but we only use this card for Amazon. The cash back comes in the form of a virtual Amazon Gift Card. There is no annual fee. I do have one complaint with this card though. There is no way to downloading transaction throughout the month. At the end of the month you can download a CSV of all your transactions but that’s it. I balance all my credit cards daily, so I ended up having to write a special script to
import the transactions from Amazon. Not ideal, but I like 2.5%.

Brim MasterCard

We have the $0 annual fee version. This card is only used for foreign purchases because Brim offers a 0% foreign transaction fee. The card offers 1% back on all purchases including
foreign transaction purchases. We signed up for this card immediately after our Rogers card decreased their foreign transaction rewards from 4% to 3%. Rogers also charges a 2.5% foreign
transaction fee which meant the net rewards went from 1.5% to 0.5%. While Brim doesn’t get me quite back to the 1.5%, 1% is not too bad. Brim also gives you an extra $5 in rewards on your birthday. Interested in trying out Brim? Sign up for a Brim MasterCard (Affiliate link)

Rogers World Elite MasterCard

Since we are a 4 credit card family, sometimes it gets hard to remember which card to use where. This card is our default, catch-all card. I tell my wife, “When in doubt, use Rogers”. The Rogers card offers a 1.5% cash back on everything (used to be 1.75%) and 3% (0.5% net) back on foreign transactions. There is no annual fee. I have yet to see any other no annual fee card come close to 1.5% cash back. I think it’s pretty rare even on an annual fee card. Speaking of annual fee cards…

Scotia Momentum Infinite Visa

Yes, the name is a bit of a mouthful, but it is an amazing card. There is a $120 annual fee but the rewards benefits more than make up for the fee. This card offers a whopping 4% back on groceries, recurring bill payments and subscriptions. They also offer 2% back for gas, and daily transit purchases. For everything else they give a typical 1% cash back. If the “everything else” rate was 1.5% I’d drop my Rogers card. The $120 may sound steep but the 4% back on groceries alone pays off the fee rather quickly.

We are a family of 6. Our monthly grocery budget is about $800. With Rogers our net annual cash back would be $144. With Scotia our net annual cash back would be $264 ($384 – $120). That’s $120 more cash back with Scotia over Rogers. That calculation ONLY accounts for groceries. Typically, our annual Scotia cash back is around $600.

Additional cards for the Scotia Momentum Infinite Visa card are an extra $50/year per card. We only have the one card. My wife carries the physical card but we both have it setup on our iPhones and Apple Watches with Apple Pay.

While cash back is my primary concern when choosing a credit card there are other benefits to consider like insurance. Rogers and Scotia have travel insurance but, well, we don’t really travel anymore… Scotia’s insurance benefits are superior to Rogers which makes sense since Rogers is a no annual fee card.

Only one card

If I had to get rid of all my cards except one, I’d go with the Scotia card. Once my children move out, the Rogers card may actually be more appealing as hopefully our grocery purchases will be much less. My most makes-me-feel-good credit card would have to be my Brim MasterCard (Affiliate link). The birthday cash back is a nice touch, and they come across as a much more modern credit
card than all the others.

Synology Update Docker Container

I love my Synology NAS. I was surprised at the number of features Synology claims to support, but I was even more surprised to find out that they all seem to work (at least all the ones I have tried so far).

One of my favourite features is the ability to run Docker containers directly on the NAS. They even provide a nice little UI to manage images and containers.

The only problem is that I keep forgetting how to update my containers. I usually just set up my containers and forget about them; maybe running the Docker app on my NAS a few times per year.

Because I forget things… below are the steps I go through when I want to update the underlying Docker image for a container.

  1. Open the Synology Docker app.
  2. Click on the Registry link in the left nav.
Synology Docker Registry
  1. Find the image that the container you want to update is using, right-click on the image and click “Download Image”.
Synology Docker settings image tab download this image example.
  1. Choose the version of the image you want to download. You probably want the “latest” version but your requirements may be different from mine
Screenshot of tag selection window
  1. A “1” badge will appear in the Docker app left nav beside the “Images” nav item indicating that your new image is downloading.
  1. When the download is complete the “1” badge will disappear and, if enabled, your browser will display a notification.
Screenshot of Docker image download complete notification.
  1. Navigate to the Containers page.
Screenshot of Synology Docker containers running.
  1. Stop the container you want to update.
Screenshot of Synology Docker containers stopped.
  1. Right click or select the container and use the “Actions” menu to “Reset” the container.
Screenshot of Synology Docker container action menu.
  1. You will receive a warning message which should be safe to ignore as long as you are using volumes and not storing important information in the container directly.
Screenshot of Synology Docker container reset confirmation window.
  1. Start up the container and you should now be on the latest version!