Monday 14 November 2011

Installation guide for several ruby gems

typhoeus
In order to install the typhoeus gem, you need to have the curl library installed. You can do this by:
sudo apt-get install libcurl4-openssl-dev


linecache19
linecache19 requires vm_core.h which needs to be included when installing ruby-debug19
sudo gem install ruby-debug19 -- --with-ruby-include=/src_file_paht_with_vm_core.h

Friday 11 November 2011

Git remote related commands

Changing a remote's URL
git remote set-url example git://github.com/user/test.git will set the URL of the remote named “example” to git://github.com/user/test.git.


Tracking remote branch
Tracking when creating a new branch:
The full syntax is:
$ git checkout -track -b [local branch] [remote]/[tracked branch]
Simpler version is:
$ git checkout -t origin/branch
Setting up tracking for an existing branch:
$ git branch --set-upstream branch upstream/branch
Setting upstream when push
$ git push -u [remote] [branch]

Saturday 5 November 2011

Show table of contents in Mendeley

If you want to view the table of contents of pdfs in Mendeley, you can start the application with the following option:
mendeleydesktop --pdf-toc
To make a shortcut in your launcher in Ubuntu 11.10, you can open the Main Menu application and add a new item with the command to start Mendeley. Note that if Main Menu does not respond after clicking the buttons, it is possible that the gnome-desktop-item-edit binary is missing. You can confirm this by running alacarte from the terminal and see if there are any errors. To install gnome-desktop-item-edit, you can run the following command:
sudo apt-get install --no-install-recommends gnome-panel

You can find the icon for Mendeley in /usr/share/icons/hicolor/. Choose the appropriate resolution you want for the icon. I used 48x48.

Friday 4 November 2011

OpenNI updates

Recently I updated the OpenNI library to version 1.3.4.3 in the unstable branch, but playing from recorded files doesn't work after that. Then I switch back to  the latest version (1.3.3.6) in the master branch which works for playing recorded files.


The OpenNI developers are not very responsive to pull requests. In particular, the bug that I mentioned in the earlier post that is related to the wrong use of memcpy has not been fixed. So I forked the project and added the fix. I also added a method copyToBuffer to wrapper/OpenNI.java/src/org/OpenNI/Map.java so that we only need to allocate the buffer for the depth or image map once.