Android Customisation

The awesome thing about Android phones, is the amount of customisation you can do to it, so much so that it is almost entirely a different phone from the original one you got.

HTC Desire Z with Sense UI

HTC Desire Z with Sense UI

After spending hours installing a custom ROM and fiddling with the widgets:

My Customised Homescreen

My Customised Homescreen

The only downside to this is, you need to know what’s going on and know how to fiddle with the widgets. And of course, some time to do the layout and configuration. Definitely not for the faint hearted.

In case you are wondering what are the widgets I used:

Homescreen Breakdown

Homescreen Breakdown

Email Sender Authentication

Came across a very interesting service today while trying to setup Sender Policy Framework (SPF) for my work email domain.

Port25 Solutions*, an email infrastructure software provider, has a service that helps check the sender authenticity of your email service (ie, the SPF settings, DomainKeys, etc) and also the spam rating of your email according to SpamAssassin’s settings.

Basically, it works by sending an email to this address: check-auth@verifier.port25.com
The content of the email can be empty, or if you want to test your marketing email or newsletter for “spamminess” against a SpamAssassin filter, you can include it as the email subject and content.

After sending the email, the service will reply with a report detailing your authentication settings and the spam rating of the email that you have sent.

The is a truncated report of my domain before implementing SPF:

This message is an automatic response from Port25's authentication verifier
service at verifier.port25.com.  The service allows email senders to perform
a simple check of various sender authentication mechanisms.  It is provided
free of charge, in the hope that it is useful to the email community.  While
it is not officially supported, we welcome any feedback you may have at
<<a href="mailto:verifier-feedback@port25.com">verifier-feedback@port25.com</a>>.

Thank you for using the verifier,

The Port25 Solutions, Inc. team

==========================================================
Summary of Results
==========================================================
SPF check:          neutral
DomainKeys check:   neutral
DKIM check:         neutral
Sender-ID check:    neutral
SpamAssassin check: ham

==========================================================
Details:
==========================================================

HELO hostname:  mail.brainfart.sg
Source IP:      209.141.57.235
mail-from:      <a href="mailto:keewee@brainfart.sg">email@brainfart.sg</a>

----------------------------------------------------------
SPF check details:
----------------------------------------------------------
Result:         neutral (SPF-Result: None)
ID(s) verified: <a href="mailto:smtp.mailfrom=keewee@brainfart.sg">smtp.mailfrom=email@brainfart.sg</a>
DNS record(s):
    brainfart.sg. SPF (no records)
    brainfart.sg. TXT (no records)

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: <a href="mailto:header.From=keewee@brainfart.sg">header.From=email@brainfart.sg</a>
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified:

NOTE: DKIM checking has been performed based on the latest DKIM specs
(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for
older versions.  If you are using Port25's PowerMTA, you need to use
version 3.2r11 or later to get a compatible version of DKIM.

----------------------------------------------------------
Sender-ID check details:
----------------------------------------------------------
Result:         neutral (SPF-Result: None)
ID(s) verified: <a href="mailto:header.From=keewee@brainfart.sg">header.From=email@brainfart.sg</a>
DNS record(s):
    brainfart.sg. SPF (no records)
    brainfart.sg. TXT (no records)

----------------------------------------------------------
SpamAssassin check details:
----------------------------------------------------------
SpamAssassin v3.3.1 (2010-03-16)

Result:         ham  (-0.0 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
-0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
                            domain
-0.0 BAYES_40               BODY: Bayes spam probability is 20 to 40%
                            [score: 0.3966]
 0.0 HTML_MESSAGE           BODY: HTML included in message

And this is after implementing SPF:

<pre>This message is an automatic response from Port25's authentication verifier
service at verifier.port25.com.  The service allows email senders to perform
a simple check of various sender authentication mechanisms.  It is provided
free of charge, in the hope that it is useful to the email community.  While
it is not officially supported, we welcome any feedback you may have at
<<a href="mailto:verifier-feedback@port25.com">verifier-feedback@port25.com</a>>.

Thank you for using the verifier,

The Port25 Solutions, Inc. team

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         neutral
Sender-ID check:    pass
SpamAssassin check: ham

==========================================================
Details:
==========================================================

HELO hostname:  mail.brainfart.sg
Source IP:      209.141.57.235
mail-from:      <a href="mailto:keewee@brainfart.sg">email@brainfart.sg</a>

----------------------------------------------------------
SPF check details:
----------------------------------------------------------
Result:         pass
ID(s) verified: <a href="mailto:smtp.mailfrom=keewee@brainfart.sg">smtp.mailfrom=email@brainfart.sg</a>
DNS record(s):
    brainfart.sg. SPF (no records)
    brainfart.sg. 86400 IN TXT "v=spf1 mx -all"
    brainfart.sg. 86400 IN MX 10 mail.brainfart.sg.
    mail.brainfart.sg. 85429 IN A 209.141.57.235

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: <a href="mailto:header.From=keewee@brainfart.sg">header.From=email@brainfart.sg</a>
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified:

NOTE: DKIM checking has been performed based on the latest DKIM specs
(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for
older versions.  If you are using Port25's PowerMTA, you need to use
version 3.2r11 or later to get a compatible version of DKIM.

----------------------------------------------------------
Sender-ID check details:
----------------------------------------------------------
Result:         pass
ID(s) verified: <a href="mailto:header.From=keewee@brainfart.sg">header.From=email@brainfart.sg</a>
DNS record(s):
    brainfart.sg. SPF (no records)
    brainfart.sg. 86400 IN TXT "v=spf1 mx -all"
    brainfart.sg. 86400 IN MX 10 mail.brainfart.sg.
    mail.brainfart.sg. 85429 IN A 209.141.57.235

----------------------------------------------------------
SpamAssassin check details:
----------------------------------------------------------
SpamAssassin v3.3.1 (2010-03-16)

Result:         ham  (-1.9 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
-0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
                            domain
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                            [score: 0.0000]
 0.0 HTML_MESSAGE           BODY: HTML included in message

Pretty nifty eh?

And there is another use for this service that I can foresee, testing end-to-end email connectivity.
After setting up a new email server, you can use this automated service for mail flow testing, sending and receiving of email. And at the same time test your SPF settings.
Cool, ain’t it!

*Note: I am in no way affiliated with Port25 Solutions, I just found this service useful and thought I should share it

That awesome moment when…

Success Kid - Insurance Agent

Success Kid - Insurance Agent

Radioactive Illumination

A long while back, I bought a Tritium Kit Marker/Keychain from DealExtreme (man, that site sells everything! or so I thought…)

For those who are unaware of what Tritium is, it is a radioactive isotope of Hydrogen and the keychain uses that to excite a phosphor coating to create light in a process called radioluminescence. In short, it doesn’t require any external batteries or charging and will remain lit for as long as the radioactive ‘fuel’ is still decaying.
Now, before you panic with Chernobyl and Fukushima in your mind, you have to understand that Tritium decays by emitting beta particles. And if you still remember your Secondary School/High School physics, you’ll remember that beta particles can be stopped by a sheet of aluminum or a thick piece of plastic. In this case, the Tritium vial is encased in a thick piece of plastic, acrylic I believe, so it is pretty safe. But then again, I wouldn’t really put the kit marker in my side pockets, just in case.

Anyway, since then I’ve given the kit marker away and was looking to get some more. So where else to look for other than DealExtreme?
Turns out, DX stopped selling them awhile back… A quick forum search shows that they’ve been restricted by Paypal. Something to do with shipping radioactive items to the US perhaps? Basically, all traces of the Tritium Kit Markers vanished from the site, except for some reviews. I was quite bummed by that, until I found a UK seller on eBay, Traser Watches, selling the kit markers. The great thing about the seller is that they sell a lot more colours than DX and the pricing is fixed for all the colours. Yay!
In addition, they sell the medium and large version of the kit markers. Double-Yay!

So I ordered 3 of the kit markers (Red, Green and Blue) last Monday morning, it was shipping that Monday afternoon and arrived on Friday.
Fast shipping, I like!

Tritium Kit Markers

Tritium Kit Markers

It seems like the green marker is brighter than the one I got from DX. From a fresher batch perhaps?
Now to decide on where to place these kit markers and maybe order the larger ones from Traser Watches.
And since I’m hooked onto this Tritium illumination thingy,  maybe finally get a Ball Watch. :D

Cape Verde

Just got back from a business trip to Cape Verde. In case you are wondering, Cape Verde is a group of islands off the coast of Senegal in West Africa.

Boy, it is a beautiful country! Totally not what I was expecting, after the trip to Tanzania in the middle of the year. The only bad thing is that it is just too damn far from Singapore… It took me some 40 hours to get to their capital, Praia and another 30 hours to get back to Singapore from Praia. The reason for the the extra 10 hours to get there? I had to layover for almost 12 hours on another island, Sal, as there wasn’t a direct flight that day… So yup, I slept like a hobo in the airport.

A pretty uneventful biz trip, just some minor hiccups here and there, no biggie. This is the type of biz trip I prefer, not much surprises and things going to plan. Would like to have some free time to go explore around though. But you can’t have everything ;)

New Dogster Stickers!

Dogster is giving away their new stickers!

Same thing, just send them a self-addressed, stamped envelope if you are in the USA.
If you are not in the US of A, like me, you can send them an International Reply Coupon together with the self-addressed envelope.

And since I’m gonna mail them the IRC, I might as well send some stuff together. Pictures of my two sweeties. :D

Also, they are having a photo competition of sorts. Once you have got the stickers and found an awesome place to stick them, take a photo and send it to them. The best photo will get featured in their blog!

Fading Ink

It seems like the Lamy T10 black ink fades pretty easily. Stuff that I wrote a few weeks back have faded to a greyish-brown colour instead of the original black colour…

Another thing I notice was that the ink’s solvent (I think…) seems to oxidize or something when it is exposed to air, turning into a yellowish stain.

Pen Ink

On the left is the Lamy T10 Black ink that came with my Lamy Al-Star and on the right is the Pelikan Brilliant Black that I filled into my Hero 336.

The paper was soaked by placing the nib on the paper for a while, letting it flow out.

Did I get an imitation ink, or are all Lamy T10 Black ink like that?

Best Friend

Apache Load Balancing and Session Stickiness with Tomcat

Me and my colleague were trying to set up an Apache load balancer yesterday to balance the connections to a pair of Tomcat servers. As we were balancing connections to application servers, one of the main requirements was to maintain session stickiness when routing the connections.

Most articles on the internet are dealing with load balancers serving static or session-insensitive pages. So it took us quite a while to figure out how to setup what we wanted. We went through countless articles and tutorials teaching us to set up simple load balancing functions on the Apache web server. And we followed those instructions to the word and still can’t get session stickiness to work…

That is, until we stumble across this goldmine!

Near the bottom of the tutorial was the magic that made everything work, the configuration to the Tomcat server. Seems like not many people on the internet have to deal with Apache load balancing to Tomcat with session stickiness as none of them mentioned anything about configuring the Tomcat. (either that, or we are pretty stupid and clueless about Apache and Tomcat… we are n00bs afterall) The articles and tutorials just casually mention the “route” parameter and then move on to the rest of balancing configurations.

So, to configure an Apache load balancer with session stickiness to Tomcat, you first have to configure the Apache webserver:

LoadModules proxy_module mod_proxy.so
LoadModules proxy_http_module mod_proxy_http.so
LoadModules proxy_balancer_module mod_proxy_balancer.so

ProxyRequests Off
ProxyPreserveHost On

apacheLB>
BalancerMember http://server1:8080 route=http1
BalancerMember http://server2:8080 route=http2
</Proxy>

ProxyPass /examples balancer://apacheLB/examples stickysession=JSESSIONID
ProxyPassReverse  /examples balancer://apacheLB/examples

The first 3 lines will load the necessary modules for a Proxy HTTP Load Balancer in Apache.

“ProxyRequests Off” will turn off the forward proxy function of Apache as we are only interested in the reverse proxy function.
“ProxyPreserveHost On” will preserve the host header to the proxied host.

The Proxy stanza is where you define the members of the load balancer pool and the name of the balancer url. Note value of the “route” parameter,  you can set it to whatever name you want as long as it is unique, you will need this in the Tomcat configuration. You can also set some load balancing parameters like the lbmethods, the retry timeout, the lb weightage and so on. You can find out more in the mod_proxy documentation.

You define the load balancer like any other Apache Reverse Proxy, the only difference is in the mapping. In a regular reverse proxy, you’ll map the application context to a specific server. But in the case of a Load Balancer, you map the application context to a balancer url, as defined in the Proxy stanza. Note the “stickysession” parameter, this is to define the session name. In the case of a Tomcat server, we’ll use “JSESSIONID”.

Next, you have to configure the Tomcat servers, in the server.xml configuration file:

# In Server 1 server.xml
<Engine name="Catalina" defaultHost="server1" jvmRoute="http1">

# In Server 2 server.xml
<Engine name="Catalina" defaultHost="server2" jvmRoute="http2">

Locate the “Engine” tag in the server.xml file of each Tomcat server or instance and add in a “jvmRoute” parameter. Make sure the value of the “jvmRoute” parameter is the same as the one defined in the Apache configuration file for each server.

And, you are done! A simple Apache load balancer with session stickiness to Tomcat servers.

Nike We Run SG 10K

Nike We Run SG 10K

Today was the Nike We Run SG 10K event, the one which 12,000 slots were fully registered within two days of registration opening. Quite a few of my friends were exclaiming that they didn’t get to register in time for the race. Well… For Nike running events in Singapore, you can’t really mull over the registration, you gotta decide fast.

The race expo was last weekend over at Orchard Central. Reach there around 7pm sharp and boy, was there a long queue already. The race pack was quite sparse, a race tee (that’s what most people signed up for), a race tag, a Nike water bottle and an event info sheet.

Nike We Run 10K Tee

Fast forward to today’s race. Well… It didn’t really get off to a very good start… Early in the morning, SMRT had a delay in their service… I waited for quite a while at Lakeside for the east-bound train and it didn’t arrive till 6:10am… And after Jurong East Station, the train was like a weekday peak hour train, packed to the brim… Was suppose to meet up with my friend Kenny at Southbank@Lavender to put all the barang-barang in his car before heading to the race village… But due to the train delay, had to meet him straight at the race village…

Not sure if it was due to the train delay that there was a huge crowd moving off at Kallang station, but it seems like that event was ill-equipped to handle large crowds… There were many chokepoints and funnelling of crowds… Especially bad was at the entrance into the race village and the path towards the starting pen. Why would you funnel a large crowd into a small pathway? I don’t quite understand on that…

The run itself was quite pleasant. Large crowds, but the paths were wide, spacious and well, proper paths. Unlike a certain run where there were funneling of crowds, mixture of paths and trails, dimly lit paths… (*cough*AHM*cough*) Lots of overtaking within tight spaces, due to the large crowd and I believe also due to people not really prepared for the run.

This year’s finisher’s item is a Keychain/Flashdrive. At first I thought it was just a normal keychain (cheapskate!), until Kenny told me that it’s a flashdrive too! Well… It’s only 2GB, but still much more useful than a just a keychain.

Nike We Run SG 10K Finisher's Item

All the usual stuff at the Finishing Point/Race Village, 100Plus, Ice Mountain (mineral water), banana, massage points (Salon Plus mostly…) and in addition, ice cream! Not sure if eating ice cream after a run is a good idea… Didn’t queue for it, too long…

Headed down to Southbank@Lavender for a swim and jacuzzi after the run. Man, it was awesome! The view, the swim and the jacuzzi itself. The water jet was just nice~ A good water jet massage after a run, hah.

Southbank@Lavender Infinity Pool

My next run will be the Newton 2011 Run. 30KM… Oh shit…