Fix WordPress 5 Live Preview Hijacked to Some Domain Ad Website

Just upgraded to WordPress 5.0 and found a strange problem of theme customize live preview showing some domain Ad website instead of my own site. 

Googling around shows nothing useful but quite a few sites have similar domain advertising site description listed in the Google search results, which means they got hijacked too.

By disabling the plugins one-by-one, it turns out that Akismet3 is the culprit which shows version 3.9.9 from without “view details” link. Don’t know how it got installed. The official one should be Akismet Anti-Spam, version 4.1, from Automattic, and with “view details” prompting the plugin introduction. 

Switch to VSCode from Atom

Atom as a code editor just becomes slower and slower with the burden of massive plugins, requiring near 15s on my MBP to initially display file contents. In comparison, VSCode with similar extensions just takes 5s to show file text upon launch. There must be some architectural issues in the Atom startup process, as both are based on Electron. The memory/cpu footprint also has huge differences as this old post shows. Atom sometime even stops responding and asks to wait for editor window to run.

While speed performance is an important factor, all kinds of mysterious long pending bugs are really killing it. In my scenario, the vertical scrollbar sometime just turns into a white bar. Some issues are reported, analyzed, but just doesn’t reach a fix. And the git interface cannot stage lines for files with unicode filename, but only able to stage the whole file. The nuclide file tree is unusable which steals text editor focus! All of such problems are long existed nuisances to bear with.

Fortunately, VSCode now also enjoys the affluence of extensions. Almost all of my Atom plugins find their counterparts in VSC. The only advantage of Atom is the beautifulness in contrast to the VSCode default theme’s coarseness (the blue status bar is horrible), but hopefully the Atom One Dark theme and keymap extensions are the cure.

Just after Microsoft successfully bought Github, it seems the right time to switch from Atom to VSCode finally.

Disable BTT accessibility popup

Just updated BetterTouchTool to V2.645 and found that the accessibility permission warning popup cannot be dismissed as the close icon of the popup panel is now missing. Actually BTT can work well for touch/click functions without accessibility permissions.

After some searching around, one github issue has some useful hint:

defaults write com.hegenberg.BetterTouchTool BTTDisableAcccessibilityCheck YES

Workaround MX Master pairing with High Sierra

Apparently High Sierra has well complained issues with bluetooth. My Logitech MX Master mouse also suffers from random disconnection. Today when I tried to disable bluetooth and reconnect, the mouse just won’t connect.

So I deleted it from MBP’s bluetooth devices, and found out that MX Master cannot pair any more again. Just like some other guys’ video shows, it keeps connecting and disconnecting when pairing.

My old tricks in Yosemite did not work again,  resetting the bluetooth module and remove all devices got no help after restarting the machine. Finally a glimpse of some words in some forum threads googled just saved my morning: complete shutdown, not restart.

Oddly enough, after a shutdown and fresh booting, my 10.13.6 High Sierra successfully pairs with MX Master!

Workaround PyDrive in Google DataLab

Encounter a strange problem to load PyDrive in Google DataLab:

--> 141 @_helpers.positional(3)
    142 def run_flow(flow, storage, flags=None, http=None):
    143     """Core code for a command-line application.

AttributeError: 'module' object has no attribute 'positional'

Of course, no apparent results and solutions in google. But after a few trying, there is a workaround to load it properly: change the kernel type and change it back. What a weird problem!

Fix to delete time machine backups for no-responding finder

Just compelled to upgrade to OSX High Sierra, because XCode 9.3 is only available for 10.13 to support development over iOS 11.3!  The system seems quite the same except for the new ridiculous Chinese Translation of UI.

As usual, a Time Machine backup was made before the upgrade. But since NAS disk is quite full, some history backups need to be deleted after everything runs OK. Well, the new finder is frozen during the Time Machine deleting process and un-escapable from that UI. After a hard reboot and some googling, the following steps might help:

  1. connect to target Time Machine Sparse Bundle
  2. ensure that /Volumes/Time Machine Backup/Backups.backupdb shows
  3. sudo tmutil delete /Volumes/Time Machine Backup/Backups.backupdb/YOUR-MAC/SOME-DATES
  4. eject Sparse Bundle
  5. sudo hdiutil compact TARGET-SPARSE-BUNDLE

Fix MBP High Kernel_Task CPU in Sierra

Just encounter strange high cpu problem of kernel_task in Sierra on my rMBP. At first, it seems like some software problem, especially when opening atom editor, which causes long opening time. After closing atom, it does lower the cpu for a period, but running other task heavy software afterwards will also boost the kernel_task cpu percentage to 80%. It may suggest some underlying hardware problem there.

Comments in this post give the reason: temperature and fan control. Since it’s summer and super hot, the osx on my mbp is reducing cpu speed for temperature compensation, causing kernel task to take more cpu to consume. Resetting SMC in this article brings the fan control back and fixes the kernel_task cpu problem.

Fix MX Master Mouse Lag and Freeze Problem

First thought is some bluetooth problem, tried everything related but not working at all. After a few trial and inspection, it seems that the thumb button is stuck in between causing the mouse pointer not able to move smoothly.

Disabling the thumb side button in Logitech Options won’t help. It sounds like a hardware interference not a software driver setting.

This Inkandescent’s post and this operation guide will help fixing it. The pull-up workaround in the previous thread doesn’t work very well, so buying the T5 screw driver and loosing the thumb button board screws is the final solution.

WinToGo 8.1 on rMBP mid 2012

This blog has detail instructions to install USB WinToGo for Mac. But things won’t go that smooth on pre-2013 rMBP.

Firstly, diskpart from Windows cmd within Virtual Machine seems to have limitations, especially for Win8.1. Partitioning can work sometime but formatting will probably fail. Therefore, diskutil in Mac is the solution for disk handling. But another problem occurs. FAT32 partition is tried but found to cause errors during imagex transfer due to large file size restrictions. But disktuil doesn’t support NTFS. At last, NTFS partition is formatted with diskutil with the help of Paragon-NTFS 14 in El Capitan.

Secondly, “bcdboot /f ALL” will create EFI boot mode for usb drive, under which Win2Go can be successfully installed but instantly turns into black screen when installing bootcamp/nvidia drivers. It’s because that pre-2013 MBP is not fully compatible with UEFI crashing the graphics/audio drivers under EFI boot. The solution is to boot with CSM-BIOS mode. That means when booting MBP with alt, “Windows” is the only menu choice not “EFI”. Clearing the boot partition and “bcdboot /f BIOS” for BIOS boot mode section. However, the “none system disk” error shows when booting the “Windows” option.

Finally, this article sheds the light. “bootsect /nt60 x: /force /mbr” to force using the win8.1 bootmgr will boot your MBP into Win8.1, with all bootcamp drivers ready to be installed.

Enjoy the Win2Go, thanks for the almighty Google and a whole day of rebooting!

Rescue Black Screen Fusion VM

My windows 2003 vm in vmware fusion turns into a black screen after an OSX crash. The guest system seems bootable but starts with total blackness. Fortunately safe mode works. Event log shows it’s unable to load vmx_fb.dll, which is the graphics driver of vmware tools.

The paradox is that vmware tool is unable to install in safe mode, which will always fail even though MSI service can be enabled with this method. Then manually deleting vmx_fb.dll and vmx_mode.dll in system32 folder also not works.

It seems the only way is to roll back vm to 2-month-ago snapshot losing all the intermediate stuffs. But this thread is the rescue. Additional vmx_svga.sys in drivers directory should also be deleted. Then the guest 2003 system can be started with the default vga driver.

Now enter the vm, reinstall vmware tools, and make a new snapshot for such emergency case.