Asian Eric

professional blogging from Eric

Updating Blog

I am in the process of migrating my old blog to the new blog to be powered by Wordpress. I have copied data from the old database, however, there are still lots of formats that I need to update in the original posts, in the mean time you will probably see lots of them having weird characters and formats going on in my old posts.

The new blog will host both my personal and professional contents.

5 February 2010 at 22:40 - Comments
admin
Mostly done, need to migrate comments too later on.
6 February 10 at 01:00

Rhythmbox In Fedora 11

I have recently installed Fedora 11 at work for PHP development. However, working in front PHP code without music really sucks. The default music player Rhythmbox somehow failed to start when I click from the menu. So I start it from shell and found out the following errors:

#user@www
(rhythmbox:4307): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstdeinterlace.so': /usr/lib/gstreamer-0.10/libgstdeinterlace.so: undefined symbol: gst_video_format_parse_caps_interlaced

(rhythmbox:4307): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libresindvd.so': /usr/lib/gstreamer-0.10/libresindvd.so: undefined symbol: gst_navigation_event_parse_command

(rhythmbox:4307): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstrtsp.so': /usr/lib/gstreamer-0.10/libgstrtsp.so: undefined symbol: gst_rtsp_connection_set_tunneled
rhythmbox: symbol lookup error: /usr/lib/python2.6/site-packages/gst-0.10/gst/interfaces.so: undefined symbol: gst_navigation_command_get_type

I have alreay followed the steps to install gstreamer:

#user@www yum -y install gstreamer-plugins-good-0.10.14-2.fc11.i586 gstreamer-plugins-flumpegdemux-0.10.15-6.fc11.i586 gstreamer-plugins-farsight-0.12.10-2.fc11.i586 gstreamer-tools-0.10.22-3.fc11.i586 gstreamer-python-0.10.14-2.fc11.i586 gstreamer-ffmpeg-0.10.7-1.fc11.i586 gstreamer-0.10.22-3.fc11.i586 PackageKit-gstreamer-plugin-0.4.6-8.fc11.i586 gstreamer-plugins-ugly-0.10.11-1.fc11.i586 gstreamer-plugins-base-0.10.22-2.fc11.i586 gstreamer-plugins-bad-0.10.11-4.fc11.i586 totem-gstreamer-2.26.1-2.fc11.i586 gstreamer-plugins-bad-extras-0.10.11-4.fc11.i586

However it is still happening. After some googling, I have the following issue with Fedora [URL=https://bugzilla.redhat.com/show_bug.cgi?id=503707]Red Hat Bugzilla – Bug 503707[/URL]

You will need to run this as root:

#user@www yum install gstreamer-plugins-base

Rhythmbox should work after the above command. Hope this helps.

3 July 2009 at 03:40 - Comments

Solr Lucene – Digest Authentication

This article shows you how to setup the Digest Authentication in Solr Lucene, which comes with Jetty in the examples provided in the download pack available online.

Download Solr

Download Solr from [URL=http://www.apache.org/dyn/closer.cgi/lucene/solr/]official solr site[/URL], then unpack it to your working directory.

You are now ready to start up the Solr server, change to the solr/example and then use the following command to start the server:

java -jar start.jar

Fire the url http://localhost:8983/solr/admin/, and you will see a Solr interface ready to be used!

Add digest authentication to the admin interface

At this stage, the admin interface is accessible by anyone because there is no login required. We want to add login to it.

When you start Solr server the first time, it will extract Jetty server files under solr/work, you can see it from the first three lines of output after starting the server:

2009-05-13 09:27:40.260::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2009-05-13 09:27:40.680::INFO:  jetty-6.1.3
2009-05-13 09:27:40.810::INFO:  Extract jar:file:/path/to/solr/example/webapps/solr.war!/ to /path/to/solr/example/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp

We want to modify the Jetty config files to enable the authentication.

Change to /path/to/solr/example/work/Jetty_0_0_0_0_8983_solr.war!__solr!__k1kf17/webapp/WEB-INF directory and you will see a file called web.xml. Open this file up using you favourite editor and move to the end of file. Add the following code just before closing tag:

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Solr Admin</web-resource-name>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
      <role-name>user</role-name>
      <role-name>moderator</role-name>
    </auth-constraint>
  </security-constraint>

  <login-config>
    <auth-method>DIGEST</auth-method>
    <realm-name>SolrRealm</realm-name>
  </login-config>

This defines three possible roles can be used: admin, user and moderator, as well as using DIGEST auth method and realm-name of the auth.

This realm-name corresponses to the main configuration of Jetty server defined in /path/to/solr/examples//etc/jetty.xml file:


    <!-- ================================ -->
    <!-- Configure Authentication Realms                             -->
    <!-- Realms may be configured for the entire server here, or     -->
    <!-- they can be configured for a specific web app in a context  -->
    <!-- configuration (see $(jetty.home)/contexts/test.xml for an   -->
    <!-- example).                                                   -->
    <!-- ================================= -->
    <Set name="UserRealms">
      <Array type="org.mortbay.jetty.security.UserRealm">
        <Item>
          <New class="org.mortbay.jetty.security.HashUserRealm">
            <Set name="name">SolrRealm</Set>
            <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
          </New>
        </Item>
      </Array>
    </Set>

The username and password is set in /path/to/solr/examples/etc/realm.properties file, to create it:

htdigest -c realm.properties "SolrRealm" test

The second parameter “SolrRealm” need to match the one defined in jetty.xml file as mentioned before:

<Set name="name">SolrRealm</Set>

Follow the prompt to enter password twice then a new entry in the realm.properties will be created as follows:

test:SolrRealm:ddab10a18fd464a50ad1073a6b77e39f

Open it up and update it to:

test: MD5:ddab10a18fd464a50ad1073a6b77e39f,admin

The last word “admin” is the role defined in the web.xml file in the above section, you can change to user or moderator for this instant setup.

Finally, restart the Jetty server by pressing Ctrl+C in the shell and re-run the command we used before to start it up:

java -jar start.jar

Be sure to be at the solr root directory to run this command.

Now if you refresh your browser which opened Solr admin interface before, you will be prompted to enter the username and password, enter “test” for username and whatever password you entered before and you are in.

13 May 2009 at 04:19 - Comments

Home Renovation Project 2009

Wooo, we have finally finished painting for all rooms, including two bedrooms, one master room, living room, dining room and kitchen. It was really hard work but great reward in the end. All painting cost around 30 Liters of paint. Although we still have one toilet and two bathrooms left, we will do it after bamboo floor is installed in the next few days, because currently the home is really messy.

After the flooring, we will need to paint all doors from yellow to brown, upgrade our ugly fence, repair the roof gutter, and then also possibly paint the roof edges and front yard concrete floors. It is really a big job to get all those done, and I am very excited.

Apart from the bamboo floor, which I have asked for professional installation, all other tasks I will do myself. It is a lot to learn and very fun.

Not sure how long it will take though, considering I can only do it at the weekend, a few months at least I think.

26 April 2009 at 22:55 - Comments

Network Upgrade for Ubuntu Server 8.10 to 9.04

It is time for me to upgrade my Ubuntu server from 8.10 to 9.04, the following is the steps required:

Firstly:

$user@www sudo apt-get update
$user@www sudo apt-get upgrade

And then:

$user@www sudo apt-get install update-manager-core

And finally:

$user@www sudo do-release-upgrade

Then following the instructions.

26 April 2009 at 22:45 - Comments

Domestic Painter Required

A friendly couple is looking for volunteers who can help on domestic painting. The ideal person/people should have basic understanding of how to prepare walls for painting, but not essential ( training will be provided )

The key tasks will involve:

1. help moving furniture
2. prepare walls for painting ( including filling holes, cleaning and sanding )
3. use masking tapes to cover any area need to be protected
4. two coats per wall and sanding between each coat
5. possible painting on roof as well
6. cleaning afterward

Key criteria:

1. must be a friend of Eric or Sue
2. must be friendly and easy to communicate
3. must be able to work with minimum supervision within a team
4. should not be afraid of height
5. and is available at the weekend

Bonus skills:

1. can talk jokes to create friendly working environment
2. domestic design skills – can help to choose color for painting
3. any other home renovation skills would be advantage

If you think that you are the right candidate for this volunteer job, please do not hesitate and email Eric on efiredog at gmail dot com or call him on his mobile for private discussion ( remember you must be a friend of Eric to apply for this job, and you should have his mobile number if you are, @_@ ).

Or alternatively, simply add a comment below to explain why you are the right candidate for this fantastic opportunity, and I will get back to you if your skills match the requirements.

The position will be open for 1 month only, so please act now and don’t miss this once-a-life-time opportunity.

Thanks for applying.

12 April 2009 at 22:56 - Comments

MySQL Reset Root Password

Sometimes people need to reset their root mysql password for whatever reason. The following shows you the steps you need to take to reset your root password.

Firstly shutdown your mysqld process:

#user@www sudo /etc/init.d/mysqld stop

Secondly create a sql script:

#user@www sudo vi /root/mysql.passwd-reset.sql

Then add the following code to the new sql file:

UPDATE mysql.user SET Password=PASSWORD('YOUR-NEW-MYSQL-PASSWORD') WHERE User='root';
FLUSH PRIVILEGES;

Thirdly start mysql in safe mode and load the new sql file:

#user@www sudo mysqld_safe --init-file=/root/mysql.passwd-reset.sql &

You will see something like this:

nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[20970]: started

Finally restart the mysqld again:

#user@www /etc/init.d/mysqld stop
#user@www /etc/init.d/mysqld start

Enjoy.

7 April 2009 at 22:48 - Comments

Run For The Kids – 2009

Just finished 14km run for the kids this morning. I passed the starting line at around 9:15AM and crossed the finishing line at about 10:27AM, and still waiting for the actual result.

It was my first time to join a run within 30 thousand people and my second full 14km run without a break in my entire life. It was tiring but also much fun. I am pretty sure I will do it again next year.

At starting line:

[img="http://lh4.ggpht.com/_0OX8fAlebp0/Sdg91OwPgqI/AAAAAAAACH0/eGYGmaGJHJk/s400/DSC03598.JPG"]

[img="http://lh6.ggpht.com/_0OX8fAlebp0/Sdg91v9bDJI/AAAAAAAACH8/5a38Q1q010o/s400/DSC03601.JPG"]

At finishing line:

[img="http://lh6.ggpht.com/_0OX8fAlebp0/Sdg91z0W_CI/AAAAAAAACIE/T2aTqQvPadc/s400/DSC03620.JPG"]

5 April 2009 at 05:16 - Comments

How Tough Are You

My new colleague David has passed us a link to join the tough guy challenge. It is called Tough Bloke Challenge.

[video=http://www.youtube.com/watch?v=SFlq78febrQ]

From the stables of Maximum Adventure comes an off road running event that combines the challenges of cross country running, man made and natural obstacles, water crossings, mud and some unexpected surprises. The challenge is simple, clear the obstacles and get around the course in as short a time as possible to be in the running for the coveted Tough Challenge Trophy!

You can see more details from [URL=http://www.toughblokechallenge.com.au/]Tough Bloke Challenge[/URL]

I am thinking about join this challenge. We already have three guy in our company interested and will definitely join in. I guess I will see how I go with the [URL=http://www.runforthekids.com.au]run for the kids[/URL], and then I will decide.

25 March 2009 at 08:36 - Comments

Call Of Duty – World At War Reloaded

I installed Call of Duty – World At War three times today to finally get it working. Initially the installation went pretty smoothly, but after I launched the game I couldn’t start a new game. I just click on the new game button and the difficulty thing came out and then nothing happens no matter what i choose. It was so frustrating.

I removed it and then installed the second time, still had the same problem. So I googled for solutions and found one from [URL=http://www.siddharthabbineni.com/tutorials/tips/cod-world-at-war-solo-start-error-fixed.html]siddhart habbineni’s blog[/URL]. The response were all positive on his blog. So I uninstalled it and reinstalled again. But this time, without applying the solution I found, it worked!!

[img="http://lh6.ggpht.com/_0OX8fAlebp0/ScQqwYQ4IQI/AAAAAAAACHQ/-v2bVOQqiN8/s400/callofduty.jpg"]

I had no idea what happened, but now I can enjoy the awesome game. I played the previous version of COD last year, and I am sure I will enjoy this one as well.

20 March 2009 at 23:39 - Comments