How to integrate Teamcity and GitLab CI

I note down the step I did to integrate TeamCity build server and GitLab CI pipeline. I am using TeamCity 2017.1.15 and GitLab 10.0.3.

What you will get with this integration:

  • Small green tick for each commit showing that a build has run successfully on the commit
  • Bigger tick for each merge request (MR) showing that a build has run successfully on the head of the merge request
  • Ability to enforce a successful build before any MR can be merged

How to set up the integration

Tldr, you need to go through 3 main steps:

  1. Enable TeamCity integration in your GitLab project settings
  2. Enable TeamCity build configuration to monitor and trigger build for all (CI) branches
  3. Enable “Commit status publisher” build feature

Read More

Kinect on Windows v2 keeps restarting

I have been playing with the Kinect for Windows v2 for a while, but I met a strange problem in the recent months: the Kinect kept restarting after 5 or 6 seconds. The RBG and depth channel looked fine in the Kinect Studio and Kinect Evolution, but the video stream kept running for 5-6 seconds then hung for 1-2 seconds (i.e. no new frame was received and the connection from the Kinect was actually lost). I have tried to reinstall the driver and SDK several times without much lucks. I though that it might be a problem with my Kinect, so I left it there until I can test with another Kinect.

Yesterday I tried to search for that problem on the Internet and found that several people also got the same issue. Someone on Microsoft’s forum suggested to disable Kinect audio and some other suggested to enable the audio device, so I decided to give it another try. It turned out that I have disabled Kinect Microphone Array. Re-enabling it fixed the strange problem.

It is a weird issue and does not seems to happen on older driver, and it is unfortunate that Kinect Studio could not give a better error message. I really hope that Microsoft would address that in a later version of driver and SDK, although I doubt that they will do that anytime soon.

Error! Can’t initialize plug-ins directory

I tried to install the new version of IntelliJ IDEA today and I got this strange problem.

Error! Can't initialize plug-ins directory. Please try again later!

Some searches on the Internet made me think that the problem was not from IDEA installer, but from Windows itself. I could later confirm that by fire up the installer of Format Factory and got the exact same error messages.

I took me an hour to try out different things until I got this forum thread:

Basically, the permission settings on the Temp folder of my user profile was messed up, and my account did not have any permission on that folder at that moment.
In short, the fixed is simply go to the Properties of that folder (you can type %temp% in Run to go to the folder directly), jump to Security tab, choose my user account, press Edit, and put a tick on Full control.
There were several error messages saying that I could not change the permission of some subfolder, but ignoring those folder does not causing me any problem till now.

I hope it help if you are having the same problem!

How to fix OneDrive crashes and manually reset its index

I am using OneDrive to store all my photos, documents, some portable software, PowerShell scripts, and many other things.

I was quite happy with it (especially the Smart File features where I can see and manage all my files on my small tablet) until I realized that my files were not synchronized any more. I then opened Task Manager trying to monitor the OneDrive Sync Engine (named SkyDrive.exe) and saw it kept crashing shortly after being launched.

Read More

Steps to install WordPress on Azure Virtual Machine running Ubuntu

I have moved my blog to Azure Website for a while and I am quite happy with it. However, recently I have decided to move my blog to an Azure VM running Ubuntu.

I have to say Azure Website is very fast, convenient and easy to set up: you just have to create a new website, chose the WordPress template and go though the WordPress’s 5-minute setup. However, that require you to scale up to Shared, Basic or Standard plan (which cost at least 10 USD/month) to get some more advanced features such as setting custom domains. Besides, the free MySQL database by ClearDB provides you with only 20MB, and the cheapest upgrade is another 9 USD/month for 1GB (quite huge for my blog).

Recently, I happened to create a Ubuntu VM for my research. And most of the time the VM is idle. So instead of turning it on an shutting it down all the time to save cost, I decided to move my blog again to the VM, and buy a new domain for it:

However, setting WordPress up on a Virtual Machine with Ubuntu 14.04 is not really as joyful as on an Azure Website. It cost me almost 3 days to solve all the issues, so I decided to note down all the steps I take here in case I need to move my blog again in the future, or someone else gets the same problems.

Read the steps