brew install firstname.lastname@example.org
- Run xcode-select –install first
- Run brew install graphviz
- Run mkdir /usr/local/Frameworks if the following errors occur:
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir – /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir – /usr/local/Frameworks
When I first used Apple USB-C AV adapter (MJ1K2AM/A) on my Mac mini 2018, there were several problems. But I found these are just some setup issues.
HDMI: I use my Mac mini with 2 Ultrafine 4K (by TB3) and 1 Dell P2415Q (by HDMI), all 4K @ 60Hz. I want to test the HDMI port of this adapter works. When I insert this adapter on a 3rd TB3 on my Mac mini, and connect its HDMI port to P2415Q, there is no video output.
The solution is, just unplug one of the Ultrafine 4K monitor (from TB3). It seems the HDMI port on this adpater only works when there is at most one other monitor plugged in (by TB3). And yes, when use this adapter, the monitor can only run 4K @ 30Hz.
USB: the USB port on this adapter works perfectly when I insert it to the TB3 port of Mac mini. However, when I insert it to the USB-C ports on the back of Ultrafine 4K monitor, the USB port doesn’t work.
The solution is simple: just unplug the TB3 cable of the Ultrafine monitor from Mac mini, then insert the adapter to the monitor, and finally plug the TB3 cable to Mac. I guess there is some data re-negotiation happens.
I recently bought a 4K monitor Dell P2415Q of revision A04. It is connected to a Mac mini 2018 by HDMI cable. At first, every operation displayed on this monitor seems a bit sluggish. From “System Information” -> “Graphics/Displays”, I found the refresh rate of this monitor is only 30Hz (instead of 60Hz).
The solution is from this Dell doc: unplug all video cables -> power on this monitor -> select “HDMI(MHL)” as input -> press the third button (indicated by a green-color arrow) for 8 seconds -> in the pop-up window, disable “HDMI 1.4”, which will enable HDMI 2.0.
My laptop has a SD Card Reader. I want to use it in Ubuntu guest OS (the host is Win7).
The method is widely available if you search it:
Step 1. In Win7, Computer Management -> Disk Management, find the disk number of the SD card. In my system it’s “Disk 1”
Step 2. In the settings of Ubuntu VM, Hardware -> Add -> “Hardware Type” select “Hard Disk”, Next -> “Virtual Disk Type” select “IDE”, Next -> select “Use a physical disk”, Next -> In “Device”, select (in my system) “PhysicalDrive1”.
The problem is: there is always only “PhysicalDrive0” shown in the above step, even when I can see “Disk 1” (SD card) in Windows Disk Management.
After wasting a few hours, I found the solution: VMware Workstation, at least on Win 7 (I haven’t tested other OS), should be started with “Run as administrator“. Then you will see “PysicalDrive1” (or what ever drive corresponding to the SD card).
Hope this trick can save you some time.
When I open https://www.cbsnews.com/live/ to live stream CBS News, I found the CPU usage is nearly 100% and there are about 50 threads running at the same time for this process. You can find the URL address of the video source by checking the source code of the webpage. In my case, the video URL is something like the following, and open it in the browser.
https://dai.google.com/linear/hls/p/event/(SOME ID)/stream/(SOME ID):MRN/variant/(SOME ID)/bandwidth/3009600.m3u8
One additional benefit of directly using the video URL is, in Safari, it enables “Picture in Picture”.
I understand free softwares such as FileZilla need money to sustain, but it’s annoying for FileZilla to pin Opera on the dock of my MacBook (after I forgot to uncheck the “option” to install Opera). More annoying is I can’t find the Opera app in the /Applications folder. After searching for a few minutes, I found the Opera app was in
So just delete “Opera.app” and remove its icon from the dock.
(Some other words: Opera browser is partly owned by QiHoo 360, a Chinese company notorious for its difficult-to-uninstall and hijack-your-browser “anti-virus” softwares for Windows. Hey 360, leave Mac alone!)
On my Sierra 10.3.6 and Xcode 9.2, the Xcode playground will get stuck even for very simple programs. There seem to be may solutions if you search it. In my case, because the user is restricted by Parental Controls, I need to add it to the “Developer Tools” group when logged as an administrator, which solves the running stuck problem:
sudo dscl . append /Groups/_developer GroupMembership YOUR_USERNAME
Parental Controls was enabled for the only administrator user of my mac (as a result, this admin was converted to a managed user). When I tried to install some software later, I was asked to enter an administrator username and password, which I no longer had.
The only solution seems to be adding an administrator user. There are many discussions on the web. On my Sierra 10.12.6, the process is a bit different from others:
- Press power button, and quickly press and hold CMD + S to enter Single User Mode (i.e. root in console);
- The problem I encountered is, after Step 1, the screen flashes an error message “BuildUser(): error building a user of type xxx“, and then shows the normal user login window. After a few tries, I found I need to enter the password of a current user, and then the system enters Single User Mode. (Update: this is because FileVault is turned on, ref: https://support.apple.com/en-us/HT201573);
- In Single User Mode, mount the startup drive: /sbin/mount -uw /
- Then remove (or I think better rename) file: rm /var/db/.applesetupdone
- Reboot: reboot
- After rebooting, the system shows the login window again. Enter the password for the current user, and then the system will go through the process of creating a new admin user (like setting up the Mac for the first time).
Some other words: it seems the above process can be used to bypass parental controls (?).
The following method is provided by notesofaprogrammer.blogspot.com, which first converts the PDF file to PS format, then embeds all the fonts while converting PS back to PDF:
pdf2ps example.pdf ps2pdf \ -dPDFSETTINGS=/prepress \ -dSubsetFonts=true \ -dEmbedAllFonts=true \ -dMaxSubsetPct=100 \ -dCompatibilityLevel=1.4 ./example.ps