How do I update my Raspberry Pi?

It is a good idea to periodically update your Raspberry Pi so you have the most recent version of your packages and patch security vulnerabilities. The easies way to do this is thru APT (Advanced Packaging Tool).

To get started, open up a Terminal window. We will want to make sure the APT has the most recent list of available packages. So first we will run:

sudo apt update

Next, run the following command to upgrade to the latest versions available:

sudo apt full-upgrade

We use the full-upgrade rather than just the basic upgrade so that any dependencies will also be updated.

A couple things you will want to keep in mind. First, this is only for day-to-day upgrades. It does not work on major releases.

Second is that APT will not check if you have enough disk space to run. Any previously downloaded package files will be kept in /var/cache/apt/archives. But you can easily remove them by running:

sudo apt clean


How to check the RAM on your Raspberry Pi

At some point you are going to want to know some information about the RAM on your Raspberry Pihow much you have, how much is used, how much is free, etc. Thankfully, there is a simple terminal command to give you this information.

Open a terminal window and enter this command:

free -h

This will give you a quick glance at the RAM usage. The -h flag will display the information in a more human readable format.

Vue.JS — Error when clicking link, but works on second click

Had a not so obvious issue pop up recently in a Vue.JS app I’ve been working on for a while now. I have a table of members and if you click the member name, you get redirected to their profile page. There is a click event on the name link so it will store the profile id then use the router to push the new route. The issue is that when you click the link, you get the following error:

Navigation console error

BUT if you click the link a second time you get redirected to the profile page as expected. This error is basically saying you can’t navigate to the same page you are on. Which is not what I was trying to do. So I was confused.

Turns out everything was working properly in my code I just didn’t account for it all. Here is my original link:

<a href="#" @click="individualStoreKeyAndRedirect(data)">{{ data.value }}</a>

The trouble is the href=”#” is firing before my @click event fires. So, Vue’s router thinks I’m trying to go to the same page. To make the behavior what I wanted, I had to prevent that from firing and just fire my @click event.

Thankfully, Vue makes it pretty easy. Just add .prevent to your @click event. My new link looks like this:

<a href="#" @click.prevent="individualStoreKeyAndRedirect(data)">{{ data.value }}</a>

And now everything works the way I wanted and no console error!

Quick and easy way to show/hide hidden files on MacOS

The MacOS treats files which start with a period (.) as a hidden file. Say, something like .gitignore. And there are times where you want to actually see these hidden files. To do so, you can run some Terminal commands that affect the system. OR you can do a simple key command. Like so:

⌘⇧. will toggle the AppleShowAllFiles setting

This way you can turn them on/off quickly and easily without mucking in the Terminal.

Windows 10’s Built In Clipboard Manager

Windows 10 has a built in Clipboard Manager which will let you copy multiple items — text or images — to your clipboard. Then later you can select from the list of items copied and paste them back in the order you choose.

You can turn it on (it’s off by default) by going to :

Start  > Settings  > System Clipboard

Clipboard Settings

Here you can also sign in so you can sync your clipboard across devices.

To use the Clipboard Manager, instead of Ctrl+V to paste you use:

Windows logo key  + V

This shows a list of things copied and you select which one you want.

You can also select the triple dots menu on an item for additional options.

More Information:

VS Code equivalent to Visual Studio’s Ctrl+m Ctrl+o

Sometimes, when you have a long file, it’s convenient to fold/collapse all the code regions so you can get a big picture of your file. In Visual Studio (the full blown IDE from Microsoft), it’s a simple keyboard shortcut combination

Ctrl+m Ctrl+o

Thankfully, Visual Studio Code has something similar. To fold ALL regions use

Ctrl+k Ctrl+0

Then just use the following to unfold the code file

Ctrl+k Ctrl+j

The nice thing about this is that all the sub regions are folded as well. So you can simply open one region and all the items inside are still folded.


Install Chrome Extensions in Microsoft Edge

If you are intrigued by the idea of switching from the resource hog that is Google Chrome to the new kid on the block, Microsoft Edge BUT you have some killer Chrome extensions you just can’t live without…Then fear not! You can configure Edge to use a Chrome plug-in.

First, go get Edge. Go on. I’ll wait…

Ok, now that Edge is installed you can add your extensions. First, click the triple dots in the upper right-hand corner. Then select Extensions from the menu.

Edge Options

Before you go to the effort of getting a Chrome extension, first check for the extension in the Microsoft Store (link in the settings). What you want may already be there.

If you don’t find what you’re looking for then toggle the Allow extensions from other stores setting in the bottom left-hand corner.

Then navigate to the Chrome Web Store and search for your desired extension. Click the Add to Chrome button.

Edge will give you a pop-up asking if you want to add the extension, click the Add Extension button.

This will add the extension and you should get a notification that the extension was added to Edge.

Badda-bing, badda-boom! Your Chrome extension should now be installed in Edge and running just like the ones from the Microsoft Store. With full rights and privileges. You can disable or delete them just the same.

One last nice thing Microsoft has done is to segregate the other sourced extensions from those from their own store. That way you can easily find them.