Maybe St. Lucia one day

As I am planning heavily to study hospitality management and trying to make a career change in this area, news about hotels and tourist industry have been getting my attention recently. Reading a few posts on the Internet, I feel St. Lucia seems to be a nice place to go, maybe I can try to find a job there after I graduate.

Update: It turned out that St. Lucia was just another fancy of mine, and now it seems so remotely unattractive.

Gmail and Google blocked in China?

Maybe it’s just me or some random glitches.

As of June 24, around 9:30 pm, neither Google in English or Gmail could not be accessed by many Chinese users. Here are some reports by users in other provinces on a Baidu forum

I can visit the homepage of Goolge English using these two IP address:

74.125.91.100
64.233.161.147

But I can’t click further or search anything on it. It seems to take forever to load a page or the search results. What happened?

Some user even reported as early as 19th of June that there were warnings about the forthcoming blockage of Gmail. I thought it was a DNS resolution problem so I changed the DNS server addresses to those provided by OpenDNS, still no help. I also failed to connect using secured link address https://mail.google.com. Gtalk seems to connect to the mail server alright and even check mail, and some pre-configured local mail clients are also supposed to work.

Some important blogging habits to follow

After blogging for more than a year, I think the following list of habits will better facilitate my blogging.

  • A blog is just a blog. Don’t expect it to become as popular as the Internet portals or large forum sites. A blog should make uniqueness its first objective and perviousness comes in second place
  • Don’t put too much Google Ads on the blog. 99.9999% of the bloggers are not going to get rich by blogging using Google Ads, and Google Ads ruin the aesthetics of  any theme. Just place one or two small Ads in the unobtrusive places
  • Don’t be shy. Just write down your honest thoughts, and who cares if the whole world would like it or not
  • Curb the temptation to tweak and modify WordPress themes. Any theme is good for it presents, not how it looks. In case you did make a few changes to the theme — particularly for the sake of uniqueness — back up the changes so you don’t have go through the ordeal again
  • Make writing a second nature. Jot down your thoughts whenever you get them and crystallize them into blog posts
  • KISS. Keep your blog simple — not so many plugins, not so many Ads, not so many fancy eye candies and not so many tags. These are trivia and your main focus should be on the content, not distractions. For example, use lower-case words for tags to save your time thinking how to write WordPress correctly

Quickly create favicon for WordPress

Creating a favicon is easy. Only three steps are required.

  1. Go to favicon.cc. Either upload a picture or draw your own picture for the icon.
  2. Upload the generated favicon.ico file to the root of your WordPress installation. You can choose other places but using root directory is much simpler.
  3. Modify the header.php file under your theme. Insert the following code between head with your own url.

Press Ctrl+F5 in the browser to see the effect.

How I execute mosquitoes

How I execute mosquitoes? Electrocute them. I kill mosquitoes with such cruelty that will make Buddhists cringe. Frankly, I only launch wars against roaches, mosquitoes and flies, to list in an order of descending intensity of hatred.

The thing is, when I try to have some quiet time at night in front of the computer, armies of mosquitoes take advantage of the occasion and attack viciously to harvest my blood. They hide under the table or in the corners, and mostly target my legs and feet.

Turning on air-conditioning will usually quench their blood-thirst for a while, but didn’t do the trick this time. I also can’t bear the smell of the poisonous heaters with repellent tablets, so I decided to get a new weapon to defend myself.

mosquitokiller

This advanced weapon, or WMD, to borrow Mr. Bush’s catchphrase, looks just like a badminton racket, only heavier and bulkier. Once mosquitoes are caught on the net, the metal wires will spark and make a loud cracking noise, announcing the demise of a tiny insect vampire. But the drawback is I have to constantly distract myself from what I do to hunt them down.

WordPress theme Tarski hacks

For a very short while, I forayed into TextPattern and wanted it to replace WordPress. It turned out that WordPress is just too convenient and powerful to be replaced. But I am still very impressed by Textile formating syntax embedded in TextPattern.

My adventure (as I have promised) into TXP does give me one benefit. I came across a ported theme for Tarski from WordPress and I love it.

Here are a few things I learnt about tweaking Tarski — all dug from its forum and documentation.

Using alternate styles

To overriding the default style, one just need to select an alternate style in Tarski’s option page. And in the new style, input the new syntax and attach the new theme to the body classes.

This is what I use to change the color of the wrapper for my own style:

body.thinkweird #wrapper { background: #fff; }

Align the sidebar with the post

By default, the sidebar bottom border does not line up with its counterpart under the post title. One has to manually the sidebar a little to achieve that.

body.thinkweird #sidebar {padding-top: 1.06em; background-color: #fafafa;}

The color of the background can also be changed by adding background-color: #fafafa;

Make the post navigation bar span

How to force the post navigation that appears on single post pages to span the entire length of the header?

body .thinkweird.articlenav {padding-left:0; text-align:center;}
body.thinkweird.janus .articlenav {padding-right:0;text-align:center;}

text-align:center; in the second line is especially important. If the sidebar is moved to the right, the value in that piece of code should be either center or left

Adding Google Ads

One thing about Tarksi is that its developer makes simple and effective plugins for the theme. Users are spared the hassle to manually modify theme files. Here is the plugin to insert Adsense to the post.

Two things to keep in mind to insert ads to other places.

  1. Theme hooks. For example, if I want to place ads on the on top of the navigation bar, I just use th_navbar hook. It is a gold mine worthy to dig into.
  2. Rename the function. Obviously, to insert ads into the navigation bar, I can create another plugin and change the function into tarski_output_adsense_bottom or something else unique.

I am a happy users of Tarki now.

Postfix for WordPress

Setting up a basic single domain postfix mail server was not as difficult as I imagined. Configuring a postfix mail server is not rocket science, and here is what I did to configure postfix for my WordPress blog.

The Book

I highly recommend The Book Of Postfix published by No Starch in 2005. A reviewer on Amazon says it is better than the O’Reilly Postfix book, and I agree even if I didn’t read that O’Reilly book. After reading the first two chapters, I was able to configure a basic Postfix mail server.
What’s very important, as the book says, is preparing the host for Postfix.

Preparation

In my case, I need to setup hostname and DNS MX records correctly from the onset.

  • Setting the hostname. To set hostname in Debian, edit /etc/hostname and put thinkweird.info as my hostname.
  • Install dnsutils to for dig command. To check and modify DNS records, dig command will come in handy.
  • Modify DNS information. Find out the DNS MX records for my domain dig thinkweird.info MX. I use the DNS server of Godaddy.com, and I use its total domain control to modify my DNS MX record into thinkweird.info. Once correctly configured, dig shows this record:
  • thinkweird.info. 1800 IN MX 10 thinkweird.info.

  • Install bsd-mailx to have mail command to test postfix. It is better than telnet method.

Install and Configure

For mail transfer functions of WordPress, I don’t need complications and installing postfix is suffice. A few steps prompted by debconf is enough to get the mail system working for WordPress. For now, I only want WordPress to use postfix on localhost, and disable the access of postfix from the rest of the world. I am not sure what to do to disable the feared Open Relay, but it seems the following lines in the main.cf do the trick:

mydestination = thinkweird.info, localhost, localhost.localdomain, localhost
relay_domains = $mydestination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

The line relay_domains = $mydestination tells postfix only to relay mail for my own destinations.

Check if the Open Relay is enabled

Open Relay is the mail server admin’s nightmare.
Test the mail server domain at abuse.net to see if Open Relay is enabled for postfix or not.

Some loopholes in Cambridge BEC test

I had the chance to be an oral examiner for Cambridge Business English Test. I participated all the three levels: preliminary, vantage and higher. I noticed there are some loopholes in the test, and frankly I think ESOL could do better to make more money.

  • The biggest loopholes is the small repertoire of questions for speaking. I noticed during the exam that students seem to know the questions beforehand, and had made prepared versions of certain questions we asked. Some are even using the words from the backup questions in their speech. I guess this are some brain dump sites for used questions, and students can just use them to rehearsal. I also believe it is easy for students who have taken the test, to text message the questions to other test takers in the waiting room
  • During part II of the oral exam, one thing that irks me most is that test takers does not listen to their partner’s talk. They keep preparing for their small presentation, and when they are requested to ask a question about their partner’s speech, the frequent question would be: “Of the points you just mentioned, which one you think is more important?”. They deserve a markdown for cheating like this.

Anyway, I think English tests such as BEC, IELTS and TOFEL are just cash cows. Why does BEC need three levels for a speaking test? Can’t it make the grade range from one to nine like IELTS’s? Most BEC takers are likely to take two levels of BEC, which I think is unnecessary. For IELTS and TOFEL, they can go fuck themselves for a short expiration period of the test score — two years. They should make it five years like GRE test scores. I don’t think my English will drastically become poorer after two years, actually it is the other way around. The only reason I can think of is IELTS and GRE wants to make more money on a faster cycle.

Putty with ssh key authentication

When using ssh keys generated by puttygen.exe, I receive a “Server refused our key” error. Then I found out that the error-proof way is this: generate ssh key pairs under Linux, and then convert the private key into putty format using puttygen.exe.

Procedures

  • change ~/.ssh directory and authorized_keys permissions
chmod 700 .ssh
chmod 600 authorized_keys
  • generate the key pair. Most tutorials seems to prefer to use dsa format
ssh-keygen -t dsa
  • use the default file name and enter the passphrase
  • add the public key to authorized_keys
cat id_dsa.pub >> .ssh/authorized_keys
  • copy the private key (id_dsa) to the local windows machine. Then use puttygen.exe to convert the key and save it to a separate private key

Then configure the putty to use the new private key.

Additional notes

Under Debian Lenny, I don’t need to make any changes to /etc/ssh/ssh_config to make putty auto authentication work.

The putty does not authenticate with the public key, but with .ssh/authorized_keys instead, that’s why the public key should be copied to authorized_keys file.

References

ssh – authorized_keys HOWTO for some fundamentals

Quotable Quotes from Movies

Well, it is June 4th and I have to write something on the Internet.

For about two weeks, I have been watching Avatar: the Last Airbender to ease the burden of my major work — revising my doctoral dissertation. I enjoyed season one and two of this animation abundantly, but season three just ruined the intense flow of the storyline. I especially hated episodes 305 about Ember Island, because the terrific adventures of Avatar is turned into stupid beach dates stories. Episode 317 is also a boring roundup of past story lines, leaving me the impression that the producers are trying hard to
invent something to fill an empty show slot.

Of all the characters in the Avatar story, I really like the Uncle of Zuko.
He delivers many thought-provoking lines for the troubled soul of Zuko, and I
have this intention of collecting all his life advice. This one enlightens me
in particular:

Follow your passion, Zuko, and life will reward you.

I then realized why I am dragging myself painfully alone the process of
finishing my Ph.D because it is not my passion.

So what is my passion? I think I am getting very close to pursue it — doing
some IT related jobs. To make this contemplation more Zen-like, I will add
that my passion lies where I experience a strong sense of self-fulfilment. I
may have been finding escapes in the controlled boxes of computers, and I
know I enjoy studying political philosophy as well. But as least I have a
chance to start afresh, just like what Uncle of Zuko says:

I believe people can change their lives if they want to. I believe in
second chances.

I did get a second chance.

To conclude this lone rambling post, I want to quote a few line from another
film I just watched today — Felon, which is a terrific prison film:

…So don’t run from who you’ve become, felon. Embrace it. Grow from
it. And you’ll never lose sight of what truly matters

This is what the Indian guru tells Avatar when teaching him ways to connect
to the cosmos power — let go of fear, recognize yourself and come to peace with your past.