Tuesday, January 6, 2015

OpenLDAP+Apache

I decided to create an OpenLDAP server[1] for my research group to serve as the central storage for member information (POSIX generic account). This server will be used to authenticate users when they access certain services that should be available to group members only. The group's wiki seems like a good candidate to test the setup.
First, enable LDAP related apache modules.
sudo a2enmod ldap authnz-ldap
Next, edit /etc/apache2/apache2.conf to add the following:
<directory>
        AuthType Basic
        AuthName "This site is for SRG members only. Please use your SRG NetId credentials to access this site."
        AuthBasicProvider ldap
        #AuthzLDAPAuthoritative on
        AuthLDAPURL "ldap://[your ldap server ip addess]:389/dc=srg,dc=ics,dc=uplb,dc=edu,dc=ph?uid"
        AuthLDAPBindDN "cn=admin,dc=srg,dc=ics,dc=uplb,dc=edu,dc=ph"
        AuthLDAPBindPassword [your admin password]
        Require valid-user
</directory>
Finally, restart apache.
sudo service restart apache2

Sunday, January 4, 2015

Remove unused kernel images/headers in Ubuntu

The command below removes the image and associated headers of the kernel not currently running. This allows us to reclaim disk space in /boot (especially when created as a separate partition). The kernel version currently running (usually the latest) can be viewed using the command uname -r.

To be sure, upgrade the system first.
sudo apt-get -y update
sudo apt-get -y upgrade
sudo reboot
uname -r

Then remove the old kernel images and headers.
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -n | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge

Tuesday, December 30, 2014

Resize images from the command line in Ubuntu

If you need to resize a lot of images to conserve disk space, you can use imagemagick. Note: mogrify will overwrite the original files.

sudo apt-get install imagemagick
mogrify -resize 1024x768 *JPG

Tuesday, December 2, 2014

SMACS 2014 Experience

I attended SMACS 2014 in Ateneo de Naga last November, but only the seminar part. It was attended by about fifty participants including the presenters. There were a few presenters from Japan and China, but majority are from the Philippines. Most of the presentations came from the ACLab  in UP Diliman tackling some topics on membrane computing particularly P Systems. Presenters from Japan talked about some formalizations on programming language constructs as well as formal specifications for real-time systems. Topics on bioinformatics were discussed by UPLB  presenters. Being a "systems" person, I needed some effort to understand their presentations. I've already forgotten some topics on graphs and NP-completeness!The talk I liked the most is the one delivered by Ma'am Marge on reversible sorting networks using quantum gates.

Thursday, November 20, 2014

PhD Qualifying Exam

I took the qualifying exam last November 17. Actually I have no idea what the exam is all about. They say that the exam will test if I am ready to move forward towards the PhD. I also asked my adviser what to prepare for the exam. He just wanted me to present the paper I submitted for NCITE 2014 then be ready to answer any question related or not to my research. One of my committee member asked me on what skills do I still need to have in order to proceed to my PhD. My adviser asked me what I think will be the challenging part of my study. I found it difficult to answer these questions but gave them the best answer I can. Luckily I was able to convince them and they gave me the go signal to proceed. I am now officially a PhD candidate!

Monday, November 3, 2014

NCITE 2014 Experience

Last October 23-25 we attended NCITE in Boracay. This year's conference acceptance rate is quite low, 29%. I like this year's conference because everything seems to go very smoothly. The conference website is very functional and informative. The review process is great because of the use of Easychair. In attendance are about 300+ participants from different regions. The venue and food are also good. Two papers from our institute were awarded the Best Paper. I also presented two papers. One is the work of my previous student and the other is part of my PhD work. I was also part of the program committee which actually motivated me to write this post.