Fixing Google Drive on macOS Defaulting to Simplified Chinese

After installing Google Drive on macOS, I suspected it was a bug in the program. Even though my system language is set to Traditional Chinese, Google Drive displayed Simplified Chinese. It looked really unfamiliar, so I researched it and found a fix to share with everyone. Just open Terminal and enter the following command, then restart Google Drive, and it will switch to Traditional Chinese: defaults write com.google.GoogleDrive AppleLanguages '("zh-TW")'

September 17, 2017 · 1 min

iOS Packet Sniffer on macOS

When developing iOS apps, or when doing things you’d rather keep under wraps, you may need to capture packets. For capturing packets on a computer, Wireshark is the top choice. But what if you want to capture packets on your iOS device (iPhone, iPad)? You could set up a proxy and have the iOS device connect through it, or jailbreak and run tcpdump on the device. But both approaches are too troublesome. Here I recommend the rvictl command included in the Xcode Command Line Tools. It requires no complicated setup or jailbreak, and with just one command you can capture packets on your computer using any software. ...

February 2, 2017 · 2 min

Using Command to Display Notification on macOS

macOS has a handy Notification Center. You can write a program to send messages to it, and they’ll appear on screen just like on iOS. But if all you want to do is send a message, you can do it with a single command in Terminal! You don’t need to learn Objective-C or Swift to use macOS’s notification feature. For example, while you wait for tests to run, you might want to make good use of the time by reading some documentation. In that case, you can use Notification to tell you when the tests have finished. You don’t have to worry about getting so absorbed in your reading that you forget the tests are still running, and when they finish, you’ll get a notification right away, so not a moment is wasted! Of course, tests aren’t the only use. Because this Notification works as a command, any program run in Terminal can do the same thing! ...

January 19, 2017 · 2 min

macOS Screenshot Shortcuts, File Format, and Save Location Settings

One of the reasons I like the Mac is that it comes with many useful built-in features, such as screenshots and image editing. Windows has these features too, but they’re pretty much useless, so you end up installing a bunch of apps anyway. Today I’ll show you that Mac OS already has a very powerful screenshot feature! You can even set where screenshots are saved, their format, and more! ...

January 1, 2017 · 2 min

How to Install Unverified Apps on macOS Sierra

Sometimes when we install apps on Mac OS, the system shows the message ““OOO” cannot be opened because it is from an unidentified developer.” In the past, we all knew that you only had to go to the Security & Privacy settings in System Preferences and allow apps downloaded from anywhere. But after macOS Sierra, the “Anywhere” option mysteriously disappeared! In fact, Apple hid this option to keep users from installing malicious programs. But an unverified app isn’t necessarily malicious. Many useful apps aren’t certified by Apple for various reasons. For example, some apps use system permissions, or the developer hasn’t bought a developer program (because it costs money!!!), so they can’t get Apple’s certification. It’s hard to justify not letting us use them just for that, right! ...

December 31, 2016 · 1 min

AES Encrypt/Decrypt File on Mac OS

When you need to send sensitive data through Facebook or email, such as a Google API token or a company’s annual accounts, do you really trust those online services? Personally, I don’t. There are too many possibilities, from hacker attacks to poor internal controls at a company that let employees view customer data. Because of these possibilities, I’m not really willing to send confidential data over the internet. But in this day and age, sending data without using services like email or Facebook Messenger is almost impossible. In that case, you can use AES to encrypt the file, and then share the password through a channel you trust, such as a phone call or in person. Or at the very least, send the password through a different channel than the file, to reduce the risk of everything being compromised at once. ...

December 28, 2016 · 2 min

macOS: How to Show Keystrokes on Screen for Recording and Live Streaming

Online courses are very popular now, and many people record their courses as videos to share online. Whenever I record this kind of “computer tutorial video,” I always wonder how to show the keys you press. Sometimes you’re used to pressing Ctrl + C to copy a piece of text, but viewers can’t tell what you did when they watch the video. Some recording software can capture keystrokes too, by building a virtual keyboard into the recording whenever you press a key. But besides recording software itself, there are also apps that can display the keys you press directly on screen! Besides live streaming and online courses, it’s also very handy for in-person lectures and talks! ...

December 24, 2016 · 3 min

Homebrew - Error: Unknown command: cask

If you’re a Mac developer, you’re surely familiar with Homebrew, and you’ve probably used brew-cask to install apps. Today, when I tried to install a program with brew cask, I kept getting the error “Error: Unknown command: cask” every time I ran brew cask install xxx, even though I had confirmed that brew cask was installed successfully. After searching the issues, I learned that this seems to be a bug in an older version, which has since been fixed. ...

December 23, 2016 · 1 min

Quickly Moving the Cursor in Terminal on macOS

Since I’m really sleepy, let’s keep it simple and share something small today! Whenever I use vim or Terminal and run into a super long command, I find it annoying to press the arrow keys forever just to get to the position I want. Today I’ll share three ways to quickly move the cursor to a specific spot. ...

December 14, 2016 · 2 min

Get File MD5, SHA1 Checksum on Mac OS

On Windows, I was used to installing a separate program for everything: one to view images, one to browse PDFs, and another to calculate a file’s MD5 or SHA1. On Mac OS X, you don’t have to go through all that trouble! If you want to calculate the MD5 or SHA1 checksum of a file, there is a built-in tool for it. ...

December 11, 2016 · 2 min