Sunday, December 22, 2013

Home/End key binding for Aquamacs

In order to let home/end keys to move the beginning/end of the line in Aquamacs,
add the following to ~/Library/Preferences/Aquamacs Emacs/Preferences.el.

(define-key osx-key-mode-map [home] 'beginning-of-line)
(define-key osx-key-mode-map [end] 'end-of-line)

Wednesday, December 11, 2013

Set zenburn as default theme for aquamacs

1. Download zenburn-theme.el from here (https://github.com/bbatsov/zenburn-emacs) to the directory ~/.emacs.d/themes/. Add this to your .emacs:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")

2. Select 'Options > Customize Aquamacs > Custom Theme'.

3. Check 'zenburn' and click on 'Save Theme Settings'.

4. Then Click on 'Options > Appearnce > Adopt Face and Frame parameters as Frame Default'.

Wednesday, October 30, 2013

Amazon Mechanical Turk setting

As worker's requirement,
Specify ALL the qualifications Workers must meet to work on your HITs:
- HIT approval rate (%): 95
- Number of HIT's approved: 500
- NEVER require "MASTER". It will make your annotation complete very slowly.

Tuesday, September 24, 2013

Use Homebrew'ed emacs as default on Mac OSX


$ brew update
$ brew install emacs --cocoa


 To link the application to a normal Mac OS X location:
   brew linkapps
 or:
   ln -s /usr/local/Cellar/emacs/24.3/Emacs.app /Applications



[Reference] http://wikemacs.org/index.php/Installing_Emacs_on_OS_X

Tuesday, August 13, 2013

Turn on Web server and PHP in Apache for Mac OS

In order to use tubekit (http://www.tubekit.org/) on my mac,
I have turn on Web server and enable php in apache.

It's fairly simple; just follow the instruction in [1] and [2].

[Reference]
[1] http://www.macinstruct.com/node/112
[2] http://osxdaily.com/2012/09/10/enable-php-apache-mac-os-x/

Tuesday, July 2, 2013

Install opencv without root permission


1. Download old versions of OpenCV
- If gcc on my system is outdated, I may need to install an old-version of opencv.
- In my system (Fedora release 10 (Cambridge)), the OpenCV-2.4.1 or before seems to work.

2. Installation ([2][3])
- Run the following.

>> tar -xvf  OpenCV-2.4.0.tar.bz2
>> cd  ~/OpenCV-2.4.0/
>> mkdir release
>> cd release
>> cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/gunhee/lib/opencv2.4 -D BUILD_PYTHON_SUPPORT=ON -D PYTHON_EXECUTABLE=/home/gunhee/lib/python-2.7.3/bin/python -D PYTHONINTERP_FOUND=1 ..
(Assume that the python interpreter is at 'PYTHON_EXECUTABLE=/home/gunhee/lib/python-2.7.3/bin/python'.)
>> make
>> make install

- Add the following to the .bashrc file [3].
# opencv
export LD_LIBRARY_PATH=/home/gunhee/opencvlib/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/home/gunhee/opencvlib/lib/pkgconfig/:$PKG_CONFIG_PATH

- Test as follows to make sure whether the installation is successful [2].
>> cd ~/OpenCV-2.4.1/samples/c
>> sh  build_all.sh
>> ./facedetect  lena.jpg

- Test as follows to make sure whether the installation (for python) is successful [1].


>> cp ~/OpenCV-2.4.1/release/lib/cv2.so ~/lib/python-2.7.3/lib/python2.7/site-packages/
>> cd ~/OpenCV-2.4.1/samples/python
>> python delaunay.py


Reference
- [3] Install OpenCV without root: http://www.mesimian.com/installing-opencv/