<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>AmirWatad.com</title>
	
	<link>http://www.amirwatad.com/blog</link>
	<description>Remember the name ;)</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Amirwatadcom" /><feedburner:info uri="amirwatadcom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Regular Expression To Check For Prime Numbers</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/s_xiW7Wj7mc/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 23:09:15 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=592</guid>
		<description><![CDATA[The code is in python, but the concept is the same for any language with regular expression support (perl, sed, awk, vim, etc..) 123import re def is_prime&#40;n&#41;: &#160; &#160; &#160; &#160; return re.match&#40;r'^1?$&#124;^(11+?)\1+$', &#34;1&#34; * n&#41; == None; That&#8217;s it using a regular expression we can check if a number is prime or not. Here [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/">Regular Expression To Check For Prime Numbers</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The code is in python, but the concept is the same for any language with regular expression support (perl, sed, awk, vim, etc..)</p>
<div class="codecolorer-container python twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span><br />
<span style="color: #ff7700;font-weight:bold;">def</span> is_prime<span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">match</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'^1?$|^(11+?)<span style="color: #000099; font-weight: bold;">\1</span>+$'</span>, <span style="color: #483d8b;">&quot;1&quot;</span> <span style="color: #66cc66;">*</span> n<span style="color: black;">&#41;</span> == <span style="color: #008000;">None</span><span style="color: #66cc66;">;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s it <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Regular Expression To Check For Prime Numbers" />   using a regular expression we can check if a number is prime or not.</p>
<p>Here is a short explanation of why it works (though it will ruin the magic part):<br />
<span id="more-592"></span></p>
<p>The trick is first to &#8220;flatten&#8221; the number. i.e., for 7, we&#8217;ll pass (&#8220;1&#8243; * 7) to the regexp, that is: &#8220;1111111&#8243;.<br />
The first part of the regexp &#8220;^1?$&#8221; matches a string with an optional &#8220;1&#8243;, that is, it matches the empty string, and the string &#8220;1&#8243;, which are the &#8220;flat&#8221; representations of 0 and 1 respectively.</p>
<p>The second part is more tricky:<br />
It tries to match a string of &#8220;start of line&#8221;, then two 1&#8242;s or more ^(11+?), then it tries to find one or more times the previous match (\1+). then end of line $.<br />
If you imaging &#8220;sticks&#8221; instead of the 1&#8242;s, then what we did is: represent 7 (for example) with 7 sticks, then try to divide them into two or more groups of two, or two or more groups of three, etc.. in general: try to divide the sticks into two or more groups of &#8220;two or more&#8221;. Which is exactly the definition of a non-prime number (a.k.a composite number).<br />
So, if the regexp succeeds to match the pattern, the number is not prime. If it fails, the number is prime.</p>
<p>So easy, so elegant <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Regular Expression To Check For Prime Numbers" /> </p>
<p>Note about the ^(11+?):  This is almost the same as ^(11+) but, with one difference: using (+?) instead of (+) means &#8220;match minimally&#8221;, as opposed to &#8220;match greedily&#8221;.<br />
For example, consider the string &#8220;aaaa&#8221; and the regexp &#8216;(a+)\1+&#8217;  the regexp will match the string, the value of \1 will be &#8220;aa&#8221;, since the a+ pattern matched the longest string which allows the regexp to match the string.<br />
The regexp &#8216;(a+?)\1+&#8217; will also match the string, but the value of \1 will be &#8220;a&#8221;, because this time (a+?) looked for the minimal match which will allow the regexp to match the string.<br />
In out case, the use of (+?) instead of (+) does not affect correctness (that is, we could use (+) and the regexp will still work correctly). The only difference is related to performance, because our case tries small groups first, while the other case tries big groups first.</p>
<p>More information and explanation in the <a href="http://montreal.pm.org/tech/neil_kandalgaonkar.shtml">original article</a>.</p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/">Regular Expression To Check For Prime Numbers</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Regular+Expression+To+Check+For+Prime+Numbers+http://bit.ly/bKz0Ns" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Regular Expression To Check For Prime Numbers" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/&amp;title=Regular+Expression+To+Check+For+Prime+Numbers" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Regular Expression To Check For Prime Numbers" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/&amp;title=Regular+Expression+To+Check+For+Prime+Numbers" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Regular Expression To Check For Prime Numbers" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/&amp;t=Regular+Expression+To+Check+For+Prime+Numbers" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Regular Expression To Check For Prime Numbers" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/&amp;title=Regular+Expression+To+Check+For+Prime+Numbers" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Regular Expression To Check For Prime Numbers" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/&amp;title=Regular+Expression+To+Check+For+Prime+Numbers" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Regular Expression To Check For Prime Numbers" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=s_xiW7Wj7mc:QAoTt3JC8I0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=s_xiW7Wj7mc:QAoTt3JC8I0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=s_xiW7Wj7mc:QAoTt3JC8I0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=s_xiW7Wj7mc:QAoTt3JC8I0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=s_xiW7Wj7mc:QAoTt3JC8I0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=s_xiW7Wj7mc:QAoTt3JC8I0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=s_xiW7Wj7mc:QAoTt3JC8I0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/s_xiW7Wj7mc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/07/24/regular-expression-to-check-for-prime-numbers/</feedburner:origLink></item>
		<item>
		<title>Firefox Extensions To Make Web Pages More Eye Friendly</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/i79fZfOMumY/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 21:11:21 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=587</guid>
		<description><![CDATA[To understand what I&#8217;m talking about, take a look at Dr Chip&#8217;s Vim Website which is a great resource about vim-related stuff, but is an extremely ugly website, I mean, it really hurt my eyes whenever I visit it. If you use Firefox, then you can easily solve this problem with these two Firefox extensions. [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/">Firefox Extensions To Make Web Pages More Eye Friendly</a></p>
]]></description>
			<content:encoded><![CDATA[<p>To understand what I&#8217;m talking about, take a look at <a title="Dr Chip's Vim Website" href="http://mysite.verizon.net/astronaut/vim/" target="_blank">Dr Chip&#8217;s Vim Website</a> which is a great resource about vim-related stuff, but is an extremely ugly website, I mean, it really hurt my eyes whenever I visit it.</p>
<p>If you use Firefox, then you can easily solve this problem with these two Firefox extensions. Both serve the same purpose: Making websites easier to read, by removing distractions and allowing you to focus on the content instead. Each one displays the website in a different style, and they have different options. I installed both and use them alternately (and regularly).</p>
<p><span id="more-587"></span>The first extension is called &#8220;Readability&#8221;, and is found <a title="Readability Firefox Extension" href="https://addons.mozilla.org/en-US/firefox/addon/46442/" target="_self">here</a>. The other is called &#8220;Firefox Reader&#8221;, and is located <a title="Firefox Reader Firefox Extension" href="https://addons.mozilla.org/en-US/firefox/addon/184617/" target="_blank">here</a>.</p>
<p>Using is as easy as clicking a button, so I&#8217;m sure you&#8217;ll be able to manage without my help <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Firefox Extensions To Make Web Pages More Eye Friendly" /> </p>
<p>Here are some screenshots of Dr Chip&#8217;s Website without and with the above extensions:</p>
<div id="attachment_588" class="wp-caption alignnone" style="width: 310px"><a href="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_original.png"><img class="size-medium wp-image-588" title="Dr Chip's Website - Original" src="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_original-300x183.png" alt="Dr Chip's Website - Original" width="300" height="183" /></a><p class="wp-caption-text">Dr Chip&#39;s Website - Original</p></div>
<div id="attachment_589" class="wp-caption alignnone" style="width: 310px"><a href="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_readability.png"><img class="size-medium wp-image-589" title="Dr Chip's Website With Readability Extension" src="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_readability-300x185.png" alt="Dr Chip's Website With Readability Extension" width="300" height="185" /></a><p class="wp-caption-text">Dr Chip&#39;s Website With Readability Extension</p></div>
<div id="attachment_590" class="wp-caption alignnone" style="width: 310px"><a href="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_ff_reader.png"><img class="size-medium wp-image-590" title="Dr Chip's Website With Firefox Reader Extension" src="http://www.amirwatad.com/blog/wp-content/uploads/2010/07/dr_chip_ff_reader-300x187.png" alt="Dr Chip's Website With Firefox Reader Extension" width="300" height="187" /></a><p class="wp-caption-text">Dr Chip&#39;s Website With Firefox Reader Extension</p></div>
<p>Have fun <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Firefox Extensions To Make Web Pages More Eye Friendly" /> </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/">Firefox Extensions To Make Web Pages More Eye Friendly</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly+http://bit.ly/dxdVUO" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/&amp;title=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/&amp;title=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/&amp;t=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/&amp;title=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/&amp;title=Firefox+Extensions+To+Make+Web+Pages+More+Eye+Friendly" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Firefox Extensions To Make Web Pages More Eye Friendly" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=i79fZfOMumY:v43HIuZ9XUc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=i79fZfOMumY:v43HIuZ9XUc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=i79fZfOMumY:v43HIuZ9XUc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=i79fZfOMumY:v43HIuZ9XUc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=i79fZfOMumY:v43HIuZ9XUc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=i79fZfOMumY:v43HIuZ9XUc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=i79fZfOMumY:v43HIuZ9XUc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/i79fZfOMumY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/07/18/firefox-extensions-to-make-web-pages-more-eye-friendly/</feedburner:origLink></item>
		<item>
		<title>Colorize Make, GCC and Diff’s Output</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/-etVGjQhjJ0/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 16:12:52 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux debug programming]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=585</guid>
		<description><![CDATA[Generally, output is more readable when it has colors to allow you distinguish between warnings, errors and progress logs. Using colormake, colorgcc and colordiff, you can have the output of make, gcc, diff (respectively) coloured. To install in Ubuntu: sudo apt-get install colorgcc colormake colordiff You might want to use aliases to override the normal [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/">Colorize Make, GCC and Diff&#8217;s Output</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Generally, output is more readable when it has colors to allow you distinguish between warnings, errors and progress logs.</p>
<p>Using colormake, colorgcc and colordiff, you can have the output of make, gcc, diff (respectively) coloured.</p>
<p>To install in Ubuntu:</p>
<blockquote><p>sudo apt-get install colorgcc colormake colordiff</p></blockquote>
<p>You might want to use aliases to override the normal make/gcc/diff commands.</p>
<p>Original tip from <a title="commandlinefu tip" href="http://www.commandlinefu.com/commands/view/2884/colorize-make-gcc-and-diff-output" target="_blank">here</a>.</p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/">Colorize Make, GCC and Diff&#8217;s Output</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output+http://bit.ly/9xeeiD" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Colorize Make, GCC and Diffs Output" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/&amp;title=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Colorize Make, GCC and Diffs Output" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/&amp;title=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Colorize Make, GCC and Diffs Output" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/&amp;t=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Colorize Make, GCC and Diffs Output" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/&amp;title=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Colorize Make, GCC and Diffs Output" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/&amp;title=Colorize+Make%2C+GCC+and+Diff%E2%80%99s+Output" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Colorize Make, GCC and Diffs Output" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=-etVGjQhjJ0:TEZNpvs9QLY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=-etVGjQhjJ0:TEZNpvs9QLY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=-etVGjQhjJ0:TEZNpvs9QLY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=-etVGjQhjJ0:TEZNpvs9QLY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=-etVGjQhjJ0:TEZNpvs9QLY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=-etVGjQhjJ0:TEZNpvs9QLY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=-etVGjQhjJ0:TEZNpvs9QLY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/-etVGjQhjJ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/07/17/colorize-make-gcc-and-diffs-output/</feedburner:origLink></item>
		<item>
		<title>Fix Bad Indentation When Pasting Text To Vim</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/Wy8BjnpfYpc/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 19:27:01 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=583</guid>
		<description><![CDATA[The problem is this: You&#8217;re editing a buffer in vim, you copy a text (say, code snippet) from another place (say, Firefox), and you paste it inside vim (with middle mouse button / shift+insert). Most chances you won&#8217;t like what vim has just did to your text. The problem is that vim doesn&#8217;t &#8220;know&#8221; that [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/">Fix Bad Indentation When Pasting Text To Vim</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The problem is this:</p>
<p>You&#8217;re editing a buffer in vim, you copy a text (say, code snippet) from another place (say, Firefox), and you paste it inside vim (with middle mouse button / shift+insert). Most chances you won&#8217;t like what vim has just did to your text.</p>
<p>The problem is that vim doesn&#8217;t &#8220;know&#8221; that you&#8217;re actually pasting a text, and it thinks that you&#8217;re typing. So, if you have indentation enabled, it will re-indent your text.</p>
<p>The solution is simple: Whenever you want to paste text from outside vim into vim. Type this in command mode:</p>
<blockquote><p>:set paste</p></blockquote>
<p>So now vim knows that you&#8217;re going to paste text, and it will not touch it.</p>
<p>To disable the paste mode:</p>
<blockquote><p>:set nopaste</p></blockquote>
<p>As easy as that <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Fix Bad Indentation When Pasting Text To Vim" /> </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/">Fix Bad Indentation When Pasting Text To Vim</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Fix+Bad+Indentation+When+Pasting+Text+To+Vim+http://bit.ly/b3q5o7" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Fix Bad Indentation When Pasting Text To Vim" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/&amp;title=Fix+Bad+Indentation+When+Pasting+Text+To+Vim" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Fix Bad Indentation When Pasting Text To Vim" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/&amp;title=Fix+Bad+Indentation+When+Pasting+Text+To+Vim" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Fix Bad Indentation When Pasting Text To Vim" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/&amp;t=Fix+Bad+Indentation+When+Pasting+Text+To+Vim" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Fix Bad Indentation When Pasting Text To Vim" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/&amp;title=Fix+Bad+Indentation+When+Pasting+Text+To+Vim" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Fix Bad Indentation When Pasting Text To Vim" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/&amp;title=Fix+Bad+Indentation+When+Pasting+Text+To+Vim" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Fix Bad Indentation When Pasting Text To Vim" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=Wy8BjnpfYpc:g-cim_fKmJo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=Wy8BjnpfYpc:g-cim_fKmJo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=Wy8BjnpfYpc:g-cim_fKmJo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=Wy8BjnpfYpc:g-cim_fKmJo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=Wy8BjnpfYpc:g-cim_fKmJo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=Wy8BjnpfYpc:g-cim_fKmJo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=Wy8BjnpfYpc:g-cim_fKmJo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/Wy8BjnpfYpc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/07/16/fix-bad-indentation-when-pasting-text-to-vim/</feedburner:origLink></item>
		<item>
		<title>NumPad Problems When Using Vim over Tmux</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/wH_r5428hfc/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 22:53:34 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Vim]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tmux]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=579</guid>
		<description><![CDATA[I use vim as my main text editor, and I usually split the screen to edit a few buffers in parallel. To make resizing the windows faster, I mapped the numpad keys &#8220;/*-+&#8221; to resize the windows (see original vim tip here). Recently, I started to use tmux, and opened vim, split the windows as [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/">NumPad Problems When Using Vim over Tmux</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I use vim as my main text editor, and I usually split the screen to edit a few buffers in parallel. To make resizing the windows faster, I mapped the numpad keys &#8220;/*-+&#8221; to resize the windows (see original vim tip <a title="VimTip - resizing windows" href="http://vim.wikia.com/wiki/VimTip427" target="_blank">here</a>).</p>
<p>Recently, I started to use tmux, and opened vim, split the windows as usual, and tried to resize them. It didn&#8217;t work <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="NumPad Problems When Using Vim over Tmux " /> </p>
<p>I use Ubuntu 10.04 (Don&#8217;t remember the exotic name..), and I found that the latest tmux package in their repo is 1.1-1.</p>
<p>Anyway, version 1.1-1 has a bug with the NumPad. The solution is to download the source of tmux 1.2 and build it. It depends on libevent so you&#8217;ll need to get it first:</p>
<p>this is how to make it work:</p>
<blockquote><p>1. sudo apt-get install libevent-dev</p>
<p>2. Get the source tarball of tmux from <a title="http://sourceforge.net/projects/tmux/files/tmux/tmux-1.2/tmux-1.2.tar.gz/download" href="http://" target="_blank">here</a>.</p>
<p>3. tar xzf tmux-1.2.tar.gz</p>
<p>4. cd tmux-1.2</p>
<p>5. ./configure</p>
<p>6. make</p>
<p>7. sudo make install</p></blockquote>
<p>Done. Now your life is better. Have fun <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="NumPad Problems When Using Vim over Tmux " /> </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/">NumPad Problems When Using Vim over Tmux</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=NumPad+Problems+When+Using+Vim+over+Tmux+http://bit.ly/d8qiIw" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="NumPad Problems When Using Vim over Tmux " /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/&amp;title=NumPad+Problems+When+Using+Vim+over+Tmux" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="NumPad Problems When Using Vim over Tmux " /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/&amp;title=NumPad+Problems+When+Using+Vim+over+Tmux" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="NumPad Problems When Using Vim over Tmux " /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/&amp;t=NumPad+Problems+When+Using+Vim+over+Tmux" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="NumPad Problems When Using Vim over Tmux " /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/&amp;title=NumPad+Problems+When+Using+Vim+over+Tmux" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="NumPad Problems When Using Vim over Tmux " /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/&amp;title=NumPad+Problems+When+Using+Vim+over+Tmux" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="NumPad Problems When Using Vim over Tmux " /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=wH_r5428hfc:bJ3PDMmNw64:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=wH_r5428hfc:bJ3PDMmNw64:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=wH_r5428hfc:bJ3PDMmNw64:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=wH_r5428hfc:bJ3PDMmNw64:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=wH_r5428hfc:bJ3PDMmNw64:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=wH_r5428hfc:bJ3PDMmNw64:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=wH_r5428hfc:bJ3PDMmNw64:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/wH_r5428hfc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/07/03/numpad-problems-when-using-vim-over-tmux/</feedburner:origLink></item>
		<item>
		<title>Online JavaScript Lint</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/x5a-VEUHCOA/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 00:21:43 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=574</guid>
		<description><![CDATA[In general, a lint is a great tool which saves hours of debug. It will find the syntax errors for you, and even give you warnings to avoid potential bugs. I happened to write JavaScript this week, and found a great Online JavaScript Lint.  Use with care Ah, and they also have a downloadable version. [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/">Online JavaScript Lint</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In general, a lint is a great tool which saves hours of debug. It will find the syntax errors for you, and even give you warnings to avoid potential bugs.</p>
<p>I happened to write JavaScript this week, and found a great <a title="JavaScript Online Lint" href="http://www.javascriptlint.com/online_lint.php" target="_blank">Online JavaScript Lint</a>.  Use with care <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Online JavaScript Lint" /> </p>
<p>Ah, and they also have a downloadable version.</p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/">Online JavaScript Lint</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Online+JavaScript+Lint+http://bit.ly/cODeZl" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Online JavaScript Lint" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/&amp;title=Online+JavaScript+Lint" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Online JavaScript Lint" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/&amp;title=Online+JavaScript+Lint" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Online JavaScript Lint" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/&amp;t=Online+JavaScript+Lint" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Online JavaScript Lint" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/&amp;title=Online+JavaScript+Lint" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Online JavaScript Lint" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/&amp;title=Online+JavaScript+Lint" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Online JavaScript Lint" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=x5a-VEUHCOA:E7pJKI_KVDk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=x5a-VEUHCOA:E7pJKI_KVDk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=x5a-VEUHCOA:E7pJKI_KVDk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=x5a-VEUHCOA:E7pJKI_KVDk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=x5a-VEUHCOA:E7pJKI_KVDk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=x5a-VEUHCOA:E7pJKI_KVDk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=x5a-VEUHCOA:E7pJKI_KVDk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/x5a-VEUHCOA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/06/27/online-javascript-lint/</feedburner:origLink></item>
		<item>
		<title>Backup Your Facebook Data</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/VXCzaIQdmIQ/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/#comments</comments>
		<pubDate>Wed, 19 May 2010 20:07:36 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=567</guid>
		<description><![CDATA[This post includes &#8220;Thoughts about Facebook and You&#8221;, and a link to a great tool to backup your Facebook data. If you use Facebook, the first thing you should know is: Never trust these bastards! They don&#8217;t give a shit on your privacy, they want (and do) own YOUR data, they can &#8220;deactivate&#8221; your account [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/">Backup Your Facebook Data</a></p>
]]></description>
			<content:encoded><![CDATA[<p>This post includes &#8220;Thoughts about Facebook and You&#8221;, and a link to a great tool to backup your Facebook data.</p>
<p>If you use Facebook, the first thing you should know is: Never trust these bastards! They don&#8217;t give a shit on your privacy, they want (and do) own YOUR data, they can &#8220;deactivate&#8221; your account without a warning, without an explanation, and even without a good reason.</p>
<p><span id="more-567"></span></p>
<p>A friend of mine got a letter from Facebook today, informing him that for some reason his Facebook account ws deactivated (I assure you that none of there &#8220;reasons&#8221; is reasonable). Not only that, they end the message with</p>
<blockquote><p>&#8220;Your violation of Facebook&#8217;s standards has resulted in the  permanent loss of your account. We will not be able to reactivate your  account for any reason. This decision is final.&#8221;</p></blockquote>
<p>WTF?! Final? What could made such decision final? What if he has an explanation? What about the man&#8217;s data, photos, posts, contacts?!</p>
<p>Know what? I have a theory.  &#8220;Violation of Facebook&#8217;s standards&#8221; isn&#8217;t a good reason to make a decision final. My theory is: The bastards accidentally lost his data, and now they try to cover their a**es using the &#8220;Violation of standards&#8221;.</p>
<p>You thought that you are using Facebook? You&#8217;re wrong, Facebook is using you! Not only using you, they actually OWN YOU!</p>
<p>I learnt a few lessons from this accident:</p>
<p>1. Never trust a corporation when it comes to your data or privacy. If they want, they can erase everything at once, without a warning, or a reason.</p>
<p>2. Never trust Facebook. These are real bastards. Worst than any other corporation. Your data is their money. Ethics is not their strong side.</p>
<p>3. Never use Facebook (or any social network) for storage. Don&#8217;t upload content explicitly to Facebook, reliability isn&#8217;t their strong side neither. In the worst case, save your data in other websites as well (like Picasa/Flickr for Photos etc..), of course, a local copy in your machine isn&#8217;t a bad idea.</p>
<p>4. Backup! Don&#8217;t let yourself lose your data without being able to do anything.</p>
<p>There is a great tool to backup your Facebook data, it&#8217;s called<a href="http://www.socialsafe.net" target="_blank"> &#8220;Social Safe</a>&#8220;, it&#8217;s not free but it&#8217;s very cheap (3 USD). Really recommended. If you use it on Linux, you can find the backed-up data on:</p>
<p>/home/[username]/.appdata/com.1minus1.socialsafe.*/Local Store/facebook/</p>
<p>5. If you don&#8217;t want Facebook to own your own data (Damn it!), don&#8217;t upload it to them.</p>
<p>Have a good day</p>
<p> <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Backup Your Facebook Data" /> </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/">Backup Your Facebook Data</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Backup+Your+Facebook+Data+http://bit.ly/cZDOb3" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Backup Your Facebook Data" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/&amp;title=Backup+Your+Facebook+Data" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Backup Your Facebook Data" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/&amp;title=Backup+Your+Facebook+Data" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Backup Your Facebook Data" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/&amp;t=Backup+Your+Facebook+Data" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Backup Your Facebook Data" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/&amp;title=Backup+Your+Facebook+Data" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Backup Your Facebook Data" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/&amp;title=Backup+Your+Facebook+Data" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Backup Your Facebook Data" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=VXCzaIQdmIQ:Htu0el74Y7I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=VXCzaIQdmIQ:Htu0el74Y7I:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=VXCzaIQdmIQ:Htu0el74Y7I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=VXCzaIQdmIQ:Htu0el74Y7I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=VXCzaIQdmIQ:Htu0el74Y7I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=VXCzaIQdmIQ:Htu0el74Y7I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=VXCzaIQdmIQ:Htu0el74Y7I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/VXCzaIQdmIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/05/19/backup-your-facebook-data/</feedburner:origLink></item>
		<item>
		<title>Convert O’reilly Stand-Alone iPhone Books to epub Format</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/0hQbbjOUSa8/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 19:21:50 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ebooks]]></category>
		<category><![CDATA[Oreilly]]></category>
		<category><![CDATA[TIps]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=561</guid>
		<description><![CDATA[O&#8217;reilly are a great publisher of books related to technology/programming. They offer their books in a few formats besides the classic print. PDF, epub, or as a standalone iPhone App. The great thing about the standalone option, is that it much cheaper than the epub or PDF version (why?). Still, you don&#8217;t want your iPhone [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/">Convert O&#8217;reilly Stand-Alone iPhone Books to epub Format</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://oreilly.com/">O&#8217;reilly</a> are a great publisher of books related to technology/programming. They offer their books in a few formats besides the classic print. PDF, epub, or as a standalone iPhone App.<br />
The great thing about the standalone option, is that it much cheaper than the epub or PDF version (why?). Still, you don&#8217;t want your iPhone screen full of book icons scattered everywhere (especially if you have a large number of books).<br />
The trick is to buy the book @ AppStore as a standalone app, unpack it, pack it again as epub, and upload to any eReader (e.g. Stanza). Now you&#8217;ll have all your books centralized in one location, and you&#8217;ll keep free space on your screen for other applications.</p>
<p>Here&#8217;s how to do it:<br />
<span id="more-561"></span><br />
<strong>Step 1: Unpack</strong> (from <a href="http://oreilly.com/ebooks/oreilly_iphone_tips.csp">O&#8217;Reilly&#8217;s website</a>)</p>
<blockquote><p>
   1. Once you&#8217;ve downloaded the app, select Applications in iTunes, right-click the app that you want to extract, and select Show in Finder/Explorer. The file you want is selected automatically when the window opens.<br />
   2. Copy (that&#8217;s copy, not move) the file to a different location, for example, your desktop.<br />
   3. Change the file extension of the copied file from .ipa to .zip using whatever method is most familiar to you.<br />
   4. Unzip the file using whatever archiving utility you prefer.<br />
   5. There are a few files, but the directory you are interested in should be named Payload.<br />
   6. This step varies, depending on platform:<br />
          * If you are on a PC, simply go into the Payload/<app_name>.app directory.<br />
          * If you are on a Mac, go into the Payload directory, right-click the file within, and select Show Package Contents.<br />
   7. Again, there are lots of files and directories here, but the EPUB content is found in book/OEBPS.</p>
<p>Now that you&#8217;ve found the files, you are free to read (and copy and paste from) them in your web browser.
</p></blockquote>
<p>Now that you have the whole book as HTML, you can read it through a web browser. You can also pack it as a epub file:</p>
<p><strong>Step 2: Repack</strong><br />
Go to &#8220;Payload/<app_name>.app/book/&#8221; inside the unpacked app directory.<br />
Now, run these commands (Work in Linux. Maybe there is some analogous commands for other OSes):</p>
<blockquote><p>zip -q0X my_book.epub mimetype<br />
zip -qXr9D my_book.epub *</p></blockquote>
<p>credits: <a href="http://www.snee.com/bobdc.blog/2008/03/creating-epub-files.html">bobdc.blog</a></p>
<p><strong>Step 3: Upload to Stanza </strong><br />
There are a few methods. All of them are over WiFi (i.e.  you need to have you iPhone connected to the same Wireless network as your compute). They are listed <a href="http://www.lexcycle.com/faq/how_to_get_books_onto_stanza_iphone">here</a></p>
<p>Of course, if you have many books, you might save time by recruiting a script to do most of the work instead of doing it manually <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Convert Oreilly Stand Alone iPhone Books to epub Format" /> </p>
<p>Credits for collecting the pieces together: <a href="http://getsatisfaction.com/oreilly/topics/stanza_and_standalone_oreilly_books_on_iphone#reply_2094762">Sanders Kleinfeld at getsatisfication.</a></p>
<p>Have fun <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="Convert Oreilly Stand Alone iPhone Books to epub Format" /> </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/">Convert O&#8217;reilly Stand-Alone iPhone Books to epub Format</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format+http://bit.ly/9fxQA6" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/&amp;title=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/&amp;title=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/&amp;t=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/&amp;title=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/&amp;title=Convert+O%E2%80%99reilly+Stand-Alone+iPhone+Books+to+epub+Format" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Convert Oreilly Stand Alone iPhone Books to epub Format" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=0hQbbjOUSa8:TnDM5x2g-0U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=0hQbbjOUSa8:TnDM5x2g-0U:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=0hQbbjOUSa8:TnDM5x2g-0U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=0hQbbjOUSa8:TnDM5x2g-0U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=0hQbbjOUSa8:TnDM5x2g-0U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=0hQbbjOUSa8:TnDM5x2g-0U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=0hQbbjOUSa8:TnDM5x2g-0U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/0hQbbjOUSa8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/04/29/convert-oreilly-stand-alone-iphone-books-to-epub-format/</feedburner:origLink></item>
		<item>
		<title>Vim Tip – Convert Code To HTML</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/8E0c1vVV0PI/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 19:10:59 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Vim]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=558</guid>
		<description><![CDATA[If you wrote some elegant code, and want to publish it as a HTML page, you can easily do that in vim: In command mode, type this: :TOhtml A new buffer will be opened with the HTML source, just save it: :wq If the original file name was &#8220;mycode.c&#8221;, you&#8217;ll find a new file in [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/">Vim Tip &#8211; Convert Code To HTML</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you wrote some elegant code, and want to publish it as a HTML page, you can easily do that in vim:<br />
In command mode, type this:</p>
<blockquote><p>
:TOhtml
</p></blockquote>
<p>A new buffer will be opened with the HTML source, just save it:</p>
<blockquote><p>
:wq
</p></blockquote>
<p>If the original file name was &#8220;mycode.c&#8221;, you&#8217;ll find a new file in the same directory named &#8220;mycode.c.html&#8221;. Open it with your favourite web browser.</p>
<p>Wow, not?<br />
Have fun <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Vim Tip   Convert Code To HTML" />  </p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/">Vim Tip &#8211; Convert Code To HTML</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Vim+Tip+%E2%80%93+Convert+Code+To+HTML+http://bit.ly/aPacpt" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Vim Tip   Convert Code To HTML" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/&amp;title=Vim+Tip+%E2%80%93+Convert+Code+To+HTML" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Vim Tip   Convert Code To HTML" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/&amp;title=Vim+Tip+%E2%80%93+Convert+Code+To+HTML" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Vim Tip   Convert Code To HTML" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/&amp;t=Vim+Tip+%E2%80%93+Convert+Code+To+HTML" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Vim Tip   Convert Code To HTML" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/&amp;title=Vim+Tip+%E2%80%93+Convert+Code+To+HTML" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Vim Tip   Convert Code To HTML" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/&amp;title=Vim+Tip+%E2%80%93+Convert+Code+To+HTML" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Vim Tip   Convert Code To HTML" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=8E0c1vVV0PI:eX59TOiknew:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=8E0c1vVV0PI:eX59TOiknew:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=8E0c1vVV0PI:eX59TOiknew:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=8E0c1vVV0PI:eX59TOiknew:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=8E0c1vVV0PI:eX59TOiknew:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=8E0c1vVV0PI:eX59TOiknew:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=8E0c1vVV0PI:eX59TOiknew:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/8E0c1vVV0PI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/04/24/vim-tip-convert-code-to-html/</feedburner:origLink></item>
		<item>
		<title>Bash Tip – Separate a Bash Variable From Surrounding Letters</title>
		<link>http://feedproxy.google.com/~r/Amirwatadcom/~3/WT6UqGDxRlI/</link>
		<comments>http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 22:25:05 +0000</pubDate>
		<dc:creator>Amir Watad</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[TIps]]></category>

		<guid isPermaLink="false">http://www.amirwatad.com/blog/?p=556</guid>
		<description><![CDATA[Sometimes, you might find yourself needing to concatenate the value of a bash variable with a string. I think it&#8217;s best demonstrated with (a somewhat artificial) example: 123y=h echo $yome #won't work. will print the value of the variable &#34;yome&#34; which is a null string (since it's not set) echo ${y}ome #works. will print &#34;home&#34; [...]<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/">Bash Tip &#8211; Separate a Bash Variable From Surrounding Letters</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you might find yourself needing to concatenate the value of a bash variable with a string.<br />
I think it&#8217;s best demonstrated with (a somewhat artificial) example:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">y</span>=h<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$yome</span> <span style="color: #666666; font-style: italic;">#won't work. will print the value of the variable &quot;yome&quot; which is a null string (since it's not set)</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${y}</span>ome <span style="color: #666666; font-style: italic;">#works. will print &quot;home&quot;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s it, the trick is to use the curly brackets ${var} to separate the variable from its surrounding.</p>
<p>Have fun <img src='http://www.amirwatad.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /> </p>
<p>source: <a href="http://twitter.com/bashcookbook/statuses/2241130135">@bashcookbook</a></p>
<p>---------
Note:
Some RSS readers might display this post with incorrect format.
View original post at <a href="http://www.amirwatad.com/blog">AmirWatad.com </a><br/><br/><a href="http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/">Bash Tip &#8211; Separate a Bash Variable From Surrounding Letters</a></p>
<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters+http://bit.ly/afnBGF" title="Post to Twitter"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/&amp;title=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters" title="Post to Delicious"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/&amp;title=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters" title="Post to Digg"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-digg-big3.png" alt="Post to Digg" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a> <a target="_blank" class="tt" href="http://www.facebook.com/share.php?u=http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/&amp;t=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters" title="Post to Facebook"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big3.png" alt="Post to Facebook" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/&amp;title=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters" title="Post to Reddit"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit-big3.png" alt="Post to Reddit" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/&amp;title=Bash+Tip+%E2%80%93+Separate+a+Bash+Variable+From+Surrounding+Letters" title="Post to StumbleUpon"><img class="nothumb" src="http://www.amirwatad.com/blog/wp-content/plugins/tweet-this/icons/tt-su-big3.png" alt="Post to StumbleUpon" title="Bash Tip   Separate a Bash Variable From Surrounding Letters" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=WT6UqGDxRlI:nxPEVCIhSg0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=WT6UqGDxRlI:nxPEVCIhSg0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=WT6UqGDxRlI:nxPEVCIhSg0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=WT6UqGDxRlI:nxPEVCIhSg0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=WT6UqGDxRlI:nxPEVCIhSg0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Amirwatadcom?a=WT6UqGDxRlI:nxPEVCIhSg0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Amirwatadcom?i=WT6UqGDxRlI:nxPEVCIhSg0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Amirwatadcom/~4/WT6UqGDxRlI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amirwatad.com/blog/archives/2010/04/24/bash-tip-separate-a-bash-variable-from-surrounding-letters/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.684 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-28 19:40:00 -->
