Installing OpenCV with Anaconda

May 2019 | Dios Kurniawan

OpenCV is an open-source Computer Vision library which can be used in Python. Installing OpenCV in MacOS is a bit cumbersome since there is no binaries provided in the website, but you can do this easily with the help of Anaconda. This is what I can share with you to install OpenCV with Anaconda:

  1. Open terminal, and type: conda create –name ComputerVision python=3.7
  2. Install OpenCV: conda install -c menpo opencv
  3. Activate: source activate ComputerVision
  4. Test your installation: import cv2 as cv

That’s all.

MacBook, USB-C Dongle and WiFi Interference

May 2019 | Dios Kurniawan

Ever since I moved my study desk to a different room at home, I had been experiencing very slow wifi connection on my MacBook. This happened only when I attached an external monitor via DisplayPort-to-USB-C converter. Wifi shows it is still connected, but speed can suddenly drop to near-zero rate.

Each time I unplugged the dongle, the problem disappeared. The USB-C dongle seems to generate some signal interference right into MacBook’s wifi antenna.

After hours of frustration, I found out the solution on an internet forum: aluminium foil. It might sound silly, but aluminium blocks radio signal pretty well. Wrap the USB-C dongle with few layers of aluminium foil and the wifi problem is gone.

DisplayPort to USB-C / Thunderbolt 3 converter, wrapped in aluminium foil

Interesting that this only happens on MacBook. Other devices do not suffer from the same symptom.

XenServer Failed to Boot

June 2018 | Dios Kurniawan

To support our clients, my company uses Citrix XenServer hypervisor quite heavily – because it is simple and it works well. But few days ago, the moment I have dreaded for long time eventually happened: one of our servers refused to boot after a power interruption. No error message shown, it simply wouldn’t boot. I couldn’t even get into the configuration screen.

After many days of looking for a solution, the answer was simple: use the XenServer installation CD/DVD media to reinstall or upgrade the existing XenServer. Sounds risky because that means overwriting many existing files, but it works. This is the step-by-step:

  • 1. Boot machine with XenServer CD/DVD media, enter the installation screen. Stop at the first welcome screen.
  • 2. Type “menu.c32”, don’t press Enter.
  • 3. Press Tab when the new screen opens.
  • 4. Add “disable-gpt” in the parameter list of mboot.c32.
  • 5. Continue with the installation and restart the machine.

This fixes the boot problem while preserving the existing VMs inside. I hope this can be useful for those who may face the same problem.