tag:blogger.com,1999:blog-6347260585490349302009-03-02T11:17:20.159+05:30Mohanjith's BlogMohanjith aka MOHA bloging news and thoughts...mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.comBlogger63125tag:blogger.com,1999:blog-634726058549034930.post-24751467936224427052008-10-28T00:51:00.003+05:302008-10-28T01:09:01.801+05:30Google Maps and Sri Lanka Postal CodesI revisited one of my projects from the school days, <a href="http://mohanjith.net/ZIPLook/">Sri Lanka Postal Codes Search</a>. I haven't touched it from ages, but looking at Google Analytics it was the most popular part of my site apart from the blog. On few occasions some of the users had suggested some usability improvements such as Post Office name auto completion, Google Maps to show the Post Office location, and also to allow users to report errors or omissions within the site itself. They were valid requests but with my busy schedule never got about to implement them. Finally last weekend I got some free time to make these improvements.<br /><br />Now the Sri Lanka Postal Codes section has two parts, the search and regional details section. In the search the Post Office Name and the Postal Code fields will be auto completed. During auto completion, other filters are also evaluated. In the <a href="http://mohanjith.net/postal_codes/">regional details section</a>, Post Office location is provided on Google Maps. The Post Offices are categorized into their respective provinces and districts.<br /><br />During the course of the week I plan to implement a feed back form designed specifically for the purpose allowing the users to report errors and omissions.<br /><br />Hope you like the new and improved <a href="http://mohanjith.net/ZIPLook/">Sri Lanka Postal Codes Search</a> and <a href="http://mohanjith.net/postal_codes/">Sri Lanka Postal Codes List</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-2475146793622442705?l=blog.mohanjith.net'/></div>Mohanjithhttp://www.blogger.com/profile/00420972534166159294noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-38574030238375434342008-08-27T21:37:00.003+05:302008-08-27T22:09:44.165+05:30Persistent storage for Amazon EC2 with EBSLast week (20th August) Amazon Web Services released Amazon Elastic Block Store (EBS). Amazon EBS provides block level storage volumes for use with Amazon EC2 instances. Amazon EBS volumes are off-instance storage that persists independently from the life of an instance. Amazon Elastic Block Store provides highly available, highly reliable storage volumes that can be attached to a running Amazon EC2 instance and exposed as a device within the instance. Amazon EBS is particularly suited for applications that require a database, file system, or access to raw block level storage.<br /><br />This is a follow up to my posting, http://blog.mohanjith.net/2008/02/amazon-ec2-with-rock-solid-persistent.html. The method described there is obsolete with the release of Amazon EBS. None the less you can place the jail file system inside the EBS block device and not worry about having to build AMIs from time to time.<br /><br />Hope this information helps someone.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-3857403023837543434?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-14973905450600506272008-08-18T05:16:00.002+05:302008-08-27T21:36:32.094+05:30New features and bug fixesNew version of Poll-n-Ping! was rolled out. With new features to help you spend more time on Poll-n-Ping! and a major bug fix in the user registration.<br/><br/><a href='http://admin.freshblog.ws/2008/08/new-features-and-bug-fixes.html'>read more</a> | <a href='http://digg.com/software/New_features_and_bug_fixes'>digg story</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-1497390545060050627?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-67647944487337240422008-08-15T17:35:00.005+05:302008-08-19T20:21:39.670+05:30BlueProximityBlueProximity is a cool GNOME application that detects the proximity to a Bluetooth device to determine whether the user is in proximity. If the user is way the screen will be locked (or any command be run), when the user is in proximity the screen will be unlocked (or any command be run). <br /><br />However if the screen is manually locked it will not be unlocked because the Bluetooth device is in proximity. Should the screen be locked because the Bluetooth device is away, you can manually unlock the screen.<br /><br />Blueproximity allows you to secure your machine while not going through the inconvenience of locking the screen when you are leaving the machine and then unlocking it when you are back. BlueProximity, Leave it - it's locked, come back - it's back too...<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-6764794448733724042?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-69261841504994363942008-07-06T22:15:00.007+05:302008-07-06T23:35:26.790+05:30Using Nokia N70 to connect to internet with Ubuntu 8.04Recently I bought a Nokia N70 Music Edition. It was mainly for internet on the go; to check mail, browse the net, receive and make VOIP calls. Just to see whether it would work, I tried to connect to internet via 3G using the N70. To much to my delight I was successfully connected to internet without any issues using the GNOME network applet/admin. I have a Dialog Broadband connection, and download speeds were in the range of 25KB/s-40KB/s, pretty good on WCDMA 2100. Best part of all was that I didn't have to touch the command line. So all not so technically inclined folks can make it work as well without glitches. <br /><br />Bellow you will find the steps. Please make sure you can browse the net with the phone to make sure you are in a service area ;).<br /><br /><b>Step 1</b><br /><br />Connect the phone to the PC. I used USB but Bluetooth is reported to be working on Ubuntu 8.04 as well.<br /><br /><b>Step 2</b><br /><br />Start the network admin application (System -> Administration -> Network), you'll have to unlock it if you are not root (most likely you are not).<br /><br /><b>Step 3</b><br /><br />Select "Point to point connection" and open up the properties. <br /><br /><b>Step 4</b><br /><br />In the General tab make the following changes. Check/select "Enable this connection". Select GPRS/UMTS as the Connection type. Set the Access point name to what's provided by your service provider (In my case it was www.dialogsl.com). Under account data put your username and password provided by your service provider if any. <br /><br /><b>Step 5</b><br /><br />In the modem tab select/type in the correct modem port, in my case it was /dev/ttyACM0. If it doesn't work for you, plug the phone usb cable while monitoring /var/log/messages, you can see where the phone is being mounted.<br /><br /><b>Step 6</b><br /><br />Save the settings by pressing Ok, then activate the connection by checking the check box against "Point to point connection".<br /><br />That's it, now you should be connected to the internet via 3G if there is coverage in your area or else via GPRS. Hope you will find this post helpful.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-6926184150499436394?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com1tag:blogger.com,1999:blog-634726058549034930.post-820019442888657792008-06-13T19:37:00.002+05:302008-06-13T19:39:41.421+05:30How to Change the Default WSAS SSL CertificateThis tutorial shows you how to replace the default SSL certificate that comes with the WSO2 Web Services Application Server, with a self signed or certification authority signed SSL certificate.<br/><br/><a href='http://wso2.org/library/3002'>read more</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-82001944288865779?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-37690640371303569842008-05-29T12:04:00.004+05:302008-05-29T19:55:07.119+05:30SVN Commit messages from the authorI was given the task of altering a SVN commit message hook(mailer.py) to send the messages as the author. The box was running Debian Etch, looking at the mailer.conf file I couldn't figure out how to do that. There was no documentation that I could find.<br /><br />Finally after much head scratching and searching I figured out that %(author)s situation variable can be used in from_addr. It was confirmed by http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.conf.example.<br /><br />Hope this will come in handy for someone trying to do the same.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-3769064037130356984?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-23482237217386544432008-04-23T11:21:00.005+05:302008-04-23T11:58:16.212+05:30Real ranks for real bloggers - IZEA RanksFinally there is a blog ranking system that takes traffic and influence into account to rank your blog, <a href="http://socialspark.com/metrics/click/post?slot_id=646&url=http%3A%2F%2Fwww.izearanks.com" rel="nofollow">Izea Ranks</a>. Unlike Technorati rank or Alexa ranks, where only traffic or influence is taken into account to calculate the blog/site rank IZEA Ranks considers both traffic and influence.<br /><br />Pure traffic nor influence would make a blog successful but the combination. Finally there is a proper blog ranking system. IZEARanks ranks the top blogs in the blogosphere via actual site statistics, not an extrapolation of estimates.<br /><br />Get your blog ranked by <a href="http://www.izearanks.com/" rel="nofollow">IZEA Ranks</a> today, it's free.<br /><br /><span class="review-post"><a href="http://socialspark.com/metrics/click/disclosure?slot_id=646&url=http%3A%2F%2Fwww.izearanks.com" rel="nofollow"><img alt="Sponsored by IZEARanks" src="http://socialspark.com/metrics/view/post?slot_id=646&url=http%3A%2F%2Fsocialspark.com%2Fuploads%2Fsocialspark%2Fpublic%2Fimages%2Fdisclosure_badges%2F449%2Fgray_disclosure_badge.jpg" /></a></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-2348223721738654443?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-11492823000192856042008-04-07T15:32:00.001+05:302008-04-07T15:34:52.008+05:30Ping Bloglines - Poll-n-Ping! exclusive<a href="http://www.bloglines.com/">Bloglines</a> is the latest service to be added to the list of services <a href="http://mohanjith.net/pnp/">Poll-n-Ping!</a> can ping. None of the multiple ping services that are out there has the ability to ping Bloglines. This brings the total number of services Poll-n-Ping! support to 20.<br /><br />Some multiple blog ping services (e.g. Pingoat) have ping servers that are no longer existant. We at Poll-n-Ping! continuousy monitor the upstream ping services to ensure that they are live. We are also believe in being transparent, hence provide you will the result of each ping we make.<br /><br />We are constantly trying to increase the number of services we ping. Do not forget to check your Poll-n-Ping! account regularly for the latest additions. If you do not already have a Poll-n-Ping!, you are not exploiting the maximum potential of your blog. Grab your self a free <a href="http://mohanjith.net/pnp/">Poll-n-Ping!</a> account without further dalay.<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-1149282300019285604?l=blog.mohanjith.net'/></div>Mohanjithhttp://www.blogger.com/profile/00420972534166159294noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-45351259070517705842008-04-01T00:59:00.002+05:302008-04-01T01:09:26.721+05:30Ping more search engines than with Ping-o-MaticNow you can ping more blog search engines at once than it was possible with <a href="http://pingomatic.com/">Ping-o-Matic</a>. <a href="http://mohanjith.net/pnp/">Poll-n-Ping!</a> added 3 more services today, bringing the number of services that will be pinged to 18 whil Ping-o-Matic only supports 16 services.<br /><br />Poll-n-Ping! is the latest pinging service. Poll-n-Ping! is morethan just a pinging service, it monitors (polls) your blog for changes. Also provides notification, should you blog go down for some reason. All this comes for free, the best price ever.<br /><br />Go grab your <a href="http://mohanjith.net/pnp/">Poll-n-Ping!</a> account now, you can forget about pinging and concentrate on blogging. Poll-n-Ping will take care of pinging blog search services.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-4535125907051770584?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-47182954812703644582008-03-31T01:28:00.002+05:302008-03-31T01:41:44.671+05:30Poll-n-Ping!, automagically ping 15+ services<a href="http://mohanjith.net/pnp">Poll-n-Ping!</a> added 8 more services today to the list of services that will be automatically pinged, bringing the number to 15. Register for a Poll-n-Ping! account, and put your blog details today and never bother about manually pinging when there are new posts in your blog; Poll-n-Ping! will take care of it all.<br /><br />The number of services that Poll-n-Ping! supports will increase further in the near future. Don't forget to create a Poll-n-Ping! account.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-4718295481270364458?l=blog.mohanjith.net'/></div>Mohanjithhttp://www.blogger.com/profile/00420972534166159294noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-24681802375189114712008-03-28T17:46:00.007+05:302008-03-28T19:24:53.735+05:30Recipe for compressed script.aculo.usI was searching for a compressed version of <a href="http://script.aculo.us">script.aculo.us</a> javascript library in one file. The search turned out almost fruitless; I found outdated script.aculo.us versions compressed. It was obvious to me that I was on my own. I also wanted to post the method to do it instead of the result.<br /><br /><a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a> was the best tool I could use to compress any javascript. YUI combined with gzip compression for compatible browsers would produce the smallest on the wire javascript files (See http://www.julienlecomte.net/blog/2007/08/13/).<br /><br />First attempt to put all the script.aculo.us files into one file failed with mismatched dependencies. I had to find out the correct order to concat the files. As I found out the order should be scriptaculous.js, builder.js, effects.js, controls.js, dragdrop.js, slider.js, sound.js (I have specifically left out unittest.js). If you want you can throw in <a href="http://prototypejs.org/">Prototype</a> into the mix at the begining as it is required by script.aculo.us (I did that).<br /><br />Run the following command in a shell prompt from the script.aculo.us root. to concat prototype and script.aculo.us.<pre> $ cat lib/prototype.js src/scriptaculous.js src/builder.js src/effects.js src/controls.js src/dragdrop.js src/slider.js src/sound.js > scriptaculous.bundle.js</pre> You need to download YUI compressor, run the following command. <pre> $ java -jar /path/to/yui/compressor/build/yuicompressor.jar scriptaculous.bundle.js -o scriptaculous.bundle.min.js</pre><br /><br />In my case I use YUI compressor version 2.3.5 and script.aculo.us 1.8.1, and the file sizes were 244KB scriptaculous.bundle.js and 146KB scriptaculous.bundle.min.js. That's a 40% compression.<br /><br />You need to configure your web server to serve javascript files gzipped for user agents that are accepting gzipped content. You have to do your own reasearch for that :). After gzip compression was turned on for javascript files the size of scriptaculous.bundle.min.js on the wire is 41K, that's a 83% compression, wow that's alot of saving on bandwidth and loading time.<br /><br />You can download the compressed and bundled script.aculo.us <a href="http://mohanjith.net/downloads/script.aculo.us/1.8.1/scriptaculous.bundle.min.js">scriptaculous.bundle.min.js</a>. Hope someone will finds it useful.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-2468180237518911471?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com4tag:blogger.com,1999:blog-634726058549034930.post-64274097372196053292008-03-21T19:01:00.002+05:302008-03-21T22:51:52.525+05:30Thoughts.com forumThoughts.com <a href="http://www.thoughts.com/forums/" rel="nofollow" >Forums</a> has a large community of users and a panthera of topics. Any one is free to join. All users get their personal blog and many more free services.<br /><br />Registered users are allowed to initiate and join discussions on the topics available. You must be thinking that the forum must be full of spam, not quite because spammers are dealt with vigorously. Thoughts.com provides a platform to stage your views and thoughts for free.<br /><br />IMHO Thoughts.com is going to be a top portal site in time to come. They are a Web 2.0 site that puts the user in control. I wish Thoughts.com remains free while adding many more services such as free web mail and search. You must be saying there are many more such portals, but market competition is always good for the consumer.<br /><br />Don't be late go reserve your user account at Thoughts.com now. If you have any thoughts that you would like to share put it in Thoughts.com. Put your thinking caps on, get a Thoughts.com account from <a href="http://www.thoughts.com/" rel="nofollow">http://www.thoughts.com/</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-6427409737219605329?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-82959659203975966382008-03-15T01:27:00.003+05:302008-03-15T01:28:45.722+05:30GNOME 2.22 released, brings new architectural featuresGNOME 2.22 has been officially released with significant new features like GVFS and PolicyKit. GNOME 2.22 will be included in Ubuntu 8.04 and Fedora 9, which are scheduled for release next month.<br /><br /><a href='http://arstechnica.com/news.ars/post/20080312-gnome-2-22-released-brings-new-architectural-features.html'>read more</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-8295965920397596638?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-12762742884994061482008-03-14T18:58:00.006+05:302008-03-14T19:29:38.697+05:30Poll-n-Ping, coz u r busy bloggingI would like to introduce a brand new service. It is a automated blog search directory pinging service named <a href="http://mohanjith.net/pnp">Poll-n-Ping</a>. It is different from <a href="http://pingomatic.com/">Ping-o-matic</a> and similar services, because Poll-n-Ping monitors the blog (actually the feed) for changes and when it detects changes it will automatically ping the blog search directories.<br /><br />You can checkout the service at <a href="http://mohanjith.net/pnp">http://mohanjith.net/pnp</a>. All this comes free of charge, but donations are always welcome. Right now there is no limit on the number of blogs that can be monitored by a single user. If you want your blog to be submitted to all the blog search directories that we add support from time to time, you will have to visit <a href="http://mohanjith.net/pnp">Poll-n-Ping</a> regularly.<br /><br />Soon I plan to add alert service <a href="http://mohanjith.net/pnp">Poll-n-Ping</a>, the subscribed users can receive notification mails or IM when content changes, blog goes offline, and/or blog comes online. However this will be a paid service unless I receive enough donations to support the hosting.<br /><br /><a href="http://mohanjith.net/pnp">Poll-n-Ping</a> has Turbogears under the hood :-).<br /><br />Hope you will find the <a href="http://mohanjith.net/pnp">Poll-n-Ping</a> service useful.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-1276274288499406148?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com1tag:blogger.com,1999:blog-634726058549034930.post-61118007353246715312008-03-13T02:06:00.003+05:302008-03-13T10:38:55.312+05:30Hacking drupal: Add search by node creation date and the authorSome of the users using one of my Drupal sites were asking for search by author and creation date. The site had 3000+ nodes and the user's request seemed reasonable enough. I first started with googling for a Drupal module or a patch that would add the functionality, but none were found.<br /><br />So when ahead and hacked the node module. I sucessfully managed to add search by author and node creation date to advanced search block. If you are in searching for a patch like I did you can find it at <a href="http://drupal.org/node/233476">http://drupal.org/node/233476</a>, I'm keeping my fingers crossed to see whether it would make it to the Drupal trunk :).<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-6111800735324671531?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-81646633234492797472008-03-08T23:54:00.007+05:302008-03-09T00:42:54.337+05:30Blogger 502 errorsFew minutes ago this same blog, hosted on Blogger started giving 502 Server Error (for more than 15 minutes). I was frustrated and even thought of hosting my blog on one of my servers. I don't know what caused the issue, but one thing I know this is not the first time and I was not alone; Even <a href="http://xooglers.blogspot.com/">http://xooglers.blogspot.com/</a> was down (giving 502 errors). See <a href="http://www.flickr.com/photos/seeminglee/2050618571/in/set-72157603261415176/">http://www.flickr.com/photos/seeminglee/2050618571/in/set-72157603261415176/</a> for another instance where this issue shot up.<br /><br />Googling for a cause landed fruitless, my likely guess is blogger servers were overloaded. Hope this doesn't happen again.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-8164663323449279747?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-14801832630994514222008-03-08T19:48:00.003+05:302008-03-08T22:22:02.799+05:30Filter module support for Premium moduleThere was a need to put a log in link with destination get variable set if the user is not authenticated and trying to view a premium node. The obvious place to put such content is the "Premium body text" in /admin/settings/premium, however one problem was that "Premium body text" can only static html, no filters/format.<br /><br />I couldn't quite believe why filter module was not being made use of there, so I went ahead an made the necessary changes to make it possible to select the filter/format to be applied to "Premium body text". The patch will add a Input format section to the settings form, that filter chosen there will be applied when the "Premium body text" is rendered into a node.<br /><br />You can see the progress of the patch submitted to drupal.org at <a href="http://drupal.org/node/231641">http://drupal.org/node/231641</a>. I just hope the patch will make it to the premium module head. The development of the premium module is nearly stagnant :(, that conserns me.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-1480183263099451422?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-77704679993235778262008-03-08T15:32:00.023+05:302008-03-15T01:17:20.665+05:30Recipe to earn a buck from your blogIt is simple to earn a buck from your blog. What you have to do is blog regularly on interesting topics and join a pay per post program such as <a href="http://blog.payperpost.com/index.php" rel="nofollow">PayPerPost</a>. What I like about PayPerPost is that they force you to write un-sponsored, original posts as much as you write sponsored posts aka <a href="http://payperpost.com/advertisers/marketplace.html" rel="nofollow">blog ads</a> (At least 1:1 ratio). That way your blog doesn't become a commercial blog.<br /><br />I joined PayPerPost after I read a post about how much you can earn from pay per post networks. After all you get paid to do what you love to do. Joining PayPerPost was a fast and simple process, however initially my blog got rejected initially because I had neglected my blog for too long (Less than 30 posts in 3 months), my bad. Now I see what a mistake I made last fall, neglecting my blog. :-(<br /><br />I have tried PPC advertising programs, but they do not pay well. Specially if most of what you write is technical, so PayPerPost is tha way to go. <br />What's even better is PayPerPost has started a brand new program called "Get paid to review my post", that rewards the posties/blogger's readers. If you join PayPerPost even your readers could earn a buck while you continue to earn for the reviews as well. Yep you reard correct, both the blogger and the reviewer get paid for the review.<br /><br />Don't waste time, start blogging and join <a href="http://blog.payperpost.com/index.php" rel="nofollow">PayPerPost</a>.<span class="review-post"><img alt="" src="http://tinyurl.com/yt9eke" /></span><br /><br /><span class="review-post"><a href="http://www.payperpost.com/?utm_source=opportunity&utm_medium=disclosure%2Bbadge" rel="nofollow"><img src="http://tinyurl.com/2er3eu" border="0" alt="Sponsored review" /></a></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-7770467999323577826?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-53208547208536984152008-03-03T19:39:00.005+05:302008-03-03T22:40:08.887+05:30Drupal Atom module spits invalid xmlDrupal Atom module is spitting invalid XML in some cases. It is obvious that all user generated text in XML should be either escaped or appear within <a href="http://en.wikipedia.org/wiki/CDATA#CDATA_sections_in_XML">CDATA</a> section. However it is not the case with title and subtitle sections. If the site title contains "&", then the atom/feed will guaranteed to be invalid.<br /><br />I came across this the hard way, in one of the sites I was maintaining someone decided that they need "&" in the title, then the atom/feed was giving a XML parser error. After little bit of head scratching, I was able to triangulate the buggy piece of code. <br /><br />You can read the progress of the issue at <a href="http://drupal.org/node/229392">http://drupal.org/node/229392</a>, you can download the patch from the same.<br /><br />Hope I saved someone from much head scratching and frustrations.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-5320854720853698415?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-50641060141759508692008-02-26T10:31:00.010+05:302008-02-26T18:55:13.648+05:30Hacking TurboGears: Automatically loggin in users<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.turbogears.org/static/images/g_gear.png"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px;" src="http://www.turbogears.org/static/images/g_gear.png" border="0" alt="TurboGears" /></a><br />I love the way the <a href="http://drupal.org">Drupal</a> handles account activation and password reset. The user just have to click a link that they receive via e-mail, and they are automatically logged in.<br /><br />I wanted to do something similar with one of the applications I'm developing right now using <a href="http://www.turbogears.org/">TurboGears</a>. I thought I would write a new identity provider, but instead went about hacking TurboGears. I noticed that TurboGears defualt soaprovider can be improved to seperate user authentication and marking a user as authenticated, hence making it reusable.<br /><br />In my application's controller I use this newly introduced method to mark the user as authenticated. I thought someone else might hit the same problem, and blogged about it.<br /><br />You can download the patch from <a href="http://mohanjith.net/downloads/scripts/python/TurboGears/1.0.4.3/soaprovider.diff">http://mohanjith.net/downloads/scripts/python/TurboGears/1.0.4.3/soaprovider.diff</a>, it is created against TurboGears 1.0.4.3.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-5064106014175950869?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-62948971897801609172008-02-23T02:32:00.002+05:302008-02-23T02:44:14.399+05:30CAS JDBC Service registry troubleI had a interesting time trying to figure out why the <a href="http://www.ja-sig.org/products/cas/">JA-SIG CAS</a> service registry status was being reset when ever I restarted CAS. After much frustration I figured out the problem was in the schema that hibernate has automatically created.<br /><br />I'll explain my setup, I was using MySQL for storing the service registry data via <a href="http://www.springframework.org/">Spring</a> entity manager and <a href="http://www.hibernate.org/">Hibernate</a>.<br /><br />Hibernate was creating <code>BIT(1)</code> for boolean atributes instead of <code>TINYINT(1)</code>. Because of this MySQL was not returning anything meaningful for the status. I have now changed the schema, and removed/commented the propery <code>hibernate.hbm2ddl.auto</code> in the enitity manager bean. It seem to work perfectly.<br /><br />Hope someone in a similar situation will find this information useful.i<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-6294897189780160917?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-84530553945513724512008-02-19T23:46:00.003+05:302008-02-19T23:56:02.770+05:30CAS Server 3.2 Final releasedToday, the CAS development team announced the CAS Server 3.2 release. The release includes a number of enhancements, bug fixes, and new features. This includes updated dependencies (Spring 2.5.1, Log4j, Acegi Security, Spring LDAP, Spring Web Flow) as well as bug fixes in the SPNEGO module and Services Management tool. It also includes enhancements to enable/disable single sign out at the server level.<br /><br />Finally, it includes a new Hard Timeout Expiration Policy, an updated Spring Configuration mechanism (and modularized Spring configuration files) as well as a utilizing a production-ready auditing/statistics tool/API (Inspektr).<br /><br />You can download the release from the usual location: <a href="http://www.jasig.org/products/cas/downloads/" target="_blank">http://www.jasig.org/products<wbr>/cas/downloads/</a><br /><br />This is a major release and you should take a look at the major new features (the updated Spring Configuration mechanism and the Inspektr auditing tool) and see how/if it changes your deployment.<br /><br />Great work Scott Battaglia and the others who contributed.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-8453055394551372451?l=blog.mohanjith.net'/></div>Mohanjithhttp://www.blogger.com/profile/00420972534166159294noreply@blogger.com0tag:blogger.com,1999:blog-634726058549034930.post-73559838832881188232008-02-17T23:51:00.004+05:302008-02-18T00:40:54.138+05:30Duplicity chokes on OSError: [Errno 24] Too many open filesIt was little bit too scary. Duplicity backup scripts were failing on the EC2 instances again, this time around it was not about not able to reach S3, but having too many files open. That was weird because it didn't give such a error in the past. However the work around was to increase the maximum number of file descripters allowed for the user that was running the backup script.<br /><br />How ever finding this solution was tought, actually it was a FreeBSD forum that had the solution. I though I would just write it down for Linux.<br /><br />Step 1: Find out the current limit<br /><br />To find out the current file descripter limit for a given use, log in as the particular user and run the following command.<pre> $ ulimit -n</pre> By default on Debian it would be 1024.<br /><br />Step 2: Increase the limit<br /><br />You would have to edit /etc/security/limits.conf. You will find details on how to setup different limits in limits.conf itself. The record that you have to put in should look like the following. <pre>username hard nofile 2048</pre> Step 3: Log out and Log back in<br /><br />You would have to log out and log back in as the user that we updated the file descripter limit. Then run the following command. <pre> $ ulimit -n</pre> You should see the updated file descripter limit.<br /><br />Hope this helps someone like me in desperation to get the backups in track. I would be doing more investigation as to why there are so many files open. If I find anything interesting I would definitely blog about it. Also for everyone's reference there is a <a href="https://savannah.nongnu.org/bugs/?21792">bug filed</a> at the <a href="https://savannah.nongnu.org/">Savanah</a> bug tracker by someone else who ran into the same issue<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-7355983883288118823?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com1tag:blogger.com,1999:blog-634726058549034930.post-17978808779035531112008-02-17T22:01:00.005+05:302008-02-17T23:15:29.944+05:30Amazon Web Services goes downAmazon Web Services goes down, takes out some Web 2.0 sites, but not the sites that I was running on EC2. I got a shock when I got a Google alert that had news items about Amazon Web Services are down, I immediately went over to all of the sites I'm responsible for, but all of them were live and kicking. So the next stop was checking my mails, and sure there were mails of the cron job to do the backups failing.<br /><br />I was using duplicity to backup complete file system of the EC2 instances, I have blogged about my approach in <a href="http://blog.mohanjith.net/2008/02/amazon-ec2-with-rock-solid-persistent.html">Amazon EC2 with rock solid persistent storage</a>. I had the cron job failing during the S3 downtime, but I was serving all requests without a hitch.<br /><br />I suspect the sites that went down were using PersistenceFS. Reading there documentation, they assume that S3 is going to be available at all times dispite the 99.99% uptime guarantee. That is a major design flaw. Also it is a utter waste of large storage provided in EC2 during the runtime.<br /><br />I'm glad to say that despite the S3 downtime all my sites were running. I think the sites that went down reconsider their setup. Also I strongly recommend running redundant EC2 instances for any one planning on hosting sites.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634726058549034930-1797880877903553111?l=blog.mohanjith.net'/></div>mohanjithhttp://www.blogger.com/profile/10909364366050649643noreply@blogger.com0