<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech Gossips</title>
	<atom:link href="http://mytechgossips.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mytechgossips.com</link>
	<description>A nerd&#039;s blog</description>
	<lastBuildDate>Mon, 29 Oct 2012 18:03:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Machine Learning in SaaS paradigm</title>
		<link>http://mytechgossips.com/2012/03/12/machine-learning-in-saas-paradigm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=machine-learning-in-saas-paradigm</link>
		<comments>http://mytechgossips.com/2012/03/12/machine-learning-in-saas-paradigm/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 19:00:36 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[machine learning]]></category>
		<category><![CDATA[saas]]></category>

		<guid isPermaLink="false">http://mytechgossips.com/?p=388</guid>
		<description><![CDATA[Our ultimate objective is to make programs that learn from their experience as effectively as humans do. We shall…say that a program has common sense if it automatically deduces for itself a sufficient wide class of immediate consequences of anything it is told and what it already knows. John Mccarthy, &#8220;Programs with Common Sense&#8221;, 1958 [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>Our ultimate objective is to make programs that learn from their experience as effectively as humans do. We shall…say that a program has common sense if it automatically deduces for itself a sufficient wide class of immediate consequences of anything it is told and what it already knows.</p>
<div align="right">John Mccarthy, &#8220;Programs with Common Sense&#8221;, 1958</div>
</blockquote>
<p>Machine learning has been and still is a large part of research area in academic circles. But in last decade or so it has made heavy in roads to the practical world of tech industry and today it&#8217;s no secret that most of the large players are using numerous machine learning techniques to enhance various aspects of their workflows. In this post I&#8217;m hoping to look at few ways how a SaaS application (presumably run by a startup) can use machine learning to enhance its overall experience.</p>
<p><strong>Personalise user experience</strong></p>
<p>In your experience of using SaaS products, how many times you may have found that your favourite item is at the bottom of the list and you have to scroll half a mile or navigate through several layers of menus ? Usability usually favours the majority and you may discover the bitterness of being stuck in minority.</p>
<p>If you go into the same coffee shop every morning and buy the same drink, if they are any good at their business then they should know your preferences after few days and you don&#8217;t have to go through the ordering routine everyday.  It may be just that the shop owner confirms &#8220;Same as usual ? &#8221; and that&#8217;s it.  So if your app is bit more intelligent (good at its business), it could do the same and not irritate users by dropping their most used features to the bottom of the page and having them crawl over the page every time they use your app. However to be on safe side, just as in the case of coffee shop owner&#8217;s confirmation you may need to give an extra setting option to the user confirming whether it&#8217;s preferable for the app to learn user behaviours and adapt.</p>
<p><strong>Reduce your support requests</strong></p>
<p>Say you have a hot product in your hands and it&#8217;s getting more and more traction. If you have experienced this situation, one thing that you won&#8217;t miss is the number of support requests that&#8217;s sky-rocketing in parallel to the hotness of your product. Given that startups have limited man power, there&#8217;s no need to emphasise the importance of your team&#8217;s man hours and whether to spend them answering easily avoidable support issues or somewhere more useful fixing bugs and adding new features. The school book remedy in this situation would be to evaluate the usability of your app which certainly is a good option but it doesn&#8217;t hurt to make your app bit more intelligent to identify obvious pitfalls.</p>
<p>In your neighbourhood if you notice someone is wondering back and forth looking up and down wouldn&#8217;t you assume he is lost and offer your help ? Taking a leaf out of this situation your app can do the same and be kind enough to identify a stranger wondering throughout your app and offer him help. Not only will you be saving your team&#8217;s man hours but you will be saving user&#8217;s precious time and as an added bonus impress the user even more so on your product.</p>
<p><strong>Make search intelligent<br />
</strong></p>
<p>Search is a window to your application data and improving the quality of search will directly influence the user experience.  Rather than making the user guess under what keywords his target content is indexed under, what if your application is good at identifying user intent behind the search ? That would certainly be the icing on top of your search functionality. To make it even better, mix some fuzzy-ness  to auto correct a search term when there&#8217;s an obvious error. Of course all this is easier said than done and every company is not a Google. But you can take an initiative by analysing search terms to identify week spots, start addressing them first and moving forward as a minor experimental optimisation process.</p>
<p>On another note, a good application wide search will greatly help answer most questions your users may have. From experience most of the support questions are recurring in nature so if users can easily find answers from your community forum or support articles, it will help lighten your support inbox.</p>
<p><strong>Finding more details about users</strong></p>
<p>Well, this is more of a grey area. Gossiping on other&#8217;s juicy dirty secrets is usually frowned upon, but a little awareness of what&#8217;s going on around you could be useful and even healthy. Most of large companies are <a title="How Companies Learn Your Secrets" href="http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html" rel="nofollow" target="_blank">already digging up your day-to-day buying patterns</a> to better target you but  the amount of how deep you dig into user information (or abstain from it) is certainly up to you. One way to look at this would be how you treat advertisements &#8211; as long as they are relevant and useful in achieving your goal you won&#8217;t mind it.  But the second it falls below your requirements and becomes nagging, it will be a nuisance and spamming.  Likewise if you can give users a coupon they can&#8217;t ignore it&#8217;s likely they won&#8217;t mind and you can comfort your conscience by thinking you are doing a service rather than snooping around.</p>
<p><strong>Gauging user reaction to new features</strong></p>
<p>It&#8217;s a normal practise for apps to use a simple voting system to get to know most desired new features of a SaaS app. Usually what happen is that app admins put up a set of features they feel important and users vote on them. But taking this one step further and crowdsourcing, you can know what users really need and same time know more about your users. Of course collaborative filtering is not a new technology and most of the social sites are using it to rate new items and know preferences of new users back and forth. So even though you are not running a social network, you can still use it to get to know attributes of your user base such as technical savviness, seeking automation. etc.</p>
<p><strong>Conclusion</strong></p>
<p>This only sums up some of the more obvious situations where machine learning techniques can play a part in improve a SaaS application. It certainly is an exciting field in which I&#8217;m trying to get a grasp on as a passive interest and hoping to carry out experiments to learn the applicability of various theories. It would be exciting to hear more ideas and how well they have worked so please feel free to share them here.</p>
<p>Some pointers to get started/keep an eye on:</p>
<ul>
<li>Good place to have some quick practical experience - <a title="Stanford online ML course" href="http://www.ml-class.org/course/auth/welcome" rel="nofollow">Stanford online ML course</a> by <a title="Andrew Ng" href="http://www.cs.stanford.edu/people/ang/" rel="nofollow">Prof. Andre Ng</a></li>
<li><a title="CMU Machine Learning course" href="http://www.cs.cmu.edu/~tom/10701_sp11/lectures.shtml" rel="nofollow">CMU Machine Learning course</a> by <a title="Tom Mitchell" href="http://www.cs.cmu.edu/~tom/" rel="nofollow">Prof. Tom Mitchell</a></li>
<li><a title="PGM" href="https://www.coursera.org/pgm/class/index" rel="nofollow" target="_blank">Probabilistic Graphical Models</a> by <a title="Prof. Daphne Koller" href="http://ai.stanford.edu/~koller/" rel="nofollow" target="_blank">Prof. Daphne Koller</a></li>
<li>Lots of theories by Prof. Andre Ng &#8211; <a title="CS229" href="http://see.stanford.edu/see/lecturelist.aspx?coll=348ca38a-3a6d-4052-937d-cb017338d7b1" rel="nofollow">Stanford CS229</a></li>
<li><a title="MLSS" href="http://www.mlss.cc/" rel="nofollow">MLSS</a> resources &#8211; <a title="MLSS 2008 Kioloa" href="http://videolectures.net/mlss08au_kioloa/" rel="nofollow">2008</a>, <a title="2009 MLSS Cambridge" href="http://videolectures.net/mlss09uk_cambridge/" rel="nofollow">2009</a>, <a title="MLSS 2010 Canberra" href="http://videolectures.net/mlss2010au_canberra/" rel="nofollow">2010</a>, <a title="PURDUE Machine Learning Summer School 2011" href="http://www.youtube.com/playlist?list=PL2A65507F7D725EFB&amp;feature=view_all" rel="nofollow">2011</a>.</li>
<li>MIT ML <a title="MIT Machine Learning" href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-867-machine-learning-fall-2006/lecture-notes/" rel="nofollow">lecture notes</a></li>
<li>Various research publications &#8211; <a title="Google research" href="http://research.google.com/pubs/MachineLearning.html" rel="nofollow">Google</a>, <a title="Microsoft Research" href="http://research.microsoft.com/apps/dp/pu/publications.aspx" rel="nofollow">Microsoft</a>, <a title="Academia.edu" href="http://www.academia.edu/" rel="nofollow">Academia </a></li>
<li>Google <a title="Google Prediction API" href="https://developers.google.com/prediction/docs/hello_world" rel="nofollow">prediction API</a></li>
<li>What&#8217;s happening in the world of big data &#8211; <a title="NoSQL Weekly" href="http://www.nosqlweekly.com/" rel="nofollow" target="_blank">NoSQL weekly</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2012/03/12/machine-learning-in-saas-paradigm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fixing holes in EC2 reliability</title>
		<link>http://mytechgossips.com/2011/12/24/fixing-holes-in-ec2-reliability/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fixing-holes-in-ec2-reliability</link>
		<comments>http://mytechgossips.com/2011/12/24/fixing-holes-in-ec2-reliability/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 02:43:21 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://mytechgossips.com/?p=394</guid>
		<description><![CDATA[We are in the era of clouds, and at the moment AWS is the Zeus among public clouds. With its scalable and flexible architecture, cheap rates, secure PCI compliant environment, wide array of loosely coupled services and boasting of 99.95% availability, they may deserve the crown. However they are not without holes and few days ago I [...]]]></description>
				<content:encoded><![CDATA[<p>We are in the era of clouds, and at the moment AWS is the Zeus among public clouds. With its scalable and flexible architecture, cheap rates, <a title="PCI DSS Level 1 Compliance" href="http://aws.amazon.com/security/pci-dss-level-1-compliance-faqs/" target="_blank">secure PCI compliant environment</a>, wide array of <a title="AWS Products &amp; Services" href="http://aws.amazon.com/products/" target="_blank">loosely coupled services</a> and boasting of <a title="AWS Highlights" href="http://aws.amazon.com/ec2/#highlights" target="_blank">99.95% availability</a>, they may deserve the crown. However they are not without holes and few days ago I got the chance to taste it firsthand. This post is about few measures that you should (and I mean this with capital SHOULD) take before moving your production servers to AWS.</p>
<p>To start with, I had been using <a class="zem_slink" title="Slicehost" href="http://www.slicehost.com/" rel="homepage">Slicehost</a> and <a title="Linode" href="http://www.linode.com/" target="_blank">Linode</a> as VPS providers for couple of years while tinkering with AWS. After a trial run of few months I was satisfied that everything is working as it should be and moved to AWS for real. But the mistake I&#8217;ve done and AWS didn&#8217;t bother to mention anywhere easily findable is to couple Elastic Block Storage (ESB) with all instance stores. And this is something easy to overlook when you are coming from a regular VPS provider because <em>ephemeral</em> Instance store is the most counterpart similar device to a <em>slice</em> and you may expect the same behaviour throughout.</p>
<p>So back to the story, everything was running fine until AWS had scheduled a maintenance rebooting of the instance two weeks ago. Nothing much to worry right ? But it turns out that the instance didn&#8217;t reboot and there was very little possible to do from the AWS web console. Unlike in regular VPS slices, AWS doesn&#8217;t come with a back-door SSH console and it turns out even the staff can do pretty much little regarding an instance store. The only solution they could give me was to reboot the instance few times and if it doesn&#8217;t work out&#8230;well, they are sorry and it&#8217;s a lost cause.</p>
<p>I earlier mentioned the mistake I&#8217;ve made. But what I got right was to have several layers of backups including database replication slaves. So backups were running pretty much as expected and there wasn&#8217;t any lasting damage done.  And only when you are in trouble that you are glad of the time well spent on emergency procedures.</p>
<p>So rest of the story is very little. I removed the crashed instance, restarted a new one from the custom AMI we had and copied data over from DB slaves. But this scenario could have gone vastly wrong if there wasn&#8217;t a redundancy setup and for some unfortunate bootstrapping startup it could have reduced all their hard work to crisp.</p>
<p>I know servers should be up running and having them down is not heroic. But there are few points you should have in place before moving your production servers to AWS.</p>
<ol>
<li>Have a proper backup procedure in place. Better if replication slaves are in some other server vendor or in another AWS region and have a monitor setup to make sure replication process is working properly. Also it&#8217;s better to have <a title="Replication &amp; backups with Ruby" href="http://mytechgossips.com/2011/09/18/replication-backups-with-ruby/" target="_blank">several layers of backups</a> running so you will have point-in-time recoverable database copy as well as one day old, week old, month old.etc data copies in worst to worst case scenarios.</li>
<li>Use Elastic Block Storage (EBS) &#8211; They are the external USB drives of AWS. Couple one or more EBS with your instance store  and use them to store any data you think is valuable. If your instance die, you can just decouple the block and reattach to another fresh instance and run without a hitch.</li>
<li>Have a custom bare-bone AMI with just the OS and may be couple of basic services. Also have an AMI with fully ready-to-launch setup. This way you can make another production ready instance in minimal time as well as have an option in a worst case scenario where the full ready made AMI doesn&#8217;t work. Finally, test all your AMIs to make sure that they are working properly.</li>
<li>Have snapshots from your EBS devices in scheduled intervals.</li>
<li>Use these not so easy to find <a title="AWS Architecture Center" href="http://aws.amazon.com/architecture/" target="_blank">AWS architectural guidelines</a> in designing your platform.</li>
</ol>
<p>So as I mentioned it&#8217;s not about heroics, but making sure your service not getting reduced to ashes because of some stupid server glitch. As someone wise had noted, better be ready than sorry!</p>
<p><strong>Update:</strong></p>
<p>There is another set of sound suggestions made in <a title="Comment 4" href="http://mytechgossips.com/2011/12/24/fixing-holes-in-ec2-reliability/#comment-14012">comment #4</a> by <cite>kordless<em></em></cite> for any cloud deployment. If you are into heavy scaling they may be particularly useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2011/12/24/fixing-holes-in-ec2-reliability/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Steve Jobs effect</title>
		<link>http://mytechgossips.com/2011/10/07/steve-jobs-effect/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=steve-jobs-effect</link>
		<comments>http://mytechgossips.com/2011/10/07/steve-jobs-effect/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 21:26:56 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[inspiration]]></category>

		<guid isPermaLink="false">http://mytechgossips.com/?p=364</guid>
		<description><![CDATA[As the whole world is mourning the passing of one of the giants in this era who has contributed to shape the tech world to where it is now, felt like I should jot down my two cents of the man in my diary. Even though he is best known for his creativity, vision and [...]]]></description>
				<content:encoded><![CDATA[<p>As the whole world is mourning the passing of one of the giants in this era who has contributed to shape the tech world to where it is now, felt like I should jot down my two cents of the man in my diary.</p>
<p>Even though he is best known for his creativity, vision and entrepreneurship, in my opinion they are secondary to the wave he truly brought. It is the sense of hope and inspiration to the world.</p>
<p>Society is hierarchical in nature. Usually higher levels have more power and leeway at choosing their own destiny while like or not middle and lower have fewer chances. Steve Jobs&#8217; life story is a fairy tale of my era which stands as a testimony to say that even the most humble man can change the world in outpouring proportions. This in my opinion might be the best thing that can happen to a society and I believe the modern American tech hub benefited most out of it. Generally people make idols out of people with power which usually means politicians whom even the best represent egotism rather than the talent. However, Steve Jobs represented the success based on skill and hard work which made him a better role model and an inspiration to the world.</p>
<p>How many might have inspired from the life of Steve Jobs directly or indirectly? I can attest that I&#8217;m one, and <a title="Simple, beautiful, worldwide. Come take a look at the new web" href="http://vesess.com/" target="_blank">Vesess</a> for another. As a successful startup it&#8217;s not uncommon we come across one of his famous quotes or quirk in his latest product in our usual day-to-day chit chat. So if a team in the other side of the world resonated with his life story, it&#8217;s a testimony to his influence.</p>
<p>This kind of influence doesn&#8217;t just come with skills. I&#8217;m sure there are more creative designers and more skillful entrepreneurs among the small crowd of 6 billion. However there&#8217;s a sense of destiny and fate in his life story, which is unique and a good study in itself to learn about phases of the life. Even though I earlier mentioned his life story a fairly tale, this isn&#8217;t a typical one where the protagonist is a goody-two-shoe. His life is congested with extreme <a title="Success" href="http://www.apple.com/" target="_blank">successes</a>, <a title="Jobs failures" href="http://www.nationalreview.com/articles/275528/steve-jobs-america-s-greatest-failure-nick-schulz" target="_blank">failures</a>, <a title="Jobs contribution" href="http://www.youtube.com/watch?v=D1R-jKKp3NA" target="_blank">light</a> and <a title="Steve Jobs mistakes" href="http://www.minyanville.com/special-features/articles/lisa-brennan-jobs-business-icons-rich/8/31/2010/id/29768" target="_blank">dark</a> and he was man enough to accept it. This surely made it easier for everyone to approach him without putting him on a pedestal who can do no wrong.</p>
<p>For me, his greatest legacy is his own life story more than any other.</p>
<p>As a closing tribute and a fellow Buddhist, may he attain Nibbana and be out of the cycle of suffering.</p>
<div class="wp-caption aligncenter" style="width: 446px"><a href="http://jmak.tumblr.com/post/9377189056"><img class=" " title="Apple and Jobs" src="http://24.media.tumblr.com/tumblr_lqhr46trpa1qz9917o1_500.png" alt="Apple and Jobs" width="436" height="436" /></a><p class="wp-caption-text">Photo credit: Johnathan Mak</p></div>
<p style="text-align:center;">
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2011/10/07/steve-jobs-effect/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Replication &amp; backups with Ruby</title>
		<link>http://mytechgossips.com/2011/09/18/replication-backups-with-ruby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replication-backups-with-ruby</link>
		<comments>http://mytechgossips.com/2011/09/18/replication-backups-with-ruby/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 15:40:19 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://mytechgossips.com/?p=314</guid>
		<description><![CDATA[If there&#8217;s one thing certain in life, it is the uncertainty. As you go higher up in the ladder of life, the fall grows steeper, risk becomes greater. Same rules apply in the digital world. In the process of building and maintaining software, there are plenty of accidents, ways to screw things, foolish mistakes and [...]]]></description>
				<content:encoded><![CDATA[<p>If there&#8217;s one thing certain in life, it is the uncertainty. As you go higher up in the ladder of life, the fall grows steeper, risk becomes greater. Same rules apply in the digital world.</p>
<p>In the process of building and maintaining software, there are plenty of accidents, ways to screw things, foolish mistakes and enemies to sabotage work. So most would agree it&#8217;s sensible to have some solid backup strategy as your insurance policy in case a disaster strikes your budding app. But when you say backups &amp; redundancy, it sounds really expensive and time consuming, isn&#8217;t it ? Well, Not anymore; with all the cloud services floating around it&#8217;s possible to have a good data backup plan with few additional bucks. So in this post I&#8217;m sharing a general backup approach easily implementable using wonderful Ruby <a title="Backup Gem" href="https://github.com/meskyanichi/backup">Backup Gem</a> that you could use or adopt according to your application needs and risk.</p>
<p>When it comes to data replication and recovery, there are <a title="Data replication techniques" href="http://www.facebook.com/note.php?note_id=10150098033318920">various aspects</a> you might need to look into depending on the nature/scale/risk of your data. The method suggested here assumes there are 2 servers for the master and slave where you can setup data replication with MySQL. Also this approach was largely inspired by the strategy adopted by <a href="http://www.marco.org/2010/11/20/instapapers-backup-method">Marco Arment for Instapaper</a>.</p>
<p>Here is an overview of the strategy suggested in this post.</p>
<div id="attachment_339" class="wp-caption aligncenter" style="width: 576px"><a href="http://mytechgossips.com/wp-content/uploads/2011/09/backup-strategy.png"><img class="size-full wp-image-339" title="Backup Overview" src="http://mytechgossips.com/wp-content/uploads/2011/09/backup-strategy.png" alt="Backup Overview" width="566" height="435" /></a><p class="wp-caption-text">Backup Overview</p></div>
<p>1) To achieve point-in-time recovery I&#8217;m using a simple master-slave database setup with MySQL. This is very straightforward and <a title="How To Set Up Database Replication In MySQL" href="http://www.howtoforge.com/mysql_database_replication">Here</a>, <a title="How to Set Up Replication" href="http://dev.mysql.com/doc/refman/4.1/en/replication-howto.html">here</a> are some examples on how to set it up.</p>
<p>2) Install <a href="https://github.com/meskyanichi/backup">Backup Gem</a></p>
<p><code>gem install backup</code> in both master and slave servers.</p>
<p>3) Setup MySQL binary log syncing from master to slave</p>
<p>- Setup Backup config in master (This will create a ~/Backup/config.rb file)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">sudo</span> backup generate <span style="color: #660033;">--databases</span>=<span style="color: #ff0000;">'mysql'</span> <span style="color: #660033;">--storages</span>=<span style="color: #ff0000;">'s3'</span> <span style="color: #660033;">--compressors</span>=<span style="color: #ff0000;">'gzip'</span></pre></td></tr></table></div>

<p>- Additionally create a default config file <a href="https://github.com/buddhika/Backup-scripts/blob/master/master/defaults.rb">defaults.rb</a> (Put mail alert, twitter alert configs here)</p>
<p>- To sync binlogs every 5 mins put this code in <a href="https://github.com/buddhika/Backup-scripts/blob/master/master/config.rb">~/Backup/config.rb</a>. Do usual <a href="http://sshkeychain.sourceforge.net/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html">SSH key copy procedure</a> to avoid password prompting when rsyncing.</p>
<p>- Update crontab to sync MySQL logs every 5 minutes</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">0</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">25</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">35</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">45</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">55</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">-l</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'cd /home/username/Backup /usr/bin/backup perform --trigger sync_logs --config-file
/home/username/Backup/config.rb'</span></pre></td></tr></table></div>

<p>4) In the slave, follow the same process as in the master and setup the backup directory + config.rb. Additionally create a default.rb to store common configurations.</p>
<p>- Create config.rb</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">  backup generate <span style="color: #660033;">--databases</span>=<span style="color: #ff0000;">'mysql'</span> <span style="color: #660033;">--storages</span>=<span style="color: #ff0000;">'s3'</span> <span style="color: #660033;">--compressors</span>=<span style="color: #ff0000;">'gzip'</span></pre></td></tr></table></div>

<p>- Add email, twitter notification settings in <a href="https://github.com/buddhika/Backup-scripts/blob/master/slave/defaults.rb">defaults.rb</a></p>
<p>5) MySQL binlogs will be synced with S3 every half an hour. For this add <a href="https://github.com/buddhika/Backup-scripts/blob/master/slave/half_an_hour.rb">half_an_hour.rb</a> to your &#8216;Backup&#8217; directory (All this can be put in config.rb as well. But for the sake of clarity I&#8217;m separating them based on the frequency).</p>
<p>6) Daily backup a full copy the database to local disk. For this use the <a href="https://github.com/buddhika/Backup-scripts/blob/master/slave/daily.rb">daily.rb</a> script.</p>
<p>7) Weekly store a full copy of database in S3. Use the <a href="https://github.com/buddhika/Backup-scripts/blob/master/slave/weekly.rb">weekly.rb</a> script for this purpose.</p>
<p>8 ) Use Dropbox to store a copy every month. Plus if one of your workplace machine is synced with Dropbox account it will get synced to the local machine automatically and you can burn them to disks.<br />
Use <a href="https://github.com/buddhika/Backup-scripts/blob/master/slave/monthly.rb">monthly.rb</a> for this task.</p>
<p>9) Finally update the crontab in your slave to run your backup scripts according to frequencies you intend.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#sync every 30 minutes</span>
<span style="color: #000000;">0</span>,<span style="color: #000000;">30</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup  <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>backup perform <span style="color: #660033;">--trigger</span> sync_backup <span style="color: #660033;">--config-file</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>half_an_hour.rb
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>cron.log  <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
<span style="color: #666666; font-style: italic;">#backup daily</span>
<span style="color: #000000;">0</span> <span style="color: #000000;">6</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup  <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>backup perform <span style="color: #660033;">--trigger</span> daily_backup <span style="color: #660033;">--config-file</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>daily.rb  <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>cron.log
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
<span style="color: #666666; font-style: italic;">#backup every week</span>
<span style="color: #000000;">0</span> <span style="color: #000000;">6</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">8</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">22</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup  <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>backup perform <span style="color: #660033;">--trigger</span> weekly_backup <span style="color: #660033;">--config-file</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>weekly.rb  <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>cron.log
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
<span style="color: #666666; font-style: italic;">#backup monthly</span>
<span style="color: #000000;">0</span> <span style="color: #000000;">6</span> <span style="color: #000000;">26</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup  <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>backup perform <span style="color: #660033;">--trigger</span> monthly_backup <span style="color: #660033;">--config-file</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>username<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>monthly.rb  <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>cron.log
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>error.log</pre></td></tr></table></div>

<p>So at the end of this process you will have several redundant copies of your database as well as MySQL transactions up to last 5 minutes. In case of an emergency (ie: disastrous SQL query) you could pick up the nearest full backup and apply MySQL binary logs one up till the disaster occurred and you are good to go.</p>
<p>As a last note (not the least) kudos to the team behind <a href="https://github.com/meskyanichi/backup">Backup gem</a>. You guys made my life lot easier!</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2011/09/18/replication-backups-with-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elections &amp; Prosperity</title>
		<link>http://mytechgossips.com/2009/12/24/elections-prosperity/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=elections-prosperity</link>
		<comments>http://mytechgossips.com/2009/12/24/elections-prosperity/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 15:44:20 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[Sri Lanka]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=226</guid>
		<description><![CDATA[Election times are upon us&#8230;. well, not that there weren&#8217;t enough in the past few years, but only that an election which people care at least a dime is nearby and thus some changes to the Sri Lankan social behaviour. Larger than life political faces materialising in every nook and corner of the country. Roads [...]]]></description>
				<content:encoded><![CDATA[<p>Election times are upon us&#8230;. well, not that there weren&#8217;t enough in the past few years, but only that an election which people care at least a dime is nearby and thus some changes to the Sri Lankan social behaviour. </p>
<p>Larger than life political faces materialising in every nook and corner of the country. Roads that were meant to be built in years are built in days. Living cost that was said to be impossible to come down even by godly interventions are coming down like melting butter. Roads that were closed due to terrible security hazards are being opened. Rulers&#8217; godly status has been threatened and thus travelling alongside us &#8211; the mere mortals, in the road. Common mortals whom were lethargic due to the lack of gossip matters have again got something to shout about. Oh, almost forgot about free comedies and the entertainment&#8230;who needs Mr. Bean ? Considering all this, one might say that we should hold elections every month to see some positive developments in the country.</p>
<p>This is what I call the election prosperity. </p>
<p>But with such a polarised and biased grounds, is there any meaning to all this hype ? That&#8217;s another story for another time.</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2009/12/24/elections-prosperity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sri Lanka, a new future ?</title>
		<link>http://mytechgossips.com/2009/05/25/sri-lanka-a-new-future/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sri-lanka-a-new-future</link>
		<comments>http://mytechgossips.com/2009/05/25/sri-lanka-a-new-future/#comments</comments>
		<pubDate>Sun, 24 May 2009 22:12:22 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[Sri Lanka]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=214</guid>
		<description><![CDATA[Last week was a very memorable one for all Sri Lankans, in whatever way you look at it. End of a 30 year old conflict is not something you forget that easily IMO. Younger generation today (me included) hadn&#8217;t seen a day without a war. Each month (some times every week) there were bomb blasts [...]]]></description>
				<content:encoded><![CDATA[<p>Last week was a very memorable one for all Sri Lankans, in whatever way you look at it. End of a 30 year old conflict is not something you forget that easily IMO. Younger generation today (me included) hadn&#8217;t seen a day without a war. Each month (some times every week) there were bomb blasts going on&#8230;people dying here and there&#8230; so it&#8217;s not a great wonder to feel relief after such a devastating conflict.</p>
<p>But I can&#8217;t really enjoy it either.</p>
<p>The cost of ending this brutal war has been massive. The war has brought so much grief to most families in north..family members dead .. closer to 300,000 displaced in camps&#8230;more than 6000 army soldiers have sacrificed their lives (in last 3 years of war alone, according to recent stats)&#8230;most people have lost whatever they had..so it&#8217;s not a party time either.</p>
<p>At most it&#8217;s bitter sweet.</p>
<p>But due to all these sacrifices from Sri Lankans, it has brought a new chance to look at the future in a new light. But it should be remembered specially the tri-forces who had put their life at risk and some who have laid lives, secretary of defence for his unwavering goal to finish the war and president for supporting it. They have done what four Sri Lankan presidents, eight governments, and <a href="http://www.sundaytimes.lk/090524/News/sundaytimesnews_28.html">6 cease-fires</a> could not. No matter whatever blunders the government has done, I don&#8217;t think any one can really blame government for going at active war&#8230;because they have tried everything possible through peace processes to come to a solution. Specially previous government through its MoU and even President Chandrika Bandaranayaka earlier with her willingness to give north to LTTE for 10 years without an election shows the desperation Sri Lanka wanted to have a peaceful solution. It&#8217;s no wonder because with the ongoing war country was basically at a stalemate when it came to the economy and growth. Prabhakaran never gave a compromise (even backing down a notch) from what he wanted and there was a limit the government could promise, which was a federal solution..which he despised. So when one party is not willing for a compromise, it&#8217;s a fact that there&#8217;s a conflict or a war in this case whether you like it or not.</p>
<p>But here we are&#8230;so what should be done ?</p>
<p><strong>To where ?</strong></p>
<p>First and foremost, there are about 300,000 displaced people in the north that are in very hard conditions. Also according to stats, it takes around Rs 3 crore per day and around 1 billion Rs per month to maintain these camps. Without a doubt they have to be resettled back asap and hopefully within 6 months as suggested by the government. But not only resettling them, rest of the country have to provide all the help they can to bring back these destroyed cities and villages to normalcy as much as they can be. Also it&#8217;s required to have a rapid development plan in these areas to bring them to the level of rest of the country.</p>
<p>But the real rock and hard place will be to bring peace through some political solution that&#8217;s acceptable to everyone.</p>
<p><strong>Peace and a new future ? </strong></p>
<p>As many believe Prabhakaran may have been a very skilful military leader&#8230;but that&#8217;s the only thing that can be said about him. If he had an iota of political sense most of this destruction could have been avoided through any of <a href="http://www.sundaytimes.lk/090524/News/sundaytimesnews_28.html">6 peace processes underwent</a>. Then what about all lives he took of intellectuals (specially that of Tamil leaders that didn&#8217;t go well with his ideology, or terror) ? That will take many years to fill that gap.</p>
<p>Through terror he shut down most of powerful moderate Tamil voices and except for a handful all were fearful of raising their voices. Personally, I feel there&#8217;s a lot of resemblance between the character Lord Voldemort of Harry Potter series and Prabhakaran in many ways. Both were <a href="http://www.asianage.com/presentation/leftnavigation/opinion/op-ed/how-a-guerrilla-chief-grew-drunk-on-blood.aspx">megalomaniacs </a>who thought they were like deities and made people even fearful of uttering their names much less voicing different opinions.</p>
<p>So now with the end of the war, the bottleneck is gone and Tamils have the freedom to express their opinions without a hindrance.  Also it&#8217;s government&#8217;s responsibility to let the freedom go to people.</p>
<p>People should use this to send representatives (preferably not idiots like some of those who are now in Parliament) who really care about them. Then use them to bring their grievances to discussion table and resolve it politically and peacefully.</p>
<p>The responsibility of the government is to use this golden opportunity provided by sacrificing thousands of lives by soldiers to bring all parties together (mainly UNP, as they have suggested their agreement to support the government in a political solution to get necessary votes in the parliament) instead of watering its self image (it may be justifiable to a certain extent because this is politics after all, but extreme is always ugly).</p>
<p>Also general public should think in terms of their contribution to the country. If a soldier can put their lives at risk and work 24 * 7 without a holiday, shouldn&#8217;t the rest at least work their 8 hour work load per day dutifully ? What right do we have to talk about soldiers if we can&#8217;t even do that ? <a href="http://colombotoday.com/english/articles/2740.htm">["Even after increasing it from 116,000 to 200,000, a soldier still cannot get seven days leave a month, he pointed out."]</a></p>
<p>So we are at a cross road&#8230;I really hope it leads to somewhere better than past three decades.</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2009/05/25/sri-lanka-a-new-future/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>My best 7 free JS modal boxes</title>
		<link>http://mytechgossips.com/2009/01/28/my-best-7-free-js-model-boxes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-best-7-free-js-model-boxes</link>
		<comments>http://mytechgossips.com/2009/01/28/my-best-7-free-js-model-boxes/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 16:32:21 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[My Activities]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=125</guid>
		<description><![CDATA[I have been working on a new iteration of HOT (follow @hotelotravel for more info) for last few weeks and thought of changing the existing JQuery UI Dialog box for something bit fancy and solid (on other hand I may have just wanted to get a break from usual PHP stuff and to play with [...]]]></description>
				<content:encoded><![CDATA[<p>I have been working on a new iteration of <a href="http://hotelotravel.com">HOT</a> (follow <a href="http://twitter.com/hotelotravel">@hotelotravel</a> for more info) for last few weeks and thought of changing the existing JQuery UI Dialog box for something bit fancy and solid (on other hand I may have just wanted to get a break from usual PHP stuff and to play with JQuery a bit after some time). I did have some popular JS modal box names such as Lightbox, Facebox and Thickbox that I wanted to test and found some few new names on the way.Certainly there will be many more modal boxes out there that I&#8217;ve missed and not to mention my requirement will be different from yours, but here is the gist of each modal box in my opinion of those I&#8217;ve tested so it may help someone to pick the right one at the right moment.</p>
<p><a href="http://docs.jquery.com/UI/Dialog"><strong>JQuery UI Dialog</strong></a></p>
<div id="attachment_173" class="wp-caption aligncenter" style="width: 595px"><a href="http://hotelotravel.com"><img class="size-full wp-image-173" title="hotelotravel-jquery-ui1" src="http://mytechgossips.com/wp-content/uploads/2009/01/hotelotravel-jquery-ui1.jpg" alt="JQUery UI in Hotelotravel" width="585" height="321" /></a><p class="wp-caption-text">JQUery UI in Hotelotravel</p></div>
<p>This is the dialog box that I&#8217;ve used in most cases and of course it&#8217;s great. Few years back when I started working with it I noticed few issues when closing the dialog and such but by now they have all been fixed. Also it&#8217;s continuously maintained by JQuery community so you can be sure it is solid. What I like mostly about it is its simplicity as well as customization power through various callbacks when you need more action (you can define what to do when a drag starts, drag stops, box shows up, box closes. etc) through various option settings.</p>
<p>This is all you have to do to get a simple dialog box if you have a div with the id of &#8220;myDialog&#8221;.</p>
<p><em><strong><code>$("div#myDialog").dialog();</code></strong></em></p>
<p>Another perk of this modal box is its file size, which is quite small (about 10KB and minimized version is about 6KB) and when doing a complex site with numerous  CSS and JS scripts, size of each file becomes crucial to maintain a small load size  to reduce the load time as well as save server bandwidth. Only seemingly downside of this box is that it doesn&#8217;t come with any fancy preloaded stuff (themes, effects, preload-images.etc) but for someone interested (and with a bit of JS and CSS knowledge) can customize them.</p>
<p><strong><a href="http://www.huddletogether.com/projects/lightbox/">LightBox</a></strong></p>
<div id="attachment_168" class="wp-caption aligncenter" style="width: 390px"><a href="http://www.lokeshdhakar.com/projects/lightbox2/"><img class="size-full wp-image-168" title="lightbox-2" src="http://mytechgossips.com/wp-content/uploads/2009/01/lightbox-2.jpg" alt="Light box" width="380" height="321" /></a><p class="wp-caption-text">Light box</p></div>
<p>This is focused mainly on presenting pictures and does a good job at it. If you are interested in creating something like a picture gallery without touching much JS, this could be the ideal JQuery plugin for you. Also it has a relatively low size with a size  around 19KB and packed version is about 6KB. But since I was looking for something more with raw customization power, this wasn&#8217;t the choice for me.</p>
<p><strong><a href="http://famspam.com/facebox">FaceBox</a></strong></p>
<div id="attachment_172" class="wp-caption aligncenter" style="width: 446px"><a href="http://famspam.com/facebox"><img class="size-full wp-image-172" title="facebox-12" src="http://mytechgossips.com/wp-content/uploads/2009/01/facebox-12.jpg" alt="Facebox" width="436" height="372" /></a><p class="wp-caption-text">Facebox</p></div>
<p>Another  popular choice for a  modal boxes and it deserves the name. It has a very small file size and a simple code. It also comes with a default theme and can be a convenient choice for hasty tasks or people <img src='http://mytechgossips.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  But the downside I noticed is that it gives very small customizing power to the user through JQuery code (which is the case with Light box also btw).</p>
<p>It&#8217;s simple to a fault and you just have to name the class name of the link you are going to pop the box as &#8220;facebox&#8221;. It could have had few more options such as to define the basepath of the project as I couldn&#8217;t find a way to define it  for pre-loading images without hacking the code nor a way to give width and height manually or pass callbacks. Also this project seems to have been abandoned for a while now and if you are considering adapting this box for your whole site check it thoroughly.</p>
<p><strong><a href="http://jquery.com/demo/thickbox/">ThickBox</a></strong></p>
<div id="attachment_176" class="wp-caption aligncenter" style="width: 366px"><a href="http://jquery.com/demo/thickbox/"><img class="size-full wp-image-176" title="thickbox-31" src="http://mytechgossips.com/wp-content/uploads/2009/01/thickbox-31.jpg" alt="ThickBox 3.1" width="356" height="298" /></a><p class="wp-caption-text">ThickBox 3.1</p></div>
<p>ThickBox is really a cool JS box. It&#8217;s simplicity and extremely small file size makes it very adorable. This modal box gives some customizing power but still focuses mainly on simplicity and link naming as &#8220;thickbox&#8221; which is its magic word. However as mentioned earlier this has a better customizing power through JS than FaceBox or LightBox so it&#8217;s more flexible. With some hacking you can also give your own callbacks and options as you like.</p>
<p><strong><a href="http://www.huddletogether.com/projects/lightbox/">LightWindow</a></strong></p>
<div id="attachment_179" class="wp-caption aligncenter" style="width: 477px"><a href="http://www.stickmanlabs.com/lightwindow/"><img class="size-full wp-image-179" title="lightwindow-demo" src="http://mytechgossips.com/wp-content/uploads/2009/01/lightwindow-demo.jpg" alt="LightWindow" width="467" height="375" /></a><p class="wp-caption-text">LightWindow</p></div>
<p>This is an all purpose, very fancy looking modal box done using <a href="http://script.aculo.us">script.aculo.us</a> and <a href="http://www.prototypejs.org">prototype</a> libraries. It can host all kind of media  types and even flash clips which is really impressive.  But the obvious downside is its huge file size of about 60KB which is a huge amount when considering this will be just a small part of <a href="http://hotelotravel.com">Hotelotravel.com</a> and for general use it&#8217;s not tolerable IMHO. It is not compressed or packed by default so you can manually minimize it using something like <a href="http://developer.yahoo.com/yui/compressor/">YUI compresser</a> to bring it to somewhere around 30KB but even then it&#8217;s too large for me.  But this is ideal for a site that has tons of ajax stuff and in need of a very customizable modal box with lot of options and callbacks that can be used throughout the site.</p>
<p><strong><a href="http://www.ericmmartin.com/projects/simplemodal/">SimpleModal</a></strong></p>
<div id="attachment_181" class="wp-caption aligncenter" style="width: 433px"><a href="http://www.ericmmartin.com/simplemodal/"><img class="size-full wp-image-181" title="simplemodal-demos" src="http://mytechgossips.com/wp-content/uploads/2009/01/simplemodal-demos.jpg" alt="SimpleModal" width="423" height="297" /></a><p class="wp-caption-text">SimpleModal</p></div>
<p>This is the smallest JQuery modal box I&#8217;ve seen and if you need to customize your modal box to the extreme I&#8217;d suggest this. Downside is that you will have to write a lot to get something done through this modal box but extreme small size complements that.</p>
<p><strong><a href="http://nyromodal.nyrodev.com/">NyroModal</a></strong></p>
<p><strong></strong></p>
<div id="attachment_182" class="wp-caption aligncenter" style="width: 449px"><strong><strong><a href="http://nyromodal.nyrodev.com/"><img class="size-full wp-image-182" title="nyromodal-jquery-plugin" src="http://mytechgossips.com/wp-content/uploads/2009/01/nyromodal-jquery-plugin.jpg" alt="NyroModal" width="439" height="340" /></a></strong></strong><p class="wp-caption-text">NyroModal</p></div>
<p><strong></strong></p>
<p>This is also a very good looking JQuery based modal box with a reasonable file size(about 14KB for packed version) and gives considerable customizing power to the user. Also it comes with a packed theme and all that so you can use it easily without much coding which is a plus. In fact, I had some trouble deciding whether to use this one or JQuery UI for my task but finally settled on using JQuery UI because my familiarity with it and community backing. So I guess in my case JQuery UI is the rightful winner <img src='http://mytechgossips.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
[digg=http://digg.com/programming/Best_7_free_JS_model_boxes]</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2009/01/28/my-best-7-free-js-model-boxes/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Drupal with Dreamweaver</title>
		<link>http://mytechgossips.com/2008/12/15/drupal-with-dreamweaver/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-with-dreamweaver</link>
		<comments>http://mytechgossips.com/2008/12/15/drupal-with-dreamweaver/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 21:18:29 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=143</guid>
		<description><![CDATA[I had to migrate and setup the whole workspace at my old desktop machine last week after the breakdown of my HP notebook. So while setting it up I thought this little piece of trick could help someone who is fond of Dreamweaver and looking for an IDE to code Drupal. As a side note, [...]]]></description>
				<content:encoded><![CDATA[<p>I had to migrate and setup the whole workspace at my old desktop machine last week after the breakdown of my HP notebook. So while setting it up I thought this little piece of trick could help someone who is fond of Dreamweaver and looking for an IDE to code Drupal.</p>
<p>As a side note, one could accuse me of promoting unethical software and in fact I don&#8217;t refute it (even though it is not my intention). I also know there are many great open source editors for coding PHP like <a href="http://www.eclipse.org/pdt/">Eclipse-PDT</a> and even <a href="http://projects.gnome.org/gedit/">Gedit </a>which could be <a href="http://www.micahcarrick.com/09-29-2007/gedit-html-editor.html">transformed to a very helpful IDE</a>. But on other hand I&#8217;m kind of addicted to DW after long years of working with it and if someone who already has DW looking for a way to use it for coding Drupal this could be helpful.</p>
<p>The most frustrating thing when coding Drupal modules or themes with DW is that it doesn&#8217;t recognize it as a PHP script and doesn&#8217;t give any validation or auto completion features like it usually does for  php scripts. To fix this there&#8217;s little configuration to be done.</p>
<p>First find the installed directory of DW (if it&#8217;s Windows it most probably in ~/Program Files or if it&#8217;s Linux+wine it should be in your virtual windows environment) and go to Configuration-&gt;DocumentTypes. There should be a xml file called MMDocumentTypes that holds configurations regarding which language should be used for a given file format.</p>
<p>Find the line that says,<br />
&#8216;&lt;documenttype id=&#8221;PHP_MySQL&#8221; servermodel=&#8221;PHP MySQL&#8221;&#8230;.&#8217;<br />
and depending on weather you are using windows or mac, append &#8216;,module,install,theme,inc&#8217; to existing winfileextension or macfileextension values.</p>
<p>So for windows it should look like this.</p>
<p>&lt;documenttype id=&#8221;PHP_MySQL&#8221; servermodel=&#8221;PHP MySQL&#8221; internaltype=&#8221;Dynamic&#8221; winfileextension=&#8221;php,php3,php4,php5,module,install,theme,inc&#8221; /&gt;</p>
<p>Now restart DW and open your module or theme file. Ta da!..it should now work as a normal php script.</p>
<p>Hope this will be helpful to someone looking for a way to convert Dreamweaver to a more Drupal friendly place.</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2008/12/15/drupal-with-dreamweaver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP + Large files</title>
		<link>http://mytechgossips.com/2008/12/01/php-large-files/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-large-files</link>
		<comments>http://mytechgossips.com/2008/12/01/php-large-files/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 20:11:25 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[My Activities]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=132</guid>
		<description><![CDATA[I was working on the project Hotelotravel for last few months and as usual in many cases it involved working with large database files because when you consider all hotels, locations and images all over the world it means a lot. But if we want to do large file uploads or database updates with PHP [...]]]></description>
				<content:encoded><![CDATA[<p>I was working on the project <a href="http://hotelotravel.com/">Hotelotravel </a>for last few months and as usual in many cases it involved working with large database files because when you consider all hotels, locations and images all over the world it means a lot. But if we want to do large file uploads or database updates with PHP there are few configurations to be done to default settings and I&#8217;m putting this as a note to myself (I&#8217;m always keep forgetting this) as well as to any one who may find this useful like when importing a large backup file through <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a>.</p>
<p>In your php.ini check for these settings and change them as you need.</p>
<ul>
<li>post_max_size (The maximum size of post data you can send in one submission)</li>
<li>upload_max_filesize (Maximum size of file that can be uploaded)</li>
<li>memory_limit (Maximum memory limit that can be allocated for a script execution)</li>
<li>max_execution_time (Maximum time limit for a script execution)</li>
</ul>
<p>As a side note, if you trying to import large files (backups.etc) through phpMyAdmin and it refuses, you may need to edit config.inc.php file and change these settings to 0 which means no limit.</p>
<ul>
<li>$cfg['ExecTimeLimit']</li>
<li>$cfg['MemoryLimit']</li>
</ul>
<p>As a final note, these settings are there for a purpose. So my advice is change them in whatever manner  you want in a development environment but be very careful when setting them in a production environment because an endless execution of a script can cause your servers to waste bandwidth and even crash.  So I guess this is my disclaimer <img src='http://mytechgossips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2008/12/01/php-large-files/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Back to politics</title>
		<link>http://mytechgossips.com/2008/11/12/back-to-politics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=back-to-politics</link>
		<comments>http://mytechgossips.com/2008/11/12/back-to-politics/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 20:32:35 +0000</pubDate>
		<dc:creator>laknath</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[My Activities]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[Barack Obama]]></category>
		<category><![CDATA[US-election]]></category>

		<guid isPermaLink="false">http://luckycala.wordpress.com/?p=116</guid>
		<description><![CDATA[It has been a very long time since I&#8217;ve had any interest in politics whether it&#8217;s local or world. I was damn disappointed and angry with local politics because frankly there&#8217;s no party to support IMHO. There&#8217;s no one with a clear vision, all leaping from one party to other in a blink of an [...]]]></description>
				<content:encoded><![CDATA[<p>It has been a very long time since I&#8217;ve had any interest in politics whether it&#8217;s local or world.</p>
<p>I was damn disappointed and angry with local politics because frankly there&#8217;s no party to support IMHO. There&#8217;s no one with a clear vision, all leaping from one party to other in a blink of an eye just for political or personal gains, democracy has become a joke with some ministers, Police has become just a tool of the government to control the opposition, people looking at television while live crimes being telecast&#8230;so the list goes on.</p>
<p>I was throughly fed up with international politics also mainly because of activities of Bush administration in US. Whether we like or not U.S. always had a say in where the world was heading in recent history and world seemed to be going on the wrong trail with Bush leading the way to the gates of hell. Invading other countries and later saying &#8220;Oops sorry, it was a mistake. Our evidences were<a href="http://www.washingtonpost.com/ac2/wp-dyn/A17707-2003Oct25?language=printer"> bunch of lies</a>&#8220;, hell-bent on trying to <a href="http://www.commondreams.org/views03/1120-01.htm">destroy the environment</a> like it was Bin Laden, <a href="http://socialistworker.org/2006-2/601/601_05_Detainees.shtml">torture camps</a> and secret prisons, possibility of a war with Iran..and this list also goes on.</p>
<p>So it was refreshing to see some new movements in politics and of course I&#8217;m talking about the intense US election that came to an end in last week. I was somewhat intrigued by this Obama guy when I heard about his ideas and his background at the beginning of this year. At that time he was in tough primaries with Sen. Hilary Clinton  who most believed is the de facto for 2008 nominations from Democratic party (of course I&#8217;m talking from what I saw from news), but that seemed the general consensus. So it was a great surprise to see him winning primaries and hearing him talking at Democratic convention in last August accepting the nomination.</p>
<p>But the bump in polling (I usually follow <a href="http://www.gallup.com/poll/107674/Gallup-Daily-Election-2008.aspx">Gallup</a>) that followed after the Democratic convention was soon ended with the Republican convention in the coming week and McCain seemed to be winning. I thought this will be a repetition of 2004 or 2000 where Democratics were ahead in days before the election and losing it at the end. Talking about McCain, he seemed to be a traditional politician, talking to people like children, going after slogans, changing positions all time, doing a rash choice for a running mate and continuing same Bush policies in almost every aspect, saying things like &#8220;bomb, bomb, bomb Iran&#8221;&#8230;which clearly didn&#8217;t give any good feeling about the guy (Btw, I had had enough of hearing the word &#8216;Maverick&#8217; in last few weeks).</p>
<p>On the other hand the position Obama took clearly impressed me. First and foremost his ideology about Iraq war (he opposed it since its beginning), his idea for a more peaceful world, getting away from &#8216;Shoot first ask second&#8221; system, more understanding with Muslim countries&#8230;so IMO he was the better choice for the future of the world.</p>
<p>Also the way he ran his campaign really impressed me and gave a good indication that he can handle tough situations well (with the global economic crisis it certainly won&#8217;t be a walk in the park. Although I don&#8217;t believe Obama nor any other single person will be able to solve this mess). I have never seen a politician using the power of web to such an extreme level to get to the voters like done by Obama&#8217;s campaign.  Since he had been campaigning for nearly 2 years, he had a massive user base around his web site and he used that very effectively for almost everything ranging from organizing community activities, canvasing, fighting smears, carrying his message globally, GOTV campaigns and what not.  Also he had realized the importance of viral marketing and used all popular social networks and micro blogging services like Twitter to their fullest limits. According to recent numbers he had more than 100K followers in <a href="http://twitter.com/BarackObama">Twitter</a> and about a million users in <a href="http://www.facebook.com/barackobama">Facebook</a>.</p>
<p>So finally when election results started coming in last Wednesday morning it seemed all <a href="http://www.pollster.com/">projected Toss-up states</a> like Virginia, Indiana and Florida which he had been leading in polls going the other way around. But within few minutes results of PA came and a bit after that Ohio came and the game was set. Then after some time I watched the historical acceptance speech by U.S. president-elect Barack Obama and it was truly a beautiful sight.</p>
<p>We have been reading about legends of Mahatma Gandhi and  Civil right movements of Martin Luther King, Jr in world history and how it changed the world. To me the last US election could be seen as another changing moment in the history after 100 years later or become just another lost chance. According to <a href="http://en.wikipedia.org/wiki/Arthur_C._Clarke">Arthur C. Clarke</a> (I&#8217;m taking from his 3001-space odyssey) as human civilization evolves there should be less violence because of greater understanding and increased intelligence. I truly hope this new &#8220;Change&#8221; will be a turning point of the world in to a global peaceful environment even though at the moment it&#8217;s looking pretty gloomy.</p>
<p>[youtube=http://www.youtube.com/watch?v=6qiRwCuQmZA]</p>
<p>Btw, I thought of writing how US election can relate to Sri Lankan context also (there are many similarities, differences and a thing or two that we can try to adapt) but it will be insanely long  if it added up to this already elongated post so I&#8217;ll post that later separately.</p>
]]></content:encoded>
			<wfw:commentRss>http://mytechgossips.com/2008/11/12/back-to-politics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
