Spam or Not Spam

While monitoring some of the servers I am maintaining today, a user forwarded me an amusing email message:

Received: from [218.111.170.31] by web38606.mail.mud.yahoo.com via HTTP; Mon, 03 Sep 2007 07:01:19 BST
Date: Mon, 3 Sep 2007 07:01:19 +0100 (BST)
From: hairiehasnie <[email protected]>
Subject: Dear XXXX,
To: XXXX XXXX <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=”0-1107947314-1188799279=:79252″
Content-Transfer-Encoding: 8bit
Message-ID: <[email protected]>

–0-1107947314-1188799279=:79252
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I use a good spam filter, and you probably do the same.
I have whitelisted you and that means that I will receive all the emails you send to me.
I would appreciate it if you would whitelist my email address: [email protected] in your spam filter.

If you don’t have a spam filter, I can recommend SPAMfighter. It is a highly effective free spam filter for Outlook and Outlook Express.

You can get the free SPAMfighter here:
http://www.LINKREMOVED.com/Pro

I hope that you will whitelist me, so we can continue to communicate safely via email in the future.

Best regards

hairie

This email is amusing because:

  1. It promotes a spam filter for Outlook, but this email is sent from Yahoo! Webmail
  2. The URL inside the email is neither phishing nor a referral URL

So I guess this hairiehasnie guy has nothing better to do. Who else has received this message? I am pretty sure it was not sent only to my user! 😉 And yes, I put his email clearly here on purpose. Let there be SPAM in his email. After all he has SPAMfighter! 😀

Photography As Passion

Do you photograph? I have owned a Nikon D50 DSLR for about a year now, and also a Sony T30 for casual shots. It is indeed an expensive hobby as many people would put it once they see my camera. But this hobby can be converted to a source of income, and that is what I like about it. I haven’t reach that level yet though.

Nikon D300

The Sony T30 is classified as a prosumer or a point and click camera, while the Nikon D50 is a DSLR. Nikon D50 is the most affordable DSLR at the moment I bought it, but even now that D40 and D40x has been released I was thankful that I got my D50 on time before it was taken off production. The D40 models are not preferable in the sense that it does not have a built in auto-focus motor and if you use lenses that don’t have built in auto-focus motor you’ll have to manually focus each time. One great example of such lens is the AF Nikkor 50mm f/1.8D.

Even though the Sony T30 have more megapixel (7.2 to be exact), shots from the Nikon D50 (6 megapixel) seems to be much much better. This is actually very normal as there is a huge difference in the size of sensor and lens between those two. And with a DSLR you can tweak the settings any way you like which can result in a very good result, or an ugly one 😉 Trust me, when you have been learning and shooting with a DSLR you can feel the freedom and satisfaction after you process the results in your favorite “darkroom” software.

I have an eye on the new Nikon D300 that will be released very soon but I don’t think I will get it anytime soon. I need to practice more!

This post is brought to you by RitzCamera.com

Pidgin 2.1.1 Released

The official Pidgin 2.1.1 has been released, and the official Pidgin Portable 2.1.0 Released.

So since John T. Haller of PortableApps has packaged this, I will stop packaging Pidgin Portable for the public. This is the end of My Version of Pidgin Portable. Hope all who have used it found it useful. I guess the guy who have always accused me of embedding keyloggers will be extremely happy now. LOL.

Tesla Real to Reel

Tesla Real to Reel Player
One of my favorite rock bands have recently (in June) released an album featuring many songs from other bands in late 60s and early 70s – Real to Reel. Visit the Real to Reel site to sample the songs before you buy the album! See the player image I captured above? Reel One can be bought retail, while Reel Two (for now) will be available to concert goers at no extra charges (only pay for the tickets). Reel One’s case comes with a blank slot for Reel Two 😉 Cool huh?

Here’s the track list:

Reel One (sold at retail):

  1. “Space Truckin'” (Deep Purple)
  2. “Walk Away” (James Gang)
  3. “Hand Me Down World” (The Guess Who)
  4. “Bad Reputation” (Thin Lizzy)
  5. Thank You” (Led Zeppelin)
  6. “I’ve Got a Feeling” (The Beatles)
  7. “Day of the Eagle” (Robin Trower)
  8. Ball of Confusion” (Temptations)
  9. “Rock Bottom” (UFO)
  10. “Stealin'” (Uriah Heep)
  11. “Bell Bottom Blues” (Eric Clapton)
  12. “Honky Tonk Women” (The Rolling Stones)
  13. Dear Mr. Fantasy” (Traffic)

Reel Two (available with concert ticket purchase and also available with an issue of Classic Rock in the UK):

  1. “All the Young Dudes” (Mott The Hoople)
  2. “Make It Last” (Montrose)
  3. “Shooting Star” (Bad Company)
  4. “Not Fragile” (Bachman-Turner Overdrive)
  5. “Street Fighting Man” (The Rolling Stones)
  6. “Is It My Body” (Alice Cooper)
  7. “I Want To Take You Higher” (Sly & The Family Stone)
  8. “Do You Feel Like We Do” (Peter Frampton)
  9. “Beer Drinkers and Hellraisers” (ZZ Top)
  10. “Seasons of Wither” (Aerosmith)
  11. “Saturday Night Special” (Lynyrd Skynyrd)
  12. “War Pigs” (Black Sabbath)

Best Buy Bonus Disc (limited CD included with “Real to Reel”, only sold through Best Buy):

  1. “War Pigs” (Black Sabbath)
  2. “Shine Away” (Unplugged)
  3. “Modern Day Cowboy” (Unplugged)
  4. “Paradise” (Unplugged)

Busy Week

I just went through a hectic, but satisfying weekend. Went to Melaka (southern part of Malaysia) to help out in my niece’s engagement ceremony. It was tiring but satisfying. The ceremony ended up well, and I wish them a happy engaged period… until the real wedding day arrives!

Nuffnang Error

Today the site loads very slow, and as I was about to blame the network when I saw this:

Nuffnang Error

It seems that Nuffnang may be currently experiencing some difficulties. Since the ad block loads inline, the whole site waits for it. Oh by the way visitors from outside of Malaysia & Singapore will not see this as it is a geo-targeted block (AdSense is there instead).

And Nuffang site is down as well, with these errors:

Warning: mysql_pconnect() [function.mysql-pconnect]: Lost connection to MySQL server during query in /home/nuffmy/public_html/Connections/nuffnang.php on line 9

Fatal error: Lost connection to MySQL server during query in /home/nuffmy/public_html/Connections/nuffnang.php on line 9

Quick guys! Fix it! 🙂

PHP 5 In CentOS 4.5

Just a short sharing note, for users of CentOS 4.5 who is looking to update PHP to version 5 instead of the default 4.3.9 there is a clean and easy way to upgrade your PHP.

  1. Open up /etc/yum.repos.d/CentOS-Base.repo and look for the section centosplus:

    [centosplus]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/...
    #baseurl=http://mirror.centos.org/...
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
    priority=2
    protect=1

  2. Change enabled=0 to enabled=1
  3. Save the file
  4. Run yum update php*

And the rest is up to you… when it finishes restart Apache (service httpd restart) and you’ll be up and running with PHP 5.

How to check PHP version on the server?

Use rpm -qa | grep php and you’ll see the list of installed PHP packages. In this case PHP on the server has been upgraded to PHP 5.

php-pdo-5.1.6-3.el4s1.7
php-cli-5.1.6-3.el4s1.7
php-pear-1.4.11-1.el4s1.1
php-ncurses-5.1.6-3.el4s1.7
php-mbstring-5.1.6-3.el4s1.7
php-pgsql-5.1.6-3.el4s1.7
php-gd-5.1.6-3.el4s1.7
php-odbc-5.1.6-3.el4s1.7
php-common-5.1.6-3.el4s1.7
php-5.1.6-3.el4s1.7
php-snmp-5.1.6-3.el4s1.7
php-ldap-5.1.6-3.el4s1.7
php-mysql-5.1.6-3.el4s1.7
php-devel-5.1.6-3.el4s1.7
php-xmlrpc-5.1.6-3.el4s1.7
php-imap-5.1.6-3.el4s1.7
php-xml-5.1.6-3.el4s1.7

Good luck!

WordPress Plugin: Collapsible Archive Widget

Update: 20 January 2010: This plugin has not been tested with WordPress 2.9 and may break because 2.9 has internal changes. I am still trying to find time. Sorry for the Inconvenience.

I have written another simple WordPress plugin that simply display a collapsible archive in the sidebar. You can see it in action in the rightmost sidebar of the main page.

When the sidebar loads, it is in collapsed state and can be expanded by clicking the years. It utilizes simple JavaScript that shows and hides a div containing the monthly links. The purpose of this plugin is to save space on the sidebar especially if you have been blogging for a while. It is an alternative to the combo box (select) provided by the default archive widget.

My request for the plugin to be listed in the WordPress Plugin Directory has been pending for a while so for now it can be downloaded here.

The plugin can now be downloaded here.

Configuration:

  • Widget Title: the title of the widget
  • Show post counts for year: Whether or not to show the post number for each year
  • Show post counts for month: Whether or not to show the post number for each month
  • Abbreviate month names: Check this box to show abbreviation of month names
  • Hide year from month names: Do not print year after month names
  • Use script.aculo.us effects: Whether or not to show effects
  • Expand effect: Effect to use when expanding the list
  • Collapse effect: Effect to use when collapsing the list
  • Expand the list by default: Check this box to have the list expanded when loaded
  • Expand current year by default: Check this box to have the current year expanded when loaded
  • Expand current month by default: Check this box to have the current month expanded when loaded
  • Show individual posts: Show posts in the list. This should be used in extra caution; if you have a lot of posts consider disabling it as this will take time to load
  • Use HTML arrows instead of images (► ▼)
  • Show current month in bold: show current month in bold
  • Show a link to plugin page. Thank you for your support! : Display a link to plugin page (this page) as a support method

Current Version: 2.3.1

Installation

Copy the file to the wp-content/plugins/widgets directory and activate it in the Plugins page. Then drag and configure it in the Sidebar Widgets page.

Warning: Will only work on widgets enabled blogs.

TODO (these are being considered but there is no guarantee when they are going to be included)

  • Add ability for multiple instances
  • Add ability to work as non-widget
  • Add ability to include / exclude categories
  • Expand previous month rather the current
  • Research the practicality to use CSS / allow CSS options
  • List posts without year and month headers (for blogs with few posts)
  • Do not list the posts that are listed on the main page

Change Log

  • 03-Aug-2007: Initial version
  • 04-Sep-2007: Added ability to select whether to use abbreviations for the month names, and script.aculo.us effects!
  • 27-Sep-2007: Fixed javascript include – effects.js added and scriptaculous.js removed (For some reason it worked in 2.2)
  • 10-Nov-2007: Added ability to display posts (with caution), to expand by default, and also added plus and minus signs as expand/collapse buttons
  • 24-Aug-2008: Multiple updates:
    • Enqueue javascripts using WordPress API wp_enqueue_script
    • Validation as XHTML 1.0 Transitional
    • Add option to expand current year and/or month by default
    • REMOVED list type option
    • Added ability to upload own plus and minus images
    • Added ability to display plugin link. If you’d like to support this plugin, having the “powered by” on your blog is the best way; it’s our only promotion or advertising.
  • 25-Aug-2008: Bugfix to not load javascripts when effects is not used
  • 25-Aug-2008: Javascript code factoring and added ability to use HTML arrows
  • 16-Mar-2009: Separated year and month posts counts, added option to hide year after month names, ability to show current month in bold, enabled localized title
  • 17-Mar-2009: Fixed valid XHTML, and highlight (bold) bugfix


BIG FAT WARNING

The ability to display posts is provided after receiving so many requests for it. This feature is not practical for those with many posts in a month. Enabling it means that there is a lot more data that needs to be received by the browser, not to mention the load on the database. It is, however works very nice for blogs with low post count. Please use at your own risk and remember to test it.

Notes:

11-Nov-2007: I’d like to thank Meitar Moscovitz who tried his best to provide a patch to display posts in the list. I rewritten some of the code for version 2.1 based on his logic. Thank you!
25-Aug-2008: Thanks to Berny for his idea of re factoring the javascript code and also for providing HTML arrows option.

If you find this plugin useful, feel free to


Would You Return A Cellphone Found In The Streets?

I received my copy of the August 2007 edition of Reader’s Digest yesterday and IMHO it is the most interesting edition for me since I started my subscription about a year ago.

I ain’t gonna talk about all of the articles this time, but one of them. RD made an experiment where they sent their reporters to 32 cities in the world and in each of the city they left 30 mid-priced cellphones all over the place – to see how citizens react when they found it.

The article interestingly started with BK Low, a businessman who “found” a cellphone outside of a bank and immediately popped his head inside the bank and asked if anyone has accidentally left it outside. The article described many other instances where interestingly enough, people in the richest cities kept the found cellphones to themselves, while a homeless man in Budapest handed it over to a newsstand operator to be returned to the rightful owner.

However the total statistics reveal that more than 60% of the 960 cellphones were returned – which is quite a comforting figure. Kuala Lumpur, Malaysia have the same score with Hong Kong where only a little over 40% of the cellphones were returned – this is the lowest score among all of the selected cities which is quite disappointing for me although I expected that 🙂 From this experiment we can still be assured that in this world there is still some honesty left in more than half of earthlings.

It is also amazing how the power of persuasion can let some parents let their kids keep the found cellphone. Grab yourself a copy at the newsstand or the library and read all about it.

What would you do if you found a cellphone in the streets? Would you keep it?

Nikon Capture NX on Linux

I am feeling a little bit slow today, because my notebook is slow. LOL. I think this relates directly to the fact that everyday at work I am using a new Lenovo T60 notebook which is much faster than my 2 years old personal notebook. I used to dual-boot the notebook with Debian where the speed is acceptable but since I acquired a DSLR it is a hassle to switch OS. And I am not supposed to install non-approved software on the company computers.

My main issue not to run 100% Linux is that most of the graphics editor will not run properly, and most of the time fail to run on Wine. One of the software I use a lot is Adobe Photoshop. A couple of month ago I tried running CS2 on Wine and it didn’t work. I gave up on that. Recently, CS3 was released but I didn’t bother to try at all to avoid any disappointment.

Nikon Capture NX

Since I take all of my photos as RAW, or to be more precise in NEF (Nikon Electronic Format) I need either Photoshop or Nikon software to process the pictures I took. I’ve tried using dcraw and other open sourced RAW programs but the results just ain’t the same. Too bad. Or perhaps I am the one being not an expert in using those tools because some people do get better output. Quote from dcraw: “when used skillfully, produces better quality output than the tools provided by the camera vendor“.

Anyone have ever tried running CS3 or Nikon Capture on Linux (and succeeded)?

I Want WordPress Red T-Shirt!

WordPress Red T-Shirt

How cool is this! WordPress Shop is now selling WordPress red t-shirt worldwide. It’s gonna cost about RM100.00 including shipping for Malaysians. For the rest of the world, the t-shirt costs £9.50 and delivery is £4.50 but if you share with friends the delivery cost would be (£4.00 x Quantity) + X where X is between £0.50 – £0.10 according to my calculations 😉

The t-shirt is of high-quality made by American Apparel. I have to order it soon before the stock is finished!

Have you ordered yours?

Pangkor Island Beach Resort

So as I mentioned in my previous post, last weekend I went to Pangkor Island for the company’s team building. Here’s the picture taken once we arrived at the hotel private jetty:

Pangkor Island Beach Resort Signboard

This is not exactly a vacation and we didn’t have much chances to go to other tourist spots.

However it was a great event, and even though short we I had the chance to visit the Pangkor town and get some T-shirts and sea products to bring home. Not that they are much different, but just for our own memories. The trip from the resort to town from costs RM18.00 per van with minimum 4 passengers, and each additional passenger costs RM3.00. Quite a bargain for a tourist spot like this. Too bad we didn’t have the chance to visit some of the other spots like Sungai Kecil to see the villagers traditionally process the sea products!

Our trip to the town was fast and a bit scary – the driver was speeding and it was like a roller coaster ride. Luckily we didn’t rent motorbikes as the road was winding and hilly. It would have been scary and dangerous. If we ever come again we’ll still utilize the van / taxi rides. On the way to town we passed by Teluk Nipah, the public beach and it is amazing how many people are enjoying themselves.

Pangkor Sea Products

The funny thing is I saw a pre-packaged product with the label saying that it is from Beserah, Kuantan. I didn’t know they also import products from other places into Pangkor, which is rich in sea products.

The event lasted for two days – we left on Saturday and came back on Sunday. Since during the two days the weather was most of the time cloudy it was quite great except when it rains.

The boat trip back to main land was quite scary as it started to rain heavily when we reached the jetty.

The hotel was overall good, but when we first arrived the room smells a bit funny perhaps from the sea water that previous guests brought in with them.

Would I come again to Pangkor? Maybe – just to explore the whole island to take more photos. 🙂

Do you have any experience in Pangkor Island?

Surf The Internet Faster with OpenDNS

OpenDNS logo

So you want to surf the Internet faster? Ever heard of OpenDNS? I have been using OpenDNS for a week now to test its performance. So far it has not let me down, and the name resolving rate is satisfactory.

What is DNS?

DNS stands for Domain Name System. As you might already seen before, the Internet is made up of numbers called IP numbers that looks like XXX.XXX.XXX.XXX. The responsibility of DNS is to resolve the domain names you insert into the address bar into these numbers so that your computer can connect to the server hosting the contents you are looking for.

Every ISP has their own DNS to serve their customers. For example TMNET in Malaysia has two most common DNS servers: 202.188.0.133 and 202.188.1.5. These IP numbers are sent to your PC or your modem-router when you connect to the Internet. It works the same for any other ISP on the face of the world.

DNS eliminates the need for you to remember IP numbers which can be very long, especially when IPv6 is just around the corner.

DNS by Example

To arrive at this page, your address bar will contain https://blog.adyromantika.com/…. At this moment your PC will query the default DNS server and looks for the IP. The DNS server, looks at it cache and sees whether it already knows the IP and if found it will send the IP to your PC immediately. If not, the DNS server will ask the authoritative DNS server for the domain where in this case it will be NS5.SECURESERVER.NET and NS6.SECURESERVER.NET, then returns the number 68.178.254.5 to you. This is where this site is hosted.

What is OpenDNS?

OpenDNS is a free service, where millions of users around the globe requests names to be resolved. Be aware, however that your ISP might block DNS queries from individual PCs to any other DNS servers than their own. It is dumb but some of the ISP do it.

Can OpenDNS Speed Up My Internet Connection?

It can’t. The only thing that OpenDNS will speed up is the initial connection when your PC is trying to resolve numbers from any given domain names. What happen is that since OpenDNS is used by many and it have a huge cache, queries made are returned immediately so your PC does not have to wait. Also it helps if your ISP DNS is slow. Using OpenDNS speeds up the initial query so you’ll notice a difference in loading time.

How to Set Up OpenDNS on a PC?

You can see what DNS servers your machine is using by going to Control Panel > Network Connections > Select your default connection > Select the support tab > Click on button Details…. You should see the DNS Server.

To change it to use OpenDNS, Control Panel > Network Connections > Select your default connection > Click the Properties button > In the list select Internet Protocol (TCP/IP) > Click the Properties button > Select Use the following DNS server addresses > Enter the DNS server addresses 208.67.222.222 and 208.67.220.220

Please be aware however that you need administrative privilege to make these changes, and the firewall at your location allows queries to external DNS servers. If in doubt you may ask your system administrator, or better still if they have a local DNS server set up ask them to use OpenDNS as the master DNS servers.

Other Interesting Facts

OpenDNS has a database of bad sites consisting of phishing sites (by default) and adult sites (free registration required). If your PC is set up to use OpenDNS all of these can be blocked without any effort at your end. All that is needed is for you to be sure no one but you can bypass the settings and use other DNS servers. For example I set up my router to use OpenDNS in its local DNS server, and blocks any other DNS queries to the Internet. This way I am sure that my local network is safe from any malicious contents. This is an advanced (and technical) topic so I am not going to write it in here unless there’s any request.

OpenDNS does have instructions on how to use OpenDNS for many devices here. However you need to be smarter than your users to totally block other DNS queries except to OpenDNS servers.

Conclusion

OpenDNS is a good effort to provide quality DNS services to the masses. In the beginning of this article I mentioned that it has provided me good speed, not great mainly because the servers are located in the US and one in UK. International speed from TMNET is generally unpredictable so until OpenDNS setup a server in Asia, we get good speed, not great 😉

Here are the current servers:

  • New York, New York, USA
  • Palo Alto, California, USA
  • Seattle, Washington, USA
  • Washington, DC, USA
  • London, England, UK

Give it a try and let me know what you think.

PHP 4 End Of Life

PHP Logo

PHP 4 will finally reached its end of life on December 31, 2007. However critical security fixes will be made available until August 8, 2008.

This is a good time to revise your codes, to see whether they will run without any glitches in PHP 5. That first, then when doing any code upgrades or improvements do consider PHP 5 features and functions for your code. This page lists all changes that are not backward compatible in PHP 5.

As you can see, your code styling and implementation greatly effects the outcome of your code. For example the function array_merge in PHP 4 is loose and accepts any variable to be merged into an array, but in PHP 5 if the supplied variable is not an array PHP will throw you a warning (E_WARNING). It is strict. If you have always made sure that your code is strict, that is to always provide an array to be merged, then you can sit back and relax.

That is one example of a changed function, and there are some additions to the available functions as well. Be very careful to observe the changes to object handling in PHP 5.

If you are managing a server, do consider installing PHP 5 as a side, and test your existing systems thoroughly. If you use managed hosting, consider pushing your server provider to install PHP 5 for the same reason. Also make sure that if your provider wants to totally migrate to PHP 5 you are well informed. However, from my tests most of the systems that were developed in the PHP 4 era can still function well in PHP 5… but it is better to be safe than sorry.