<?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>Arunrocks &#187; productivity</title> <atom:link href="http://www.arunrocks.com/blog/archives/category/productivity/feed/" rel="self" type="application/rss+xml" /><link>http://www.arunrocks.com/blog</link> <description>Representing Anti-monotonistic Tendencies</description> <lastBuildDate>Sun, 15 Aug 2010 06:25:55 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.8.6</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Emacs tip: Prevent too many buffers in Dired</title><link>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/</link> <comments>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/#comments</comments> <pubDate>Fri, 04 Dec 2009 09:47:26 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[emacs]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=158</guid> <description><![CDATA[This is for the users of the Emacs editorDired mode  is the default way of visiting directories on Emacs. Whenever you open a file using C-x C-f, you would see the current directory. If you chose to press Enter without entering a file name, you would visit the current directory in Dired mode.I don&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>This is for the users of the <a
href="http://en.wikipedia.org/wiki/Emacs">Emacs</a> editor</p><p><a
href="http://www.emacswiki.org/emacs/DiredMode">Dired mode </a> is the default way of visiting directories on Emacs. Whenever you open a file using <code>C-x C-f</code>, you would see the current directory. If you chose to press Enter without entering a file name, you would visit the current directory in Dired mode.</p><p>I don&#8217;t use the Dired mode very much to browse directories. I would rather use Windows explorer or Nautilus. Don&#8217;t get me wrong, I do find Dired extremely useful to locate a file. But for every directory you visit it adds a new buffer. This quickly becomes very unmanageable.</p><p>However, I recently found out that you can make Dired re-use the same buffer if you press <code>a</code> (<code>dired-find-alternate-file</code>) rather than &#8216;Enter&#8217; for visiting a directory in Dired mode. This is can be even used to open a file which results in the last Dired buffer being completely removed (alternatively you can use <code>v</code> or <code>dired-view-file </code> to view a read-only version of the file).</p><p>With this tip, I am finding myself using Emacs more for browsing around my file system.</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2009/12/04/emacs-tip-prevent-too-many-buffers-in-dired/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Top 7 Inexpensive but Indispensible Things</title><link>http://www.arunrocks.com/blog/archives/2009/12/01/top-7-inexpensive-but-indispensible-things/</link> <comments>http://www.arunrocks.com/blog/archives/2009/12/01/top-7-inexpensive-but-indispensible-things/#comments</comments> <pubDate>Tue, 01 Dec 2009 07:10:36 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[gadgets]]></category> <category><![CDATA[productivity]]></category> <category><![CDATA[featured]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=157</guid> <description><![CDATA[I was shifting to a new house in Mangalore recently. I realised that some of the things that I value the most were not the typical big screen home theatre system or a luxurious jacuzzi.Without sounding too cliched, let me say that some of the best things in life are not expensive. Here are some [...]]]></description> <content:encoded><![CDATA[<p>I was shifting to a new house in Mangalore recently. I realised that some of the things that I value the most were not the typical big screen home theatre system or a luxurious jacuzzi.</p><p>Without sounding too cliched, let me say that some of the best things in life are not expensive. Here are some of the best things you can buy for less than Rs. 8K (around $160):</p><h2>Wifi Router</h2><p>This is a blessing for those with frequently off working hours calls or if you have multiple laptops. The convenience of being able to work near the balcony enjoying the quiet scenery and sipping tea is divine.</p><h2>Small Water Heater</h2><p>This is a pet peeve of mine. Hot water is absolutely essential for a bath. Even in summer. Yep. Nothing gives you a better satisfaction that a hot bath after a warm day. And in Mangalore it&#8217;s either raining in buckets or it&#8217;s hot and humid. I would recommend that you go for a 8l one if you want a good tradeoff between heating time and power consumption.</p><h2>Portable Harddisk</h2><p>I am sure most of us have tried using CDs for backing up all those wonderful photos and songs we have. The problem is &#8211; CD are not really great for organising data. It is readonly and once you burn it, there is no way to go back and change it. There are, of course, other problems like limited space
and suceptibility to scratches.</p><p>Harddisk prices have gone down&#8230; a lot. So there is really no excuse for not getting one. There are sub-terrabyte ones at throwaway prices. I recommend the Western Digital&#8217;s handy Passport 500 GB.</p><h2>Ebooks</h2><p>Can anyone guess what&#8217;s the most heaviest thing to transport? Yep, it is undoubtedly books. The weight of a carton of books can exceed that of a TV, Microwave or even a carton full of iron boxes. I think everyone who love books would have had to part with them if they have had to travel a lot. They would have given away most of it to friends or relatives, never to see them back again.</p><p>This is sad. I don&#8217;t like giving away books. Neither do I want to kill my desire to create a personal library. I suggest an eco-friendly compromise &#8211; make a digital library. Do invest in Ebooks and Audio books. I have invested heavily in a collection that I am sure I can use anywhere once ebook readers
become more cheaper. For now, I don&#8217;t mind reading them on my laptop. And yes, my library weighs less than a kilo ;)</p><h2>Gamepad</h2><p>I am a guy who is always tempted to buy game consoles. I have made up my mind a hundred times to buy a playstation or a nintendo, only to find that the latest PC is much better at it. And you know what PCs are always ahead in terms of sheer processing power. Except that they have clumsy input devices. Ever tried to play a racing game with a keyboard? Then you will know what I am talking about.</p><p>This is easily fixable. A <a
href="http://www.arunrocks.com/blog/archives/2008/01/24/gamepad-brings-new-life-to-emulated-games/" title="Full review of a Chinese gamepad available in India">USB gamepad</a> (which looks like a PS2 Gamepad) comes in for less than Rs. 500. It is a great value for money. It has all the 4 way controls, shoulder buttons and 2 joysticks. Plus it has a built-in vibrator (no batteries needed)! I am planning to go for a second one. Now you can safely give your PC to your 5-year old cousin to play Mario Kart without fearing that he with smash your keyboard to bits shouting &#8216;Maaario&#8217;:)</p><h2>Decent Mattress</h2><p>Some one rightly said that we spend one-thirds of our life on a mattress. So why not in a really good one? There are cots in the market all the way from Rs 200 to branded mattresses worth several tens of thousands. Go for a really good branded mattress. It might cost a couple of grand, but you will not lose sleep over it ;)</p><h2>Portable Home-kit</h2><p>A briefcase sized kit that contains a small drill, spanners, measuring tape, pipe wrench, screwdriver set etc costs less that Rs. 2000 these days. I think it is well worth the price.</p><hr
/><p>Those were, in my opinion, the best little things that don&#8217;t cost you a fortune. What are the ones you feel give you great value for money? Do add in your comments.</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2009/12/01/top-7-inexpensive-but-indispensible-things/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Don&#8217;t Worry About Zipping Office 2007 Documents</title><link>http://www.arunrocks.com/blog/archives/2009/05/12/dont-worry-about-zipping-office-2007-documents/</link> <comments>http://www.arunrocks.com/blog/archives/2009/05/12/dont-worry-about-zipping-office-2007-documents/#comments</comments> <pubDate>Tue, 12 May 2009 08:04:44 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[office]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=147</guid> <description><![CDATA[Old habits die hard. Whenever we have to send huge attachments; the wise ones used to say &#8216;Don&#8217;t clog their mailbox, zip it and send it&#8217;. Everyone religiously used to follow the rule and every word document, presentation or excel sheet was zipped before sending. The zipped file would be a good 40% smaller. The [...]]]></description> <content:encoded><![CDATA[<p>Old habits die hard. Whenever we have to send huge attachments; the wise ones used to say &#8216;Don&#8217;t clog their mailbox, zip it and send it&#8217;. Everyone religiously used to follow the rule and every word document, presentation or excel sheet was zipped before sending. The zipped file would be a good 40% smaller. The mails would reach faster and everyone would be happy in the process.</p><p>Fast forward to 2009, most people now use Office 2007. The new Office is vastly more &#8230;.well&#8230;new and the preferred file formats all have changed. There is a x at the end of the all filenames so we have .docx, .pptx and .xlsx floating all over the place (how do you pronounce these anyways?!). The documents are still religiously sent as zipped files. Except there is no 40% reduction. Actually it isn&#8217;t even 10%. Why?</p><p>Because you cannot zip a file that&#8217;s already zipped. Yep&#8230;. <a
href="http://office.microsoft.com/en-us/help/HA100069351033.aspx">all the new office documents are already zipped anyways</a>. You can even open them using Winzip by simply renaming their extensions to .zip.</p><p>So folks, next time you mail someone, don&#8217;t bother to zip it. There is only the added annoyance of the recipient having to unzip before opening the file.</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2009/05/12/dont-worry-about-zipping-office-2007-documents/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Forget Pages with Autopagerize</title><link>http://www.arunrocks.com/blog/archives/2008/11/17/forget-pages-with-autopagerize/</link> <comments>http://www.arunrocks.com/blog/archives/2008/11/17/forget-pages-with-autopagerize/#comments</comments> <pubDate>Sun, 16 Nov 2008 18:49:57 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Technical]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[greasemonkey]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=136</guid> <description><![CDATA[Reddit had a heated debate about the AJAX paging pattern. The debate sidetracked into the benefits of Paging. Nobody seemed to mention the excellent greasemonkey script Autopagerize which is proof that the concept works brilliantly. I find it one of the most indispensable Greasemonkey scripts available today.The idea is simple. Assume you are reading a [...]]]></description> <content:encoded><![CDATA[<p>Reddit had a heated debate about the <a
href="http://looksgoodworkswell.blogspot.com/2005/06/death-to-paging-rico-livegrid-released.html">AJAX paging pattern</a>. The debate sidetracked into the benefits of Paging. Nobody seemed to mention the excellent greasemonkey script <a
href="http://userscripts.org/scripts/show/8551">Autopagerize</a> which is proof that the concept works brilliantly. I find it one of the most indispensable Greasemonkey scripts available today.</p><p>The idea is simple. Assume you are reading a blog in blogspot.com. When you scroll towards the end of the blog, Autopagerize realizes that you are really interested in reading more blog posts. In other words, soon you would click on &#8216;Older Entries&#8217; links. This would have caused a fresh page to load. How terribly annoying! Instead, Autopagerize will silently load the older posts in the background and seamlessly add them to the end of the page. By the time you finish reading the second page, the third page will be added to the end and so on and so forth. This results in a smooth and breezy browsing experience, which has to be experienced to be believed.</p><h3>Installing Autopagerize</h3><p><a
href="http://userscripts.org/scripts/show/8551">Autopagerize</a> uses greasemonkey plugin and hence works only if you have Firefox installed. The steps are quite simple:</p><ol><li>Install <a
href="https://addons.mozilla.org/en-US/firefox/addon/748">Greasemonkey</a></li><li>Go to <a
href="http://userscripts.org/scripts/show/8551">Autopagerize script</a> page and click on &#8216;Install this Script&#8217; button</li><li>Visit any of the supported sites e.g. <a
href="http://stackoverflow.com/questions/tagged/python">stackoverflow.com</a> or a blog like <a
href="http://userscripts.org/scripts/show/8551">simblog</a></li><li>If the page supports Autopagerize, a green square will appear at the top right of the page. Scroll to the end and it will momentarily turn blue to indicate that the next page is loading in the background.</li></ol><p><img
src="/blog/wp-content/photos/autopager/00-autopagerize.png" alt="Autopagerize in action" /></p><h3>How does Autopagerize work?</h3><p>Autopagerize works on all kinds of sites which have pages. But how does it manage to understand the structure of them all? The answer is the community maintained SITEINFO database which is the result of hundreds of hours of effort.</p><p>Autopagerize is turned on for a particular site if its URL matches the <strong>url</strong> property. Once the page is loaded, it searches for the next link based on the xpath provided by <strong>nextLink</strong> property. The next page&#8217;s content is identified by the <strong>pageElement</strong> property. Anything which is not part of this content is discarded. This content is then appended to the existing page either by appending as a sibling to the existing <strong>pageElement</strong> or if <strong>insertBefore</strong> is defined, it is inserted before the element identified by <strong>insertBefore</strong> property.</p><h3>How to Add any Website to Autopagerize?</h3><p><em>Note: This is not for the faint of heart. It involves opening and working with some code (to the extend of editing some regular expressions).</em></p><p>So you would like extend the Autopagerize experience to more and more sites? Don&#8217;t worry, you have come to the right place. For this section you would need to install the excellent Firebug plugin. Firebug&#8217;s javascript console is the best interactive XPath debugger I am aware of.</p><p><span
id="more-136"></span></p><p>First, ensure that Firebug console is activated for your site. Visit the page you would like to Autopagerize say <a
href="http://www.adobetutorialz.com/articles/2751/1/Professional-Web-Layout-for-Business-Solutions">http://www.adobetutorialz.com/articles/2751/1/Professional-Web-Layout-for-Business-Solutions</a>. Click on the firebug icon and enable the Console by checking the first check box (as shown in the figure). Click on Enable. Now the page gets refreshed and the Console appears.</p><p><img
src="/blog/wp-content/photos/autopager/01-firebug-console.png" alt="Firebug Console" /></p><p>Next, go to the Firefox menu item: Tools -> Greasemonkey -> Manage User Scripts. Select Autopagerize from the list and click on Edit button below.</p><p><img
src="/blog/wp-content/photos/autopager/02-greasemonkey-dialog.png" alt="Greasemonkey Option" /></p><p>Turn on debugging by changing line 26 (could be different for you) to <code>var DEBUG = 1</code>. However I could make debugging work only after adding the following 3 lines further down, say after line 85.</p><pre><code>if(unsafeWindow.console){
   var GM_log = unsafeWindow.console.log;
}
</code></pre><p>Scroll to the line that starts with <code>var SITEINFO = [</code>, which is around line 40. Copy and uncomment the 6 lines of sample code provided by the author as shown in the figure.</p><p><img
src="/blog/wp-content/photos/autopager/03-emacs-screen.png" alt="Editing code in Emacs" /></p><p>Now, give the appropriate XPATH values to the property variables "pageElement" and "nextLink". The "url" variable is a simple regular expression and an example link for the fourth variable (this variable is purely for documentation). Save this file and refresh your page. If the XPATH values are correctly found the Autopagerize green square icon will appear on the page, else there will be some error on your Firebug console like:</p><pre><code>nextLink not found
</code></pre><h3>Debugging Autopagerize or Shit, Nothing Happens!</h3><p>As you might have guessed, the last step I mentioned earlier is not so easy. This is where Firebug can help you. Before you start read some <a
href="http://www.w3schools.com/Xpath/">XPATH tutorials</a> on the net to familiarize yourself with the XPATH syntax.</p><p>One killer feature in Firebug is selecting any element of a page and copying the XPath value of that element. On the Firebug window click on Firebug's Inspect button and mousing over the page to outline that page element (see fig).</p><p><img
src="/blog/wp-content/photos/autopager/04-inspect.png" alt="Firebug Inspect" /></p><p>Click on the page element you are interested in and the details of the element appear on the firebug window. Right clicking on any item in the breadcrumb at the very top, you will see a Copy XPath option (see fig).</p><p><img
src="/blog/wp-content/photos/autopager/05-copy-xpath.png" alt="Copying XPATH" /></p><p>Now go to the console tab of Firebug and test the XPath by using the $x function. Paste the XPath as an argument to this function and you should get an HTMLElement as the result (see fig).</p><p><img
src="/blog/wp-content/photos/autopager/06-firebug.png" alt="Paste to Console" /></p><p>You will need to find variables: "pageElement" and "nextLink" this way. This is not an exact science and involves a lot of trial and error. Here are some tips I found after several hours of testing:</p><ol><li><strong>Escaping</strong> - You will need to add a backslash '\' before each special character like '/' or ". This is not required in the Firebug console, however.</li><li><strong>Single Quotes</strong> - It is best to use single-quotes as the outer-most quotes in the Firebug console</li><li><strong>Firebug gives Absolute Paths</strong> - You will find that Firebug gives XPaths based on the position of a child element, which is likely to break even if the smallest change is made to the page. Try to avoid relying on positions.</li><li><strong>Use attributes</strong> - The best XPaths use the classname property or id property of an element or its parent.</li><li><strong>No Array Results</strong> - The XPath must always return a unique element. If an array of elements are returned, it will not work.</li><li><strong>Watch the Console</strong> - After you enable debugging the console provides useful error messages. This helps in identifying the problem.</li><li><strong>Read Examples</strong> - It is always best to check the huge <a
href="http://wedata.net/databases/AutoPagerize/items.json">SITEINFO database</a> to understand how other users have tackled similar or tricky sites.</li></ol><p>For the site we were using as an example, the following code should work:</p><pre><code>{
  pageElement: "\/\/table[contains(@class,\"ViewArticlePanel\")]",
  url: "^http:\/\/www\\.adobetutorialz\\.com\/articles",
  nextLink: "\/\/div[@class=\"ArticleNavigation\"]\/a[contains(text(),\"Next »\")]",
  exampleUrl: "http://www.adobetutorialz.com/articles/2751/1/Professional-Web-Layout-for-Business-Solutions"
},
</code></pre><p>Hope this gives you enough information on Autopagerize and improves your browsing experience!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/11/17/forget-pages-with-autopagerize/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Reading Hindu Online Made Better with Greasemonkey</title><link>http://www.arunrocks.com/blog/archives/2008/07/19/reading-hindu-online-made-better-with-greasemonkey/</link> <comments>http://www.arunrocks.com/blog/archives/2008/07/19/reading-hindu-online-made-better-with-greasemonkey/#comments</comments> <pubDate>Sat, 19 Jul 2008 11:18:30 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[greasemonkey]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/?p=131</guid> <description><![CDATA[Note this currently works only if you have Firefox installedThe Hindu is is one of the newspapers I have great respect for. I am allergetic to fresh newsprint, so I have no choice but to read their online edition even if I have subscribed to the print edition. But their website badly needs a redesign. [...]]]></description> <content:encoded><![CDATA[<p><strong>Note this currently works only if you have Firefox installed</strong></p><p><a
href="http://www.thehindu.com/">The Hindu</a> is is one of the newspapers I have great respect for. I am allergetic to fresh newsprint, so I have no choice but to read their online edition even if I have subscribed to the print edition. But their website badly needs a redesign. However, in this Web2.0 era you are not at the mercy of the site admins to do something about it. <em>You</em> can improve your browsing experience in 2 steps:</p><ol><li><p>Point your firefox to the <a
href="https://addons.mozilla.org/en-US/firefox/addon/748">Greasemonkey add-on</a> page and install the add-on. Now restart Firefox before you go to step 2. Don&#8217;t worry all your open tabs will be restored.</p></li><li><p>Go to the <a
href="http://userscripts.org/scripts/show/30273">Hindu Printer Redirect Script</a> and click on the <strong>Install this Script</strong> button</p></li></ol><p>Voila, start browsing Hindu, for example <a
href="http://www.hindu.com/2008/07/19/01hdline.htm">this page</a> and enjoy the difference!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/07/19/reading-hindu-online-made-better-with-greasemonkey/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Happy Organised 2008</title><link>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/</link> <comments>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/#comments</comments> <pubDate>Tue, 08 Jan 2008 06:24:22 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Pocketmod]]></category> <category><![CDATA[emacs]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/</guid> <description><![CDATA[The first New Year after marriage is always special.  It will be a lot quieter (and sober?) than one&#8217;s earlier outings. In Mangalore, most of the discs were either overcrowded (Zero Degrees?) or charging like hell (GoldFinch?). So we decided to go to Palki and have a nice buffet at the rooftop. What we [...]]]></description> <content:encoded><![CDATA[<p>The first New Year after marriage is always special.  It will be a lot quieter (and sober?) than one&#8217;s earlier outings. In Mangalore, most of the discs were either overcrowded (Zero Degrees?) or charging like hell (GoldFinch?). So we decided to go to Palki and have a nice buffet at the rooftop. What we didn&#8217;t know was that it offered an amazingly close view of the fireworks in the surrounding area. It was a great way to start the new year.</p><p><img
src="http://farm1.static.flickr.com/193/472855937_3086ea8513.jpg" alt="Beginnings"></p><p>Speaking of starts, for most of us January 1st is like a reset button. Or at least we wish it is. Here comes an opportunity to cut down on that chocolate addition or make a habit of paying bills on
time. They go by the ominous term &#8216;Resolutions&#8217;. For me, a self described procrastinator, I had to bring to speed my time planning tools to the brand new 2008. In case you are wondering, they are:</p><ul><li><a
href="http://www.pocketmod.com/">Hipster PDA/PocketMod</a></li><li>My customised-till-my-fingers-bled <a
href="http://ntemacs.sourceforge.net/">Emacs 23.0</a></li></ul><p>I printed out my Pocketmod from the website directly. I was using version 2 for the first time and loved the idea of being able to customize the front page with my details. You can have print your name and address printed rather than typing it each time.</p><p><img
src="http://farm1.static.flickr.com/56/134447135_e3cb18933f_m.jpg" alt="Sorry! couldn't get a photo for 2008" class="alignright" /></p><p>I&#8217;ve been reconverted to emacs from <a
href="notepad-plus.sourceforge.net/">Notepad++</a>, after seeing the very useful <a
href="http://orgmode.org/">Org</a> mode. Once again I have spent many, many hours cutomising the my .emacs file. When it comes to emacs the word customising is really misleading, it should be actually called reprogramming ;)</p><p><img
src="http://farm3.static.flickr.com/2064/2177456672_cf1ed8622e_m.jpg" alt="My Current Emacs Screen" class="alignleft" /></p><p>Actually, this time I have added some very neat features like TextMate-like snippet expansion upon pressing TAB, personal menu, windows Postscript printer support (Emacs prepares gorgeous printouts of code). They are very useful and I hope I will be able to blog about them soon. In fact, this post was written in Emacs using a <a
href="http://jblevins.org/projects/markdown-mode/">markdown</a> mode</p><p>So for all my readers out there here is wishing you and happy, prosperous and well-planned New Year!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2008/01/08/happy-organised-2008/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Work Faster in Windows With Launchy and a few Python Scripts</title><link>http://www.arunrocks.com/blog/archives/2007/12/04/work-faster-in-windows-with-launchy-and-a-few-python-scripts/</link> <comments>http://www.arunrocks.com/blog/archives/2007/12/04/work-faster-in-windows-with-launchy-and-a-few-python-scripts/#comments</comments> <pubDate>Tue, 04 Dec 2007 05:39:23 +0000</pubDate> <dc:creator>Arun Bhai</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[launchy]]></category> <category><![CDATA[productivity]]></category><guid
isPermaLink="false">http://www.arunrocks.com/blog/archives/2007/12/04/work-faster-in-windows-with-launchy-and-a-few-python-scripts/</guid> <description><![CDATA[Launchy is a great productivity tool and a cool way to impress your friends. You can launch any application by pressing a hotkey (say Alt+Space) and the first few letters of the application for eg: typing &#8216;gi&#8217; will display the GIMP icon and pressing Enter will launch GIMP. You can download Launchy from its website [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://farm1.static.flickr.com/133/414218839_e89ef7791d_m_d.jpg" width="240" height="160" alt="Eating the Mouse" class="alignright" /></p><p><a
href="http://www.launchy.net/">Launchy</a> is a great productivity tool and a cool way to impress your friends. You can launch any application by pressing a hotkey (say Alt+Space) and the first few letters of the application for eg: typing &#8216;gi&#8217; will display the GIMP icon and pressing Enter will launch GIMP. You can <a
href="http://downloads.sourceforge.net/launchy/LaunchySetup125.exe?modtime=1177060449&amp;big_mirror=0">download Launchy</a> from its website and its <a
href="http://www.launchy.net/LaunchySetup199_1.exe">beta</a> is pretty stable (and gorgeous) on my XP laptop too.</p><p>Using Launchy gets pretty addictive and soon you will hate using the Start menu or even Explorer on Windows for opening applications or files. So I took the red pill and started automating the following things with a little help from Python:</p><ul><li>Launching Intranet applications inside Internet Explorer (even if Firefox is your default browser)</li><li>Bringing minimized or overlapped windows to the foreground</li></ul><h3>Some Necessary Evil</h3><p>Don&#8217;t get me wrong, I hate IE as much as you do. But the fact of life is that many web apps out there &#8220;Work best when viewed in IE&#8221; (TM). Even if you have launchy plugins to launch the web app, if your default browser is Firefox, it might show incorrectly. Here is the solution:</p><ol><li>Install <a
href="http://www.python.org/download/releases/">Python</a> and <a
href="http://sourceforge.net/project/platformdownload.php?group_id=78018">Pywin32</a></li><li>Copy the following script to the Utilities directory (it will be in the path where you installed Launchy) and save it with a <strong>.pyw</strong> extension not a <strong>.py</strong> extension</li></ol><p>Python:</p><pre><code>from win32com.client import Dispatch
ie = Dispatch("InternetExplorer.Application")
ie.Visible = True
ie.Navigate(r"http://intranetapp/home")
</code></pre><p>In the above code replace the URL <strong>http://intranetapp/home</strong> with the URL of your choice.</p><p>Finally, open Launchy, right-click and say &#8216;Rebuild Index&#8217;.</p><h3>No more Alt-Tabbing around</h3><p>If you are like me, you&#8217;ll have a lot of windows open at the same time. I have tried increasing the task bar height and grouping similar windows feature in XP to manage them. But I always wish I could invoke commonly used open applications like my chat window in just a few keystrokes. Launchy doesn&#8217;t index open programs by default, but with some python magic I can show you how to bring some commonly used windows to the foreground:</p><ol><li>As before, install <a
href="http://www.python.org/download/releases/">Python</a> and <a
href="http://sourceforge.net/project/platformdownload.php?group_id=78018">Pywin32</a></li><li>Copy the following script to the Utilities directory (it will be in the path where you installed Launchy) and save it with a <strong>.pyw</strong> extension not a <strong>.py</strong> extension</li></ol><p>Python:</p><pre><code>import sys
from win32gui import GetWindowText, EnumWindows, ShowWindow, SetForegroundWindow
from win32con import SW_RESTORE, SW_SHOW

TITLE_MATCH = "Microsoft Excel - Expenses.xls"

def listWindowsHandles():
    res = []
    def callback(hwnd, arg):
        res.append(hwnd)
    EnumWindows(callback, 0)
    return res

def listWindowsNamesAndHnd():
    return [(hwnd, GetWindowText(hwnd)) for hwnd in listWindowsHandles()]

def unminimizeWindow(a_hwnd):
    ShowWindow(a_hwnd, SW_RESTORE)
    SetForegroundWindow(a_hwnd)

def finder1():
    for hwnd, title in listWindowsNamesAndHnd():
        if TITLE_MATCH in title:
            unminimizeWindow(hwnd)

finder1()
</code></pre><p>In the above code change the string <strong>Microsoft Excel &#8211; Expenses.xls</strong> with the title the window you would like to summon.</p><p>Finally, open Launchy, right-click and say &#8216;Rebuild Index&#8217;.</p><p>This works even if the window was minimized.</p><p>I hope, finally you can throw your mouse away. Ah&#8230; What a bliss!</p> ]]></content:encoded> <wfw:commentRss>http://www.arunrocks.com/blog/archives/2007/12/04/work-faster-in-windows-with-launchy-and-a-few-python-scripts/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 9/12 queries in 0.003 seconds using disk

Served from: zoe.asmallorange.com @ 2010-09-03 03:24:56 -->