Search within Lanny's blog:


Leave me comments so I know people are actually reading my blogs! Thanks!

Wednesday, January 06, 2021

Daily Battles: How to Restart Bluetooth on Mac Mojave from Terminal

Mac OSX is not a great operating system when it comes to Bluetooth. Things get especially bad when you use Bluetooth for external speakers or wireless headphones. If you were playing music, the sound will break up and stays breaking up. In other words, the Bluetooth service on your Mac doesn't know how to recover from a bad state.

One thing you can do is to just go to the top right of the menu bar and then right-click the Bluetooth icon to turn Bluetooth off and then back on. But sometimes that icon is just not there.


If so, you can always go to the system preferences screen, find Bluetooth settings, and then turn Bluetooth off there.

But one problem you likely will have is that as soon as you turn Bluetooth off, you realize you just disconnected your mouse or your trackpad because most likely they are Bluetooth devices.

So is there a way to fully restart Bluetooth service (turn if off, and then turn it back on, and then reconnect all your Bluetooth devices) just from your terminal (using the command line)?

You are in luck. The answer is a definite YES! And this method works not only on Mojave but also on other versions of Mac OS as well!!

So here's what you have to do.

1. First you need to install a utility called blueutil. Run this command to install it: 

brew install blueutil

2. Once the utility is installed, you just have to run this command:

blueutil -p 0 && sleep 1 && blueutil -p 1

If you don't want to remember all the parameters, just put this in a shell script file and call the script each time you want to restart Bluetooth service.

That's it, it's that simple!! You don't have to use the laptop touchpad to turn on Bluetooth again (because likely you have it closed and connect to multiple external monitors! You don't have to reboot your computer. You just run your script!! Credit goes to DjDCH on StackExchange.

If you find this kind of tip useful, you should definitely also read my other blog about restarting audio services on MacOS.







God created the keyboard so we can do everything just using the keyboard! 







BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Tuesday, January 05, 2021

Daily Battles: How to Find Large Files on Your Mac Computer

If you are looking for tools for other operating systems or devices, see these links below.

Find large files on your Android Phone

Free space and delete unwanted files on your iPhone or iPad

How to find large files on your Windows Computer


No matter how big your hard drive is, one day you'll realize you are running low on storage space and have to do some housekeeping.

So what is the best way to find out what's eating up your hard drive space on your Mac computer? You could use Finder and search by file size. But that is just not a very convenient way to find where the large files are located. It also doesn't tell you if a folder is using up a lot of space, even though the files in that folder are not the largest ones.

The easiest way I've found is to use a free app called:

Disk Inventory X

Use the above link to download the installation file (.dmg) to your Mac computer, then double click to open the container and then drag the app file to your Application folder.

To open the app, you need to open the Application folder in Finder, and then Control+Click the app. Then select open, and you'll see a popup like the one below where you can allow the app to run.

Click open to start the app, and then select a hard drive it starts the scan (might take a while), and you'll see a screen that looks like this below.


On the left, you have a folder view where you can see which folder is taking up large chunks of your hard drive. You can also drill down to subfolders and see the space usage of each.

In the middle, you have what's called a "treemap" where large blocks represent large files. Blocks are color-coded by document type. For example, all movie files are in one color while all application files are in another color. You can click on a block to see where the file is located and how much space it is using. You can also just right click on the block and select "move to trash" to delete the file.

On the right, you have a breakdown of your hard drive usage by file type.

One important thing to remember is that after you "move to trash," you need to empty your trash to really claim the storage back.

Hope you find this useful. If you need a place to archive your large files such as movies or music, you can get a 4TB external hard drive that's completely powered by your computer from Amazon for about $90.

Moving on to the next Daily Battle!


Video of the Day:

Ran into an excellent Kung-Fu beer commercial! Be like beer!


BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Monday, January 04, 2021

Daily Battles: How to free space and delete unwanted files on your iPhone or iPad

If you are looking for tools for other operating systems or devices, see these links below.

Find large files on your Android Phone

How to find large files on your Windows Computer

Find large files on your Mac Computer


No matter how much storage space our iPhone (iPad) has, make it 256GB, we'll still find ways to fill it up and get the dreaded Storage Full warning message.


So what are ways to free up storage space on your iPhone? There are four categories you can look into.

  1. Delete apps that you no longer use.
  2. Offload apps you don't use very often.
  3. Free up storage from apps that save a lot of data.
  4. Find large files and remove them.

Delete apps that you no longer use

You can just press on the app icon and hold until all the icons start shaking and also shows a cross at the upper corner. Then press the cross will delete the app.


What I recommend is to go into Settings, General, iPhone Storage, and then scroll down to see the apps with their storage data usage listed. Then select one of them will open the settings page for that app and you have the option to Delete. This way you can delete the app that uses a lot of storage.



Offload apps you don't use very often

Sometimes you have an app that you don't use often but would still want to use it occasionally. So you don't want to delete the app and lose your data.

In this case, you can use the feature in iOS called Offload Apps. What this feature does is that it will remove the app from your device to save space, but it will keep the icon still on the screen and also keep all the user data. Next time you open the app, it reinstalls the app and then puts your data back so you never lose any settings or user data.



To enable this feature, you can follow the instructions in this article:


Free up storage from apps that save a lot of data

Some apps are notorious when it comes to using a lot of space. One such example is WeChat, which will just keep using Gigabytes of free space until your storage is full. Other social media apps might also use a lot of your space, such as TikTok, Instagram, Facebook, Twitter, Snapchat, etc..

What I recommend with this kind of apps is to delete the app and then reinstall it. This will get rid of all the saved data (such as old video clips, large images, etc.) and really free up lots of storage space.

Just following instructions from the first section of this blog by going into SettingsGeneraliPhone Storage, and then scroll down to see the apps with the most storage usage and delete from there.


File large files and remove them

The last one, actually probably the most useful one, is to manage large files on your iOS device. These are typically video files either attached in a message or email or simply videos you recorded yourself.

For large file attachments, you can actually review large attachments. Go into SettingsGeneraliPhone Storage, and then scroll down to the app that might have large attachments. Click on the app and you'll see the Review Large Attachments option.


For videos you recorded yourself, with older iOS versions, there's really no easy way to review file size. The best you can do is to open the Photos app, and then just scroll through to see if you have long video clips (you can see the length info in the clip thumbnail). The longer the clip, likely the larger the file size.

With newer iOS devices (e.g., with iOS 14.2), though, Apple has made life a bit easier for users.  Just go to your Albums and look under Media Types Videos. You can see all your videos with their size information right there. You can also go into Photos settings (SettingsGeneraliPhone Storage, and select Photos app), and then click Review Personal Videos. Just find the really big ones that you don't really need and delete them to free up more space.


Hope this can be helpful for iOS users. Remember, maintenance is always an important task for your computing devices.






The more resource you provide, the more resources people will use.







BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Sunday, January 03, 2021

Daily Battles: Microsoft Word Synonym menu empty and not showing any synonyms

If you use Microsoft Word for creative writing (or translation), you probably use a feature in Word called Synonyms Suggestion. You select a word in your doc, right-click on it, and then select Synonyms from the menu. Word will then suggest a bunch of words that have similar meanings to you. To be honest, it is also a good way to learn new vocabulary.


And one day, after right-clicking on the word, you find an empty list when you go to the Synonyms submenu. Does it mean there are no synonyms for the word you selected? You start testing other words and soon realize something is wrong and you can no longer use the synonyms feature.

Well, I had the exact problem. But don't worry, I also found the solution. The problem is because Word somehow got confused on the language of the document. And when it doesn't know or think you are using a different language, it doesn't know what synonyms to get (such as the one shown below).


To fix this problem, use CTRL+A to select the entire document, then go to Review on your menu, and then click the Language button on your tool ribbon. Make sure you select English and then click OK. Now if you try the Synonyms submenu again, everything is back to normal.


Hope this helps those that also ran into this problem. Happy writing (or translating)!!





Caring for indoor plants can reduce stress (unless it is a cactus).





BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Saturday, January 02, 2021

Daily Battles: How to Find Large Files on Your Windows Computer

If you are looking for tools for other operating systems or devices, see these links below.

Find large files on your Android Phone

Free space and delete unwanted files on your iPhone or iPad

Find large files on your Mac Computer


Even though these days we have gigantic hard drives in our windows computers and laptops, things add up quickly and eat away your storage space, especially when you have lots of videos imported from your phones and lots of movies on the hard drive.

Sometimes you just have to do some house cleaning and get rid of junk on your computer, so you have enough hard drive for the operating system to run smoothly.

If you are using a Windows computer, the tool you need for this task is called:

Windirstat

With a user interface that almost looks like last century technology, the app is very easy to use. Start a scan on the folder or drive you want to clean, and it shows you where your large files are located with a very intuitive block map interface. You can right-click on it and delete it directly if you are sure.


Once you start the scan, you'll actually realize that a lot of your junk files are Windows updates. Generally speaking, if it is just an image or installation files (with the msi extension), then you should be okay to delete them. However, if you are not sure, don't do it.

Here's a short tutorial video showing you how the program works:


Hope you find this tool helpful and also feel in total control of your files on your Windows machine! This program should work on all current Windows versions.

Also, another good idea is to get a large external hard drive. You can get a 4TB external hard drive that's completely powered by your computer from Amazon for about $90.

Moving on to the next Daily Battle!






Sometimes, you don't have to have a Tao of the Day! 







BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Friday, January 01, 2021

Daily Battles: How To Find Large Files On Your Android Phone

If you are looking for tools for other operating systems or devices, see these links below.

How to find large files on your Windows Computer

Find large files on your Mac Computer

Free space and delete unwanted files on your iPhone or iPad


Have you got the dreaded message on your Android phone when you were recording a video that your Android phone has run out of storage space? The worst part is that you don't know what's taking up so much space on your phone.

Well, here's a free tool you can use to identify and then clean out large files:

DataSize Explorer

You can find it in your Google Play store, or the Google Play web page I linked above.

Once installed, the program will scan your Android phone and show you where your large files are with a display like this:

Image Source: Softpedia

You can then go into the folder and see more details or select the file and just delete it. Here's a video showing you how you can do it.


Hope this can be helpful. I'll blog about how to find large files on other platforms in the near future.






Just when you thought 2020 is over and things will get better...







BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Thursday, July 09, 2020

Google trained ResNet50 in 0.47 seconds, setting new MLPerf AI training record

Google has built the world's fastest ML training supercomputer and was able to set new records in six out of eight MLPerf benchmarks.

Speedup_of_Googles_best_M.0860040916660770.png

For example, they trained ResNet50 in 0.47 seconds. What does this really mean? According to Import AI newsletter:

Multi-year progress: These results show the time it takes Google to train a ResNet50 network to convergence against ImageNet, giving us performance for a widely used, fairly standard AI task:
- 0.47 seconds: July 2020, MLPerf 0.7.
- 1.28 minutes: June 2019, MLPerf 0.6.
- 7.1 minutes: May 2018, MLPerf 0.5.
- Hours - it used to take hours to train this stuff, back in 2017, even at the frontier. Things have sped up a lot.

You can read more about it from Google's Blog.

But What Does This Really Mean?

In a recent video posted by Lex Fridman, he talked about how the very hot GPT-3 compares to a human brain. Specifically, he told us that GPT-3 has 175 billion parameters and costs a whopping $4.6 million to train.


So here's what it means:
Only tech giants like FAANG, Microsoft, and alike can afford the hardware and money to train large networks like this, and small startups/players really don't stand a chance.
You can learn what GPT-3 is in 3 minutes in this article.

So anyway, while we celebrate the advancement of AI, we also have to be careful about the increased impact capital has on innovation. I really do not want this to turn into something like our legal system where big corporations always win even though they "lose" the case or have to settle.






A pandemic does not just go away no matter how much you ignore it, deny it, or wish it would just magically disappear.







BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Wednesday, July 08, 2020

Daily Battles: How to navigate and control tabs with shortcuts in your Chrome browser

If you are like me and love to leave lots of tabs open in my Chrome browser, here are some very useful keyboard shortcuts for you to control your tabs.


Note that these shortcuts work both on Windows and Mac machines.
  • Ctrl + Tab: Switch to the tab on the right.
  • Ctrl + Shift + Tab: Switch to the tab on the left.
  • ⌘ + Shift + [: Also switch to the tab on the right.
  • ⌘ + Shift + ]: Also switch to the tab on the left.
  • ⌘ + Option + Left Arrow: Should also switch to the previous tab. This one doesn't work for me because I use Spectacles and BetterSnapTool, which also use these shortcuts.
  • ⌘ + Option + Right Arrow: Should also switch to the next tab. Same as above. 
  • Ctrl (⌘ on Mac) + Number: For example, Ctrl + 5 would switch to the 5th tab from the left.
  • Ctrl (⌘ on Mac) + W: Close the current tab.
  • Ctrl (⌘ on Mac) + Q: Close all tabs in the Chrome window. Chrome now asks you to confirm, in case you hit the shortcut by mistake, which I have done many times.
  • ⌘ + Shift + W: Don't know if this is a bug, but this will close all tabs in the Chrome window without confirmation. So make sure you don't use this one.

By the way, the following shortcuts on Mac might be useful:
  • Ctrl + ⌘ + Q: Locks the screen and requires login next time.
  • Ctrl + Number: Switch to that Desktop/Space.
  • Ctrl + Up Arrow: Show all windows in current Desktop/Space and show all Desktops/Spaces at the top.
  • Ctrl + Down Arrow: Show all windows for the current application.
  • Ctrl + Left Arrow: Switch to the Desktop/Space to the left.
  • Ctrl + Right Arrow: Switch to the Desktop/Space to the right.
Hope you find these useful!

Video of the Day:

This is what I play once my code compiles with no errors!



BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Tuesday, July 07, 2020

Daily Battles: How to enable AirDrop on your Mac when you send file from iPhone to Mac

When you try to use AirDrop to send files to a Mac computer from your iPhone, you might find that the Mac computer is not even an option on the AirDrop list on your iPhone. This is because AirDrop is disabled on your Mac by default. All you have to do is to enable it and you should be able to receive files via AirDrop as usual.

To enable AirDrop on your Mac computer, follow the steps below:

1. Open "Finder" from your launcher.
2. Click "Go" from the menu at the top of your screen.
3. Select AirDrop from the menu list and it opens the AirDrop window.
4. In the AirDrop window, you can specify whether you want to be discovered by everyone or only by your contacts.
5. Now AirDrop becomes an item on the left panel at the top.


6. Lastly, once the files are transferred from iPhone to your Mac, you can find them in the Download folder.

That's it. Hope you find this helpful!

Image of the Day:










BTW: The easiest way to remember my blog address is http://blog.lannyland.com

Monday, July 06, 2020

Daily Battles: How to prevent your Windows 10 computer from disconnecting WiFi

Have you noticed that your Windows 10 computer keeps disconnecting from WiFi? So whenever you want to use your computer, you have to manually connect it back to your home WiFi network?

I had this problem with one of Philip's many physical existences. (Philip is my Smart Home Assistant that consists of a bunch of microservices running on a bunch of low-grade throwaway computers.) It was a laptop with a cracked screen (wife dropped it).

This gets a bit annoying because every time I want Philip to print something, I have to manually connect the computer to home WiFi. So I did a bit of research and found the solution.

Turned out Windows 10 automatically puts the WiFi network card in power-saving mode, which then disconnects it from my home WiFi, even though I leave the computer plugged in all the time.

So here's how you can resolve the problem:
  1. First right-click on your WiFi icon in the taskbar at the bottom right corner of your screen and select Open Network and Sharing Center.



  2. Once in Network and Sharing Center, select Change adapter settings on the left panel.



  3. In the next screen, right-click on your home WiFi network and select Properties.


  4. In the properties popup window, select the Power Management tab, and then make sure to uncheck Allow the computer to turn off this device to save power. Don't forget to click OK to apply your changes.


That's it. Your computer should stay connected to your WiFi network from now on. Hope this helps!

Picture of the Day:

Google AdSense sent me a violation report. Turned out my web page can not mention the word "Weapon." So what am I going to do with a web page showing my translation of the famous Chinese Martial Arts novel named "Seven Weapons" by Gu Long? These are swords, sabers, and spears. How ridiculous. What kind of world do we live in today?


BTW: The easiest way to remember my blog address is http://blog.lannyland.com