<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Inside Out</title>
	<atom:link href="http://arun.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://arun.wordpress.com</link>
	<description>Thinking out of the BoX !!</description>
	<lastBuildDate>Sun, 25 Oct 2009 07:02:29 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='arun.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/aa38e87d7c875af7d5930e89582d5892?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Inside Out</title>
		<link>http://arun.wordpress.com</link>
	</image>
			<item>
		<title>Input hotplugging and usb mouse</title>
		<link>http://arun.wordpress.com/2009/10/25/input-hotplugging-and-usb-mouse/</link>
		<comments>http://arun.wordpress.com/2009/10/25/input-hotplugging-and-usb-mouse/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:30:10 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/?p=221</guid>
		<description><![CDATA[After loosing few matches on FICS on time control, poor me realized that it&#8217;s the mouse which matters when you&#8217;ve 10-20 seconds to mate. So I got myself an usb mouse and we&#8217;ve some new adventure.
Ok, plugged in the usb mouse, checked that lsusb recognizes it. A dmesg suggested only a generic &#8220;low speed&#8221; usb [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=221&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After loosing few matches on <a href="http://freechess.org">FICS</a> on time control, poor me realized that it&#8217;s the mouse which matters when you&#8217;ve 10-20 seconds to mate. So I got myself an usb mouse and we&#8217;ve some new adventure.</p>
<p>Ok, plugged in the usb mouse, checked that <code>lsusb</code> recognizes it. A <code>dmesg</code> suggested only a generic &#8220;low speed&#8221; usb device plug in. I did a <code>X -configure</code> but it didn&#8217;t show up my usb mouse <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Few web pages suggested some cool ways to check if your mouse is recognized:</p>
<ul>
<li>Do a cat /proc/bus/input/devices and look for your mouse. Get mouse model from <code>lsusb</code></li>
<li>If there are multiple mice showing up in /dev/input/* then do a <code>cat /dev/input/mice</code> and try moving your mouse, if it’s recognized you’d see random output on screen</li>
</ul>
<p>None of these worked for me. I gave up on XOrg.conf. Let&#8217;s try upgrading to <a href="http://wiki.archlinux.org/index.php/Xorg_input_hotplugging">Xorg input hotplugging</a> and see if HAL does some magic. So added <em>hal</em> and  <em>dbus</em> to rc.conf, pacman&#8217;ed <em>xf86-input-evdev</em>. Hotplugging <span style="text-decoration:line-through;">totally disregards</span> can replace/compliemt your xorg.conf, all inputs are added at runtime, real hotness! Well still my mouse was not working.</p>
<p>After pulling out hair after hair, finally I figured out the whole story (yep! I still have a few hairs left:)). Although kernel was recognizing my usb device, it couldn&#8217;t know that it was a mouse. Hence there was no device file created for the mouse in /dev/input. The missing link was <strong>usbhid</strong> (<a href="http://www.linux-usb.org/USB-guide/x194.html">USB Human Interaction Device</a>) module. A quick <code>modprobe usbhid</code> and we&#8217;re golden. The clever /me had disabled MOD_AUTOLOAD in rc.conf, and I had listed every module loaded by my system (optimization!).</p>
<p>Anyways hotplugging is super awesome. I enabled scroll on my <a href="http://wiki.archlinux.org/index.php/Touchpad_Synaptics">touchpad</a> this time, configuration is real easy and human readable. E.g. to disable the caps lock key, just add the following option to <em>/etc/hal/fdi/policy/10-keymap.fdi</em>: <code>&lt;merge key="input.xkb.options" type="string"&gt;ctrl:nocaps&lt;/merge&gt;</code>. Thanks to the <a href="http://wiki.archlinux.org/index.php/Xorg_input_hotplugging">arch wiki</a>.</p>
<p><strong>Update:</strong>.xmodmap causes problems with multimedia keys. Evdev is intelligent enough to guess the right names for all key codes, so commenting .xmodmap worked for me. Most of issues are caused because X detects two keyboards (thanks HAL), <em>/var/log/XOrg.0.log</em> is your friend. My current setup doesn&#8217;t use a <em>xorg.conf</em>, everything is detected by HAL, and things work OOB.</p>
<p>Good day!</p>
Posted in Archlinux Tagged: x <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=221&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/10/25/input-hotplugging-and-usb-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Ignore channel join/part messages in irssi</title>
		<link>http://arun.wordpress.com/2009/09/27/ignore-channel-joinpart-messages-in-irssi/</link>
		<comments>http://arun.wordpress.com/2009/09/27/ignore-channel-joinpart-messages-in-irssi/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 17:02:57 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2009/09/27/how-to/</guid>
		<description><![CDATA[Add the following block into ~/.irssi/config:

ignores = (
    {
        level = "JOINS PARTS QUITS";
        channels = ( "#archlinux", "#vim", "#powershell" );
        network  = "FreeNode";
    },
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=217&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Add the following block into <b>~/.irssi/config</b>:<br />
<code><br />
ignores = (<br />
    {<br />
        level = "JOINS PARTS QUITS";<br />
        channels = ( "#archlinux", "#vim", "#powershell" );<br />
        network  = "FreeNode";<br />
    },<br />
    {<br />
        level = "MODES";<br />
        channels = ( "&amp;bitlbee" );<br />
        network  = "BitlBee";<br />
    }<br />
);<br />
</code><br />
This will automatically block the <i>level</i> message types from the channels specified. If you prefer manual way of ignoring messages try <b>/help ignore</b>. On a related note, <b>activity_hide_level</b> is a variable which can be used to disable the notification in act bar for specific message levels. Take a look at <a href="http://macnugget.org/stuff/irssi/config">this</a> nice irssi config file for examples of these.</p>
<p>Here is a list of various message levels for reference (you can find it in <b>/help levels</b>):<br />
<code><br />
 Message levels (or in short, levels) are used almost everywhere. They describe what kind of messages we're dealing with. Here's a list of them all:</p>
<p>     CRAP            - Can be almost anything<br />
     MSGS            - Private messages<br />
     PUBLIC          - Public messages in channel<br />
     NOTICES         - Notices<br />
     SNOTES          - Server notices<br />
     CTCPS           - CTCP messages<br />
     ACTIONS         - Actions (/me) - usually ORed with PUBLIC or MSGS<br />
     JOINS           - Someone joins a channel<br />
     PARTS           - Someone parts a channel<br />
     QUITS           - Someone quits IRC<br />
     KICKS           - Someone gets kicked from channel<br />
     MODES           - Channel mode is changed<br />
     TOPICS          - Channel topic is changed<br />
     WALLOPS         - Wallop is received<br />
     INVITES         - Invite is received<br />
     NICKS           - Someone changes nick<br />
     DCC             - DCC related messages<br />
     DCCMSGS         - DCC chat messages<br />
     CLIENTNOTICE    - Irssi's notices<br />
     CLIENTERROR     - Irssi's error messages<br />
     CLIENTCRAP      - Some other messages from Irssi</p>
<p> And a few special ones that could be included with the levels above:</p>
<p>     HILIGHT         - Text is highlighted<br />
     NOHILIGHT       - Don't check highlighting for this message<br />
     NO_ACT          - Don't trigger channel activity when printing<br />
                       this message<br />
     NEVER           - Never ignore or log this message<br />
</code></p>
Posted in Archlinux, How Tos, Software Tagged: irssi <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=217&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/09/27/ignore-channel-joinpart-messages-in-irssi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging Procmail Recipes</title>
		<link>http://arun.wordpress.com/2009/08/12/debugging-procmail-recipes/</link>
		<comments>http://arun.wordpress.com/2009/08/12/debugging-procmail-recipes/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 07:14:06 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[recipe]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2009/08/12/debugging-procmail-recipes/</guid>
		<description><![CDATA[Three steps to nirvana:

Modify mail fetch frequency in .fetchmailrc to a small value. E.g. In my .fetchmailrc, I forced fetchmail to query server every 30s:
set daemon 30
Set the LOGFILE and LOGABSTRACT variables in .procmailrc. The one liner here is, LOGFILE specified where procmail would log the rules processed and LOGABSTRACT controls the verbosity of information [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=213&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Three steps to nirvana:</p>
<ul>
<li>Modify mail fetch frequency in <i>.fetchmailrc</i> to a small value. E.g. In my .fetchmailrc, I forced fetchmail to query server every 30s:<br />
<code>set daemon 30</code></li>
<li>Set the LOGFILE and LOGABSTRACT variables in <i>.procmailrc</i>. The one liner here is, LOGFILE specified where procmail would log the rules processed and LOGABSTRACT controls the verbosity of information logged. So we modify .procmailrc to:<br />
<code><br />
LOGFILE=$HOME/.logs/procmaillog<br />
LOGABSTRACT=all<br />
</code></li>
<li>Disable the catch-all recipe!</li>
<li>Still stuck, use printfs <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  In recipes, put in some <code>echo "foo" &gt;&gt; ~/mydebug.log</code> to check control flow.</li>
</ul>
<p>BTW, I&#8217;m sure there are better ways to do this, /me had to send around 7-8 test mails to fix an issue! Feel free to share your recipe-debugging-tips.</p>
Posted in Archlinux, How Tos Tagged: debug, mail, procmail, recipe <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=213&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/08/12/debugging-procmail-recipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>A wrapper for osd_cat</title>
		<link>http://arun.wordpress.com/2009/06/22/a-wrapper-for-osd_cat/</link>
		<comments>http://arun.wordpress.com/2009/06/22/a-wrapper-for-osd_cat/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 21:28:11 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[How Tos]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[osd_cat]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2009/06/22/a-wrapper-for-osd_cat/</guid>
		<description><![CDATA[Few months ago, we discussed about a mail notification method for fetchmail/procmail and mutt combo. As you can see in that post, the script we wrote to handle notification was dependent on ratpoison. Well it makes life bit tough for my non-ratpoison X sessions. I thought it would be a good idea to make the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=212&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Few months ago, we discussed about a <a href="http://arun.wordpress.com/2008/12/07/new-mail-notification-with-procmail/">mail notification</a> method for fetchmail/procmail and mutt combo. As you can see in that post, the script we wrote to handle notification was dependent on <code>ratpoison</code>. Well it makes life bit tough for my non-ratpoison X sessions. I thought it would be a good idea to make the script window manager independent. Enter <code>osd.sh</code></p>
<p>The script uses <code>osd_cat</code>. It comes in the XOSD package for most of the unices. It is similar to the <code>cat</code> command for the console. It can read a file, string or the stdin and output the text onto X display. It has a bunch of config options which let you choose font, location etc. for the text. I&#8217;d recommend a RTM (man osd_cat).</p>
<p>Here is the code:<br />
<code><br />
#!/bin/bash<br />
# Displays a string on the screen<br />
# Last Modified: Mon 22 Jun 2009 02:59:55 AM IST</p>
<p># let osd know, we have a X running. there will be problems if this script is<br />
# called from different user. disable acl in X in that case(use xhost +).<br />
export DISPLAY=":0.0"</p>
<p>color="red"<br />
font="-*-dina-medium-r-normal-*-16-*-*-*-*-*-*-*"<br />
age="6"<br />
align="center"<br />
delay="4"<br />
indent="0"<br />
lines="5"<br />
offset="0"<br />
shadow="1"<br />
pos="middle"</p>
<p># read from stdin if no args are present<br />
if [ $# -ne 1 ]<br />
then<br />
    text=$(line)<br />
else<br />
    text=$1<br />
fi</p>
<p>echo $text | osd_cat --color=$color --delay=$delay --age=$age --font=$font --offset=$offset --shadow=\<br />
$shadow --lines=$lines --align=$align --pos=$pos<br />
</code><br />
This script can be used for any notification purpose. For using this with procmail, replace use the following construct in procmailrc:<br />
<code><br />
:0 h<br />
| grep "From:" | /home/arun/bin/osd.sh<br />
</code><br />
This will display alerts as &#8220;From: Foo Bar &#8221; when a new mail is received.</p>
<p>Enjoy!</p>
Posted in How Tos Tagged: bash, cli, notification, osd_cat, script, shell, x <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/212/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/212/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=212&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/06/22/a-wrapper-for-osd_cat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>C# and VIM</title>
		<link>http://arun.wordpress.com/2009/04/10/c-and-vim/</link>
		<comments>http://arun.wordpress.com/2009/04/10/c-and-vim/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 04:09:36 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[ctags]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/?p=206</guid>
		<description><![CDATA[Let&#8217;s explore some of the tweaks to improve C# experience in Vim. All of the tips in this article can be applied to .Net Framework/Windows and Mono/Linux combination.


Code folding
 The default syntax mode code folding doesn&#8217;t play well with C#. It allows folding of only the code between the #region tags. Alternatively we can take [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=206&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Let&#8217;s explore some of the tweaks to improve C# experience in Vim. All of the tips in this article can be applied to .Net Framework/Windows and Mono/Linux combination.</p>
<ul>
<li>
<h2>Code folding</h2>
<p> The default syntax mode code folding doesn&#8217;t play well with C#. It allows folding of only the code between the <code>#region</code> tags. Alternatively we can take advantage of the indentation in the source code to make vim aware of which parts of the code to fold. Put the following snippet in your <a href="http://github.com/codito/configs/tree/master">vimrc</a>:       <br /><code>&quot; Folding : http://vim.wikia.com/wiki/Syntax-based_folding, see comment by Ostrygen au FileType cs set omnifunc=syntaxcomplete#Complete        <br />au FileType cs set foldmethod=marker         <br />au FileType cs set foldmarker={,}         <br />au FileType cs set foldtext=substitute(getline(v:foldstart),'{.*','{...}',)         <br />au FileType cs set foldlevelstart=2</code>&#160; </p>
<p> <img src="http://i73.photobucket.com/albums/i206/pratikarun/CSharpAndVim1.jpg"/>   </li>
<li>
<h2>Code browsing</h2>
<p> This is yet another important functionality when it comes to dealing with bulky libraries. We will use the awesome tool: Exuberant Ctags. With ctags we will scan the code base and create a tags file. And then we will make vim aware of the tags to help us autocomplete. Let&#8217;s start by scanning all c# files in <b>d:\myproduct</b> directory and creating the tag file <b>d:\mytagfile</b>.       </p>
<p>In a powershell window, navigate to the ctags installation directory and type in:       <br /><code>.\ctags.exe --recurse -f d:\mytagfile --exclude=&quot;bin&quot; --extra=+fq --fields=+ianmzS --c#-kinds=cimnp d:\myproduct</code>      </p>
<p>For details on the various options used above, please see the ctags man page.       </p>
<p>Next, let&#8217;s make vim aware of our tag file. In your vimrc, include the following lines:       <br />&#160;<code>set tag = d:\myproduct</code>       </p>
<p>Done. Now let&#8217;s try out the navigation:       <br />Place cursor on any identifier in source code and press <b>Ctrl-]</b>. This will take you to the definition of that identifier. Sometimes there can be more than places where an identifier is defined (in different source context ofcourse). In such cases, use the shortcut <b>g]</b> to see a list of matching locations for a particular identifier. Vim will show you all matching identifiers and ask you where you want to navigate.       <br /> <img src="http://i73.photobucket.com/albums/i206/pratikarun/CSharpAndVim2.jpg"/> </li>
<li>
<h2>Code completion</h2>
<p> Vim supports a number of word completion mechanisms (see :help completion). I&#8217;ll touch upon the relevant ones for C# (or general programming for that matter).&#160; These keys are applicable in Insert or Replace mode.
<ul>
<li>Tags based completion: <b>Ctrl-x Ctrl-]</b>           <br />Here vim will suggest you various words based on the tag file included. </li>
<li>Current and included files: <b>Ctrl-x Ctrl-i</b>           <br />Vim will search for relevant words on all included files and the source file. </li>
<li>Omni completion: <b>Ctrl-x Ctrl-o</b>           <br />Here vim will guess what will be the word based on the context (Type, member etc..). If you&#8217;ve noticed, we defined the omnifunc for C# in Code folding section: <br /><code>au FileType cs set omnifunc=syntaxcomplete#Complete</code>
<p>This will tell vim to guess the words based on C# syntax. </li>
</ul>
<p>     <img border="0" alt="Tag completion in VIM" src="http://i73.photobucket.com/albums/i206/pratikarun/CSharpAndVim3.jpg" /></li>
<li>
<h2>Quickfix</h2>
<p> Here&#8217;s a small tip to make vim recognize the error messages thrown by the commandline build tool msbuild. Put this in your vimrc:       <br /><code>&quot; Quickfix mode: command line msbuild error format        <br />au FileType cs set errorformat=\ %#%f(%l\\\,%c):\ error\ CS%n:\ %m</code>       </p>
<p>Can you figure out a way to build C# projects in the commandline? (Hints: Vim :help make, search online for msbuild, devenv /help).
</p>
</li>
</ul>
<p>Happy Vimming <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
Posted in Programming Tagged: C, csharp, ctags, Vim <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=206&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/04/10/c-and-vim/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>

		<media:content url="http://i73.photobucket.com/albums/i206/pratikarun/CSharpAndVim3.jpg" medium="image">
			<media:title type="html">Tag completion in VIM</media:title>
		</media:content>
	</item>
		<item>
		<title>Global command in VIM</title>
		<link>http://arun.wordpress.com/2009/01/03/global-command-in-vim/</link>
		<comments>http://arun.wordpress.com/2009/01/03/global-command-in-vim/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 04:14:09 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Error !!]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2009/01/03/global-command-in-vim/</guid>
		<description><![CDATA[Well you guessed it right, the &#8220;global&#8221; command (or :g in command mode) will let you select lines that match a particular pattern globally in the file and lets you operate on the selected text. The :v operates similar to grep -v which selects all texts which do not match the pattern.
Syntax: :g/pattern/command where pattern [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=203&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Well you guessed it right, the &#8220;global&#8221; command (or :g in command mode) will let you select lines that match a particular pattern globally in the file and lets you operate on the selected text. The <strong>:v</strong> operates similar to <strong>grep -v</strong> which selects all texts which do not match the pattern.</p>
<p>Syntax: <code>:g/pattern/command</code> where <strong>pattern</strong> is any regular expression, <strong>command</strong> is any vim command</p>
<p>Here&#8217;s the scenario which taught me the global command:<br />
I have a file with ~29K lines. All lines must begin with &#8220;\\&#8221;. However somelines are broken into two, in which case the lines which do not start with &#8220;\\&#8221; need to be appended to the previous<br />
line<br />
Sample text:<br />
\\foo\bar<br />
\\food<br />
bar<br />
\\x\y<br />
\z</p>
<p>Should be converted to:<br />
\\foo\bar<br />
\\foodbar<br />
\\x\y\z</p>
<p>And we solved it this way:<br />
<code>:v/^\\\\/exe "normal i\&lt;C-H&gt;\&lt;ESC&gt;"</code></p>
<p>All we did was to execute a <em>backspace(C-H)</em> for all occurences of pattern in <em>normal</em> mode</p>
<p>Let&#8217;s end the post with a theorem:<br />
<strong>Statement:</strong>VI is perfect<br />
<strong>Proof:</strong> VI in roman numerals is 6. The natural numbers less than 6 which<br />
divide 6 are 1, 2, and 3. 1 + 2 + 3 = 6. So 6 is a perfect number. Therefore, vi<br />
is perfect.<br />
&#8211; Arthur Tateishi</p>
<p><strong>And a corollary</strong><br />
VIM in roman numerals might be: (1000 &#8211; (5 + 1)) = 994, which happens to be<br />
equal to 2*496+2. 496 is divisible by 1, 2, 4, 8, 16, 31, 62, 124, and 248 and<br />
1+2+4+8+16+31+62+124+248 = 496. So, 496 is a perfect number. Therefore, vim is<br />
twice as perfect as vi, plus a couple extra bits of goodies. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>That is, vim is better than perfect.<br />
&#8211; Nathan T. Oelger</p>
<p><em>Have an awesome 2009!</em></p>
Posted in Error !!, How Tos Tagged: Vim <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=203&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2009/01/03/global-command-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>New mail notification with Procmail</title>
		<link>http://arun.wordpress.com/2008/12/07/new-mail-notification-with-procmail/</link>
		<comments>http://arun.wordpress.com/2008/12/07/new-mail-notification-with-procmail/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:51:07 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[How Tos]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[ratpoison]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/?p=198</guid>
		<description><![CDATA[Problem: I have my local mail setup with mutt, fetchmail and procmail. And I would need a way to run an arbitrary script when new mail arrives and _not_ loose the mail from my inbox.
Solution: Procmail supports a nice feature called nesting. With nested blocks a procmail recipe can be assigned more than action.
e.g: Here&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=198&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Problem:</strong> I have my local mail setup with <a title="Real mail client ftw" href="http://mutt-ng.berlios.de/" target="_blank">mutt</a>, <a title="Fetchmail" href="http://www.catb.org/~esr/fetchmail" target="_blank">fetchmail</a> and <a title="Procmail" href="http://www.procmail.org" target="_blank">procmail</a>. And I would need a way to run an arbitrary script when new mail arrives and _not_ loose the mail from my inbox.</p>
<p><strong>Solution:</strong> Procmail supports a nice feature called nesting. With nested blocks a procmail recipe can be assigned more than action.<br />
e.g: Here&#8217;s a recipe to filter all my email from gmail:<br />
<code>:0:<br />
* ^To:.*gmail\.com<br />
{<br />
:0 c<br />
$MAILDIR</code></p>
<p><code>:0 h</code><br />
| grep &#8220;From:&#8221; | ~/src/_scripts/ratpoison/newmail.sh<br />
}</p>
<p>And the newmail.sh script<br />
<code>#!/bin/bash<br />
read from<br />
ratpoison -c "echo Mail $from"</code></p>
<p><strong>Discussion:</strong> Here&#8217;s the breakup</p>
<ul>
<li><code>*^To:*gmail.com</code> Catch all mails which have their <strong>To:</strong> field containing <strong>gmail.com</strong></li>
<li>Nesting: specify the actions inside { .. }</li>
<li><code>:0 c - </code>Copy the mail into $MAILDIR</li>
<li><code>:0 h</code> &#8211; Pipe the header into <strong>grep</strong>. And pipe the output (&#8220;From:*&#8221;) into newmail script</li>
<li>In newmail.sh script, read the piped content into variable <strong>$from</strong> and display that in ratpoison message bar</li>
</ul>
<p>If your window manager has a notification tray, you may be interested in <a title="New mail notification for evolution" href="http://pugio.net/2006/12/new-mail-notifier-for-evolutio.html" target="_blank">this</a>. New to procmail, go <a title="Awesome procmail tutorial" href="http://userpages.umbc.edu/~ian/procmail.html" target="_blank">here</a>.</p>
<p>/me is having bit overdose of <a title="Oreilly cookbook presentation format" href="http://oreilly.com/images/cookbooks/spread.gif" target="_blank">cookbooks</a> these days <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
Posted in How Tos Tagged: mail, mutt, notification, procmail, ratpoison <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=198&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2008/12/07/new-mail-notification-with-procmail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>[Update] Download youtube videos in linux</title>
		<link>http://arun.wordpress.com/2008/11/10/update-download-youtube-videos-in-linux/</link>
		<comments>http://arun.wordpress.com/2008/11/10/update-download-youtube-videos-in-linux/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 03:20:31 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2008/11/10/update/</guid>
		<description><![CDATA[I had posted long back about a bash wrapper over youtube-dl to fetch youtube videos using your own download manager. The youtube-dl script had changed long since then. And good news is now we don&#8217;t need to change the script in any way to get the download url. So here we go!
Grab the latest youtube-dl [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=195&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had <a href="http://arun.wordpress.com/2007/01/29/download-youtube-videos-the-linux-way/">posted</a> long back about a bash wrapper over youtube-dl to fetch youtube videos using your own download manager. The youtube-dl script had changed long since then. And good news is now we don&#8217;t need to change the script in any way to get the download url. So here we go!</p>
<p>Grab the latest youtube-dl from <a href="http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl">here</a><br />
Minor update to the linux youtube-dl script:<br />
<code>#!/bin/bash<br />
if [ $# -ne 2 ]<br />
then<br />
     echo “Usage : $0  ”<br />
     echo “e.g : $0 http://www.youtube.com/watch?v=D1R-jKKp3NA steve_jobs”<br />
else<br />
     outputfile=”.avi”<br />
     todnload=$(youtube-dl -g $1)      # youtube-dl is in path, right?<br />
     echo “Got the file..”$todnload<br />
     axel -n 100 $todnload -o $2″.flv” # wget -c $todnload -O $2″.flv” .if you don’t use axel<br />
     echo “Download Completed…”<br />
     ffmpeg -i $2″.flv” $2$outputfile  # get the avi file<br />
fi</code></p>
<p>Enjoy <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<i>Thanks Jay for pointing this out!</i></p>
Posted in Hacks, How Tos Tagged: how to, script <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=195&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2008/11/10/update-download-youtube-videos-in-linux/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>How to choose a web host</title>
		<link>http://arun.wordpress.com/2008/10/23/how-to-choose-a-webhost/</link>
		<comments>http://arun.wordpress.com/2008/10/23/how-to-choose-a-webhost/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 18:28:54 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[How Tos]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2008/10/23/how-to-choose-a-webhost/</guid>
		<description><![CDATA[Lemme shout it aloud: I am a big fan of free webhosts   Until recently, one of my friends made me realize(brainwashed!) that probably I had had my part of the freebies   And its been long since I last did something php-ish, so the thought of getting hands dirty with web programming [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=188&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Lemme shout it aloud: I am a big fan of free webhosts <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Until recently, one of my friends made me realize(brainwashed!) that probably I had had my part of the freebies <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  And its been long since I last did something php-ish, so the thought of getting hands dirty with web programming made me take this bad decision of getting a host.<br />
And dude, choosing the right host _is_ much tougher than expected. It ate up some 10s of my sleep-hours and a few man-weekends <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Finally, yesterday I gave up(damn it! set IDontCare=true) on my FindBestHost greedy approach and purchased a hosting package.<br />
A few suggestions for those looking out for webhosts:</p>
<ol>
<li><b>Apply filters</b><br />
<u>Define your purpose</u>. Why you need a web host? What kind of websites you plan to host? Any special requirements? How much resources(space/bandwidth) do you think you&#8217;ll spend?<br />
As an example, here are my answers: I need a webhost to host a blog(pleaseeeee not one more!). Mostly the website will be personal and will host my dev work, some projects. Since I am a self-proclaimed web hobbyist, I would need flexibility in terms of scripts (RoR?). At max, I will put in 5-10 domains in the web space. Considering a GB per site, will take up 5GB and assuming a moderate crowd will use my web resources, lets allow 40GB per domain per month, that would make bandwidth around 200GB per month.
</li>
<li><b>The search begins!</b><br />
Use your favorite search engine. Ask around. SetGTalkStatus/Twitter/Spam/Scrap/Write-on-wall your contacts. If they can refer, your hard job is done. Don&#8217;t waste time on more search. Jump to the next step.<br />
In case you&#8217;re shy to ask people, you can look in some good webhosting forums (e.g: WebHostingTalk). They&#8217;re good. Lots of webhost guys roam around there. I got around 14k results for a simple search query &#8220;recommend host&#8221; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  I think first 3-4 pages should suffice. <a href="http://www.webhostingtalk.com/forumdisplay.php?f=4">This</a> is a good starting place as well.
</li>
<li><b>Test the host!</b><br />
At this time, we should have a shortlist of 4-5 hosts. Now for each host try this:</p>
<ul>
<li>Go to <a href="http://www.webhosting.info">Webhosting.info</a>. Search for the webhost. Have a good look at the number of domains coming into the host and going out each week. You can country wise breakup of top hosts. For me the most important criteria was domain in/out analysis and total domains hosted.</li>
<li>Do a &#8220;You suck&#8221; test. Query your favorite seach engine for negative reviews of the host. E.g: Go to your favorite search engine. Query for &#8220;[webhost] sucks&#8221;. Safely ignore the [Web Host Name]reviews.com(e.g: [TheBigCheapAndBestWebHost]Reviews.com) websites. A good choice would be query in Blog Search.</li>
<li>Consider having a chat with the sales/support people at the webhosting live chat. Sometimes the time they make you wait will immediately give you a feel of their customer service <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
</li>
<li><b>Beware of these!</b>
<ul>
<li>The &#8220;foobar&#8221; offers. Before you sell out cash on *any* offer that gives you substantial discounts, make sure you&#8217;re aware of their normal(non-foobar) pricing. Unless you plan to change host every billing cycle, you will be charged against the normal pricing. E.g: A webhost offers 4.95USD as foobar price and normal pricing is 7.95USD.<br />And I never understood the rationale behind the *.95USD pricing rule.</li>
<li>Overselling. I was really astounded at the number of companies offering unlimited resources. So I went around bugging their sales/support guys on this. They say you can&#8217;t store personal files(Does it translate to &#8220;all your files must be web accessible&#8221;?). I doubt if they have shared hosting customers who distributes legal 1gig files! I wish I could copy/paste the chats I had with these guys <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  Clearly these people are overselling. They&#8217;ll put in your site in some server with probably a few hundred more poor domains. IMO unlimited bandwith can make sense for people who publish streaming content. But does the resource usage policy of these shared hosts allow you to stream enough?<br />I would suggest to take a limited resource plan. I agree we all love greedy algos, but lets truly have an estimate of the resource usage before getting lured away on such offers.</li>
</ul>
</li>
</ol>
<p>Hope this might save a few minutes while deciding for a webhost. Good luck!</p>
Posted in How Tos, Internet Tagged: hosting, how to, web <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=188&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2008/10/23/how-to-choose-a-webhost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
		<item>
		<title>Sistine: A sify broadband client</title>
		<link>http://arun.wordpress.com/2008/10/02/sistine-a-sify-broadband-client/</link>
		<comments>http://arun.wordpress.com/2008/10/02/sistine-a-sify-broadband-client/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 11:28:06 +0000</pubDate>
		<dc:creator>arun</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sify]]></category>

		<guid isPermaLink="false">http://arun.wordpress.com/2008/10/02/sistine-a-sify-broadband-client/</guid>
		<description><![CDATA[Sify provides a connection client(they call it BBClient) for linux. If you use bbclient on *nix, these would have hit you:

Sifyconnect is a pre-compiled (linked to old openssl libs) binary. I had to literally do some &#8216;n&#8217; softlinks to get it start.
As soon as I login, I am greeted with Sify homepage. That to with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=180&subd=arun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sify provides a connection client(they call it BBClient) for linux. If you use bbclient on *nix, these would have hit you:</p>
<ul>
<li>Sifyconnect is a pre-compiled (linked to old openssl libs) binary. I had to literally do some &#8216;n&#8217; softlinks to get it start.</li>
<li>As soon as I login, I am greeted with Sify homepage. That to with firefox running from root <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>They overwrite my custom resolv.conf with the sify nameservers.</li>
<li>The UI is a gtk interface which hangs on. I think it needs a systray to hide. Unfortunately my wm doesn&#8217;t provide a systray (though I can use stalonetray, but using that for a single app..)</li>
</ul>
<p>After living through these for nearly three months, yesterday the level of irritation overtook my laziness. I had to disconnect few times and everytime the client would fork a firefox. The search for alternate client began. I stumbled across a nice <a href="http://broadbandforum.in/sify-broadband/15416-steppenwolf-takes-sify-broadband-encryption-algorithm/">hack</a> by Liet-Kynes. The hack literally dissects the sify connection mechanism <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Stepped through the script and modified a few bits to get the script working in my machine. And now its release time!</p>
<p><span style="font-weight:bold;">Download:</span> <a href="http://files.codito.in/utils/sistine/sistine-20081002.tar.bz2">Sistine-20081002.tar.bz2</a><br />
<span style="font-weight:bold;">Usage:</span> Login: <span style="font-style:italic;">sistine.py in</span> | Logout: <span style="font-style:italic;">sistine.py out</span> || Please read the README bundled in the archive.<br />
<span style="font-weight:bold;">ChangeLog:</span></p>
<ul>
<li>Simple command line args. (in: login and out:logout)</li>
<li>Added Logout support to the script</li>
<li>Minor modification to connection string</li>
<li>A small bug: If your password contains special characters then the script might not connect. I will look into this for next update. Please patch it if you&#8217;re a python guy.</li>
</ul>
<p><span style="font-weight:bold;">Disclaimer:</span> Your box might burst/fly/crawl on running the script. Don&#8217;t blame me for that. The script works  normally for me btw.<br />
<span style="font-weight:bold;">License:</span> Public domain. Bend it as you like.</p>
<p>I&#8217;ve tested the script in linux. It should work in windows as well if you&#8217;ve python installed.<br />
The original code by Liet-Kyne is <a title="Download unmodified sistine" href="http://files.codito.in/utils/sistine/sistine-20070828.tar.gz" target="_blank">sistine-20070828.tar.gz</a>. Kudos to Liet-Kyne, buddy you&#8217;re a true hacker <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update:</strong> If you&#8217;re in python 2.6, get the scripts from my <a title="Sistine at GitHub" href="http://github.com/codito/sistine/tree" target="_blank">github</a>.</p>
Posted in Hacks Tagged: python, script, sify <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arun.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arun.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arun.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arun.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arun.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arun.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arun.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arun.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arun.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arun.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arun.wordpress.com&blog=4435&post=180&subd=arun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://arun.wordpress.com/2008/10/02/sistine-a-sify-broadband-client/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/538328a9e4e6870acddde232bffe7820?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arun</media:title>
		</media:content>
	</item>
	</channel>
</rss>