<?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>IdNotFound's Little Internet Corner</title>
	<atom:link href="http://idnotfound.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://idnotfound.wordpress.com</link>
	<description>A place for blogging and babbling about Technology and related interests.</description>
	<lastBuildDate>Sat, 28 Jan 2012 10:22:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='idnotfound.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>IdNotFound's Little Internet Corner</title>
		<link>http://idnotfound.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://idnotfound.wordpress.com/osd.xml" title="IdNotFound&#039;s Little Internet Corner" />
	<atom:link rel='hub' href='http://idnotfound.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Pointers for making good use of your processing cores</title>
		<link>http://idnotfound.wordpress.com/2010/06/27/pointers-for-making-good-use-of-your-processing-cores/</link>
		<comments>http://idnotfound.wordpress.com/2010/06/27/pointers-for-making-good-use-of-your-processing-cores/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 02:19:58 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[GNU utilities]]></category>
		<category><![CDATA[parallelization]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=86</guid>
		<description><![CDATA[In the era of multicore processors, one may ask himself &#8220;how do I make use of all this processing power on my hands?&#8221;. I won&#8217;t be writing any in-depth material here, but rather spreading out some interesting pointers. If you are coding in C/C++, you can give OpenMP a try. I haven&#8217;t tried it yet, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=86&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the era of multicore processors, one may ask himself &#8220;how do I make use of all this processing power on my hands?&#8221;. I won&#8217;t be writing any in-depth material here, but rather spreading out some interesting pointers.</p>
<p>If you are coding in <strong>C/C++</strong>, you can give <a href="http://openmp.org" target="_blank"><strong>OpenMP</strong></a> a try. I haven&#8217;t tried it yet, but I surely want to, as it seems extremely easy: you just add a couple <code>#pragma</code> instructions in your code and it automagically parallelizes it for you! Really, check our their tutorials!</p>
<p>For those that are more <strong>Python</strong>-oriented, like me, you can try <a href="http://www.parallelpython.com/" target="_blank"><strong>Parallel Python</strong></a>. Not only it can explore the available cores in your computer, but it may also use cores in other computers connected in your local network! I did some testing of this and it worked remarkably well. I plan on doing something fun with this someday.</p>
<p>Last, but not least, if you just have to <strong>run the same application several times</strong> and would like to use your several cores instead of queueing it all on a single one, then you might want to learn something about <strong><code>xargs</code></strong>&#8230; It can do the job for you!</p>
<p>Detailed explanation of the use of <code>xargs</code> is out of the scope of this blog post, so I&#8217;ll just point you to the <strong><code>-P</code></strong> switch: it controls how many simultaneous processes it should run at a time. As soon as one terminates, it spawns another one. Great, isn&#8217;t it? Credit goes to <a href="http://efod.se/blog/archive/2009/05/30/parallelization-with-xargs" target="_blank">this blog</a>.</p>
<p>What about you? Any tips for exploring the processing powers of multicore CPUs? Share in the comments!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=86&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2010/06/27/pointers-for-making-good-use-of-your-processing-cores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Avoiding SSH timeouts</title>
		<link>http://idnotfound.wordpress.com/2010/06/10/avoiding-ssh-timeouts/</link>
		<comments>http://idnotfound.wordpress.com/2010/06/10/avoiding-ssh-timeouts/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 22:11:42 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=81</guid>
		<description><![CDATA[I use SSH a lot, and it is a pain when my session times out. This often happens when I step away from the task at hand for a couple minutes. Most of the time, this task is editing a file in vim, and I end up having to restore the file, delete the swap [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=81&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I use SSH a lot, and it is a pain when my session times out. This often happens when I step away from the task at hand for a couple minutes. Most of the time, this task is editing a file in vim, and I end up having to restore the file, delete the swap file, etc. Not fun.</p>
<p>My solution for a while was to use <code>screen</code>. This way, I reconnect and continue where I stopped. Better, but the timeouts are still annoying as my terminal becomes unresponsive and I have to close it and reconnect on a new one.</p>
<p>So I decided it was time to solve this. Turns out a simple Google Search found the solution on <a href="http://ocaoimh.ie/how-to-fix-ssh-timeout-problems/" target="_blank">this blog</a>, and it is dead simple:</p>
<p>Edit your <code>~/.ssh/config</code> file and add a line containing <code>ServerAliveInterval 60</code>. This sends a keep-alive packet every 60 seconds, which is more than enough to keep your connection from timing out.</p>
<p>Painless, right? Now go and configure your machine, too!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=81&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2010/06/10/avoiding-ssh-timeouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Easy file sharing with Python</title>
		<link>http://idnotfound.wordpress.com/2010/04/07/easy-file-sharing-with-python/</link>
		<comments>http://idnotfound.wordpress.com/2010/04/07/easy-file-sharing-with-python/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 22:29:36 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=62</guid>
		<description><![CDATA[I have previously blogged about On-demand Web Server with Python, which is great to serve files you want people (or even yourself, remotely) to download from your computer. Unfortunately, it is unidirectional: people cannot upload files back to you. Luckily, that&#8217;s what we are going to address in this post! One day I was determined [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=62&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have previously blogged about <a href="/2008/02/20/on-demand-web-server-with-python/" target="_blank">On-demand Web Server with Python</a>, which is great to serve files you want people (or even yourself, remotely) to download from your computer. Unfortunately, it is unidirectional: people cannot upload files back to you. Luckily, that&#8217;s what we are going to address in this post!</p>
<p><span id="more-62"></span></p>
<p>One day I was determined to make file uploads work, and started Googling. I didn&#8217;t really find out an easy way to do this, but found two very friendly scripts that do exactly this. They&#8217;re only a single file, so it is very easy to &#8220;install&#8221;: just place them somewhere convenient and put it in your <code>PATH</code> environment variable. (Personally, I just copied them to <code>/usr/local/bin</code>)</p>
<h2>droopy</h2>
<p>The first one is also unidirectional, but on the direction that complements the trick in the previously mentioned post. <a href="http://stackp.online.fr/droopy" target="_blank">Droopy</a> allows you to open a web server that displays a single upload file field. Simple as that.</p>
<p>You can just run it without any parameters and receive files on the current working directory, or you can configure the directory and port, along with a display message and even a picture that will show up on the page for your uploaders.</p>
<p>Also, don&#8217;t worry about them overriding your files. A quick test will show you that droopy will append numbers to files that would otherwise overwrite your original ones.</p>
<h2>quickserve</h2>
<p>This one allows file sharing in both directions: download and upload. <a href="http://xyne.archlinux.ca/info/quickserve" target="_blank">Quickserve</a> is a little bit more verbose than previous solutions, but not inconvenient in any way.</p>
<p>To serve files, you must provide a upload directory as a command-line parameter, but a smart user will just type in &#8220;.&#8221; for the current working directory. To serve them, you will need to type in a bit more: <code>--upload=.</code> but perfectly manageable.</p>
<p>Differently from droopy, quickserve will overwrite files by default. This could be a desireable feature, just maybe not as default. To avoid this, add <code>--no-clobber</code> to your command line and numbers will be appended to them.</p>
<p>An ideal command line would be as long as <code>quickserve . --upload=. --no-clobber</code>, but nothing you can&#8217;t keep on a conveniently placed shell script.</p>
<h2>Conclusions</h2>
<p><strong>Droopy</strong> is probably your first choice because of its simplicity, but <strong>quickserve</strong> is a much more complete solution, so I&#8217;d grab them both and decide which one to use depending on the situation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=62&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2010/04/07/easy-file-sharing-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Word-by-word diffs in Git</title>
		<link>http://idnotfound.wordpress.com/2009/05/09/word-by-word-diffs-in-git/</link>
		<comments>http://idnotfound.wordpress.com/2009/05/09/word-by-word-diffs-in-git/#comments</comments>
		<pubDate>Sun, 10 May 2009 02:24:00 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=22</guid>
		<description><![CDATA[I personally like all my LaTeX files wrapped at about 80 columns, with rare exceptions. Of course, I track them all with Git. I use Vim, so it&#8217;s really easy to rewrap a paragraph whenever I add or delete content from it. The sad thing is, it totally screws up my diffs! Have you ever [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=22&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I personally like all my LaTeX files wrapped at about 80 columns, with rare exceptions. Of course, I track them all with <a href="http://git-scm.com" target="_blank">Git</a>. I use Vim, so it&#8217;s really easy to rewrap a paragraph whenever I add or delete content from it. The sad thing is, it totally screws up my diffs!</p>
<p>Have you ever tried looking at the history for any page in Wikipedia? It&#8217;s beautiful, intuitive, and word-centered. Forget about lines, they&#8217;re not suitable for text. Words, however, are.</p>
<div id="attachment_29" class="wp-caption aligncenter" style="width: 490px"><a href="http://en.wikipedia.org/w/index.php?title=LaTeX&amp;diff=274474135&amp;oldid=274471077" target="_blank"><img class="size-full wp-image-29" title="Wikipedia Diff Example" src="http://idnotfound.files.wordpress.com/2009/05/wikipedia-diff-example3.png?w=780" alt="Example of the word-by-word diff in Wikipedia"   /></a><p class="wp-caption-text">Example of the word-by-word diff in Wikipedia</p></div>
<p>Well, version control systems use the line-by-line diffs, which don&#8217;t really help when comparing two versions of a text file. What to do now?</p>
<p><span id="more-22"></span></p>
<p>I have googled a bit, and found about <a href="http://www.gnu.org/software/wdiff/wdiff.html" target="_blank">wdiff</a>. Seemed interesting, but the output was really ugly. I first thought of using it as an external diff tool in git, but gave up. Nice to know it exists, though.</p>
<p>Then, for some reason, I decided to read the git-diff help one more time and, to my surprise, <strong>the feature we want is already there</strong>! Introducing to you&#8230; <code><strong>git diff --color-words</strong></code>!</p>
<div id="attachment_56" class="wp-caption aligncenter" style="width: 418px"><img class="size-full wp-image-56" title="git diff --color-words" src="http://idnotfound.files.wordpress.com/2009/05/git-diff-color-words2.png?w=780" alt="Sample output of &lt;code&gt;git diff --color-words&lt;/code&gt;"   /><p class="wp-caption-text">Sample output of <code>git diff --color-words</code></p></div>
<p>Amazing, right? Notice how deleted words are in <strong><span style="color:#ff0000;">red</span></strong>, added words in <span style="color:#008000;"><strong>green</strong></span>, and the unchanged text surrounding it in <strong>white</strong> (or <strong>black</strong>, if you&#8217;re not into dark backgrounds). Much more natural and easier to spot differences than the original <code>git diff</code>! But you should be asking yourself &#8220;Am I going to have to write this long command every time?&#8221;. Certainly not! Git allows you to create <a href="http://git.or.cz/gitwiki/Aliases" target="_blank">aliases</a>, which I just learned about. You can create an alias named <strong>wdiff</strong>, and the result is a new command, <strong><code>git wdiff</code></strong>, that perfectly fits our needs! Great, isn&#8217;t it?</p>
<p>Here&#8217;s two ways to do it:</p>
<ul>
<li>Via command-line: <strong><code>git config --global alias.wdiff diff --color-words</code></strong>; or</li>
<li>Editing your <strong><code>~/.gitconfig</code></strong>, add the following lines:<br />
<strong><code>[alias]<br />
&nbsp;&nbsp;&nbsp;&nbsp;wdiff = diff --color-words<br />
</code></strong></li>
</ul>
<p>Piece of cake, right? Hope you liked it, and happy word-diffing! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p><strong></strong><em>Special thanks to my friend Carlos Eduardo, who helped me find a good way to illustrate the word-by-word diff!</em></p>
<h3>Update: Better tokenization for LaTeX files</h3>
<p>It seems that <a href="http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.6.2.txt" target="_blank">Git 1.6.2 and earlier</a> now support the use of a regular expression to define what is a word for <code>--color-words</code>. Also, the <a href="http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html" target="_blank">manpage for the .gitattributes file</a> shows that some filetypes already have useful built-in configurations, including the regular expressions in question, and LaTeX is one of those formats.</p>
<p>In practical terms, this means that <code>\section{Title}</code> can now be seen as several tokens instead of a single word, so renaming the section will provide you with a smarter highlighting.</p>
<p>So, if you don&#8217;t have a <strong>.gitattributes</strong> file yet, you should create one. I just found out about them, and it&#8217;s pretty cool. It adds other interesting functionalities such as hints on the diffs for which point in the file (for instance, the LaTeX chapter/(sub)section name) those diffs are taking place. The manpages can tell you more about it, so I&#8217;ll keep it short. It&#8217;s very easy to enable this, just add the following line to a <strong><code>.gitattributes</code></strong> file in your repository (its syntax is very similar to <code>.gitignore</code>) and everything is set for you:</p>
<p><strong><code>*.tex&nbsp;&nbsp;&nbsp;&nbsp;diff=tex</code></strong></p>
<p>Even if your version is older than 1.6.2, the other benefits are much probably available for you and are well worth it, so give it a try anyway!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=22&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2009/05/09/word-by-word-diffs-in-git/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>

		<media:content url="http://idnotfound.files.wordpress.com/2009/05/wikipedia-diff-example3.png" medium="image">
			<media:title type="html">Wikipedia Diff Example</media:title>
		</media:content>

		<media:content url="http://idnotfound.files.wordpress.com/2009/05/git-diff-color-words2.png" medium="image">
			<media:title type="html">git diff --color-words</media:title>
		</media:content>
	</item>
		<item>
		<title>More comfortable reading on the computer screen</title>
		<link>http://idnotfound.wordpress.com/2009/04/04/more-comfortable-reading-on-the-computer-screen/</link>
		<comments>http://idnotfound.wordpress.com/2009/04/04/more-comfortable-reading-on-the-computer-screen/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 06:26:34 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[invert]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[negative]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=17</guid>
		<description><![CDATA[Reading PDFs and long texts on the screen has always been something that bothered me and most people I know. It&#8217;s just not comfortable! Well, today a colleague of mine showed me something that feels like a solution so good that I wonder why it took me so long to actually stumble upon it. It&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=17&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Reading PDFs and long texts on the screen has always been something that bothered me and most people I know. It&#8217;s just not comfortable! Well, today a colleague of mine showed me something that feels like a solution so good that I wonder why it took me so long to actually stumble upon it.</p>
<p><span id="more-17"></span></p>
<p>It&#8217;s quite common for programmers to use light-colored text on dark background. It is much more true for those keen on Linux and terminals. That&#8217;s because the dark background emits less light, and thus makes it more comfortable for the eyes if you&#8217;re going to stare at it for a long time, like we programmers do.</p>
<p>What about reading? Isn&#8217;t that just the same? Long hours, staring at a PDF full of dark letters on white background. Wouldn&#8217;t it be more comfortable the other way around? As a matter of fact, it is! But how do we do that?</p>
<p>Well, my colleague uses a Mac, and the key combination to invert the colors of your screen apparently is <strong>Command+Option+Control+8</strong>. Counter-intuitive, I know. More info and a graphical way to do it can be found on<a href="http://www.wikihow.com/Invert-Colors-on-a-Mac" target="_blank"> this link</a>, which Google helped me find. On Linux, if you use Compiz, there&#8217;s a nice plugin that should probably be already installed (I know it is on my Ubuntu) called Negative. It was also enabled by default, and the key combinations are <strong>Super+N</strong> for the active window and <strong>Super+M</strong> for the whole screen. If you&#8217;re a Windows user&#8230; Well, Google didn&#8217;t help much, but if you know an easy way to do it in Windows, please leave a comment!</p>
<p>After all this time using Compiz, I finally understand why someone would ever use the Negative plugin&#8230; Being a dark background terminal kind of guy, I really wish I had thought of this sooner! <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=17&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2009/04/04/more-comfortable-reading-on-the-computer-screen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>A bash &#8220;plugin&#8221;: timelast</title>
		<link>http://idnotfound.wordpress.com/2008/10/14/a-bash-plugin-timelast/</link>
		<comments>http://idnotfound.wordpress.com/2008/10/14/a-bash-plugin-timelast/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 04:11:28 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=13</guid>
		<description><![CDATA[Did you ever run a process in a terminal that took longer than you expected to finish, and like such, you wanted to know how long it took? Since you didn&#8217;t know it would be a long one, you thought running it with time was unnecessary, or maybe you just forgot it&#8230; Now what? Wouldn&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=13&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Did you ever run a process in a terminal that took longer than you expected to finish, and like such, you wanted to know how long it took? Since you didn&#8217;t know it would be a long one, you thought running it with <code>time</code> was unnecessary, or maybe you just forgot it&#8230; Now what?</p>
<p>Wouldn&#8217;t it be awesome if you could find out how long that process took to run? How about if it were as simple as typing <strong><code>timelast</code></strong> or another command that makes sense to you? Well, awesomeness now exists. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p><span id="more-13"></span></p>
<p>I&#8217;ve poked around and have put together a script that, once sourced from your <code>.bashrc</code>, will give you this exact functionality I just talked about. Take a look at a quick example:</p>
<p style="padding-left:30px;"><code>[eduardo@dudubuntu:~]$ sleep 3s<br />
[eduardo@dudubuntu:~]$ timelast<br />
3s<br />
[eduardo@dudubuntu:~]$ sleep 90s<br />
[eduardo@dudubuntu:~]$ timelast<br />
1m30s<br />
[eduardo@dudubuntu:~]$ sleep 3666s<br />
[eduardo@dudubuntu:~]$ timelast<br />
1h1m6s</code></p>
<p>Cool, uh? The source code is available <a href="http://pastebin.com/f98fc43e" target="_blank">here</a> (sorry about the pastebin, I can&#8217;t upload it to the blog). I&#8217;d say it is fairly well commented, but feel free to contact me if you&#8217;re wondering what is going on under the hood.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=13&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2008/10/14/a-bash-plugin-timelast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up a no-password SSH session</title>
		<link>http://idnotfound.wordpress.com/2008/06/17/setting-up-a-no-password-ssh-session/</link>
		<comments>http://idnotfound.wordpress.com/2008/06/17/setting-up-a-no-password-ssh-session/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 03:27:58 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=11</guid>
		<description><![CDATA[As a (really late) follow up to my earlier post about SSH tricks, here follows some instructions on how to setup a no-password SSH session. As a plus, some cool configuration tips for saving some keystrokes! Well, here it goes. First, you need a pair of keys for your local machine. In case you don&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=11&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As a (really late) follow up to <a title="Multiple terminals in a single SSH session" href="/2008/01/14/multiple-terminals-in-a-single-ssh-session/" target="_blank">my earlier post about SSH tricks</a>, here follows some instructions on how to setup a no-password SSH session. As a plus, some cool configuration tips for saving some keystrokes! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><span id="more-11"></span></p>
<p>Well, here it goes. First, you need a pair of keys for your local machine. In case you don&#8217;t have one already, type this to generate one:</p>
<p><code>$ ssh-keygen -t dsa</code></p>
<p>When asked for a password, leave it blank (hit Enter). This will create two files: <code>~/.ssh/id_dsa</code> and <code>~/.ssh/id_dsa.pub</code>. These are, respectively, your private and public keys.</p>
<p>Now, you want to copy the <strong>public key</strong> (<code>id_dsa.pub</code>) to the remote machine, and copy its contents to the file <code>~/.ssh/authorized_keys</code>, which may not exist yet. Makes sure the permissions for this file do not allow reading or writing for anyone other than you. This is essential, as OpenSSH will not make use of it in case it finds it too permissive. This is for safety reasons, and <code>600</code> is probably a good set of permissions (read/write only for the owner). <del datetime="2010-04-07T22:31:35+00:00">The easiest way to do all this is probably the following sequence of commands:</del></p>
<p><code><del datetime="2010-04-07T22:31:35+00:00">me@local$ cd ~/.ssh<br />
me@local$ sftp username@remotemachine<br />
sftp&gt; cd .ssh<br />
sftp&gt; put id_dsa.pub<br />
sftp&gt; quit<br />
me@local$ ssh username@remotemachine<br />
me@remote$ cd .ssh<br />
me@remote$ cat id_dsa.pub &gt;&gt; authorized_keys<br />
me@remote$ rm id_dsa.pub<br />
me@remote$ chmod 600 authorized_keys<br />
</del></code></p>
<p><del datetime="2010-04-07T22:31:35+00:00">So what I did was send the file using SFTP, appended it to the <code>authorized_keys</code> file (just in case it already existed), and deleted the public key file. I have also made sure the permissions are adequate.</del></p>
<p><strong>Update:</strong> It seems the whole copying-and-setting-permissions step can be replaced by the convenient command <strong>ssh-copy-id</strong>. It is now as simple as <code>ssh-copy-id username@remotemachine</code>.</p>
<p>Now log out, and try logging back in. If everything goes right, you won&#8217;t be asked for a password anymore! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>Additional tips for saving keystrokes</h3>
<p>Ok, now for the bonus part. How about instead of typing long commands such as this:</p>
<p><code>$ ssh remoteuser@remotemachine.something.com</code></p>
<p>you could type just this:</p>
<p><code>$ ssh remote</code></p>
<p>and everything just worked? You can configure it so SSH handles all that for you, saving you some keystrokes. Interested? Ok, here&#8217;s how to do it!</p>
<p>You&#8217;ll need to edit (or create if needed) the file <code>~/.ssh/config</code>, where you can add all configuration parameters you might want, just like in the server&#8217;s configuration file. Here&#8217;s a sample:</p>
<pre>Host remote remotemachine.something.com
    User remoteuser
    HostName remotemachine.something.com
    ForwardX11 yes
    Compression yes</pre>
<p>You could also use <code>*</code> as a host if you wanted to setup stuff for every connection. Sweet, uh?</p>
<p>Hope you liked it! If you want, you can learn more about all this from the <a href="http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html" target="_blank">same</a> <a href="http://upc.lbl.gov/docs/user/sshagent.html" target="_blank">places</a> that I did. Enjoy! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/idnotfound.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/idnotfound.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=11&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2008/06/17/setting-up-a-no-password-ssh-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>On-demand Web Server with Python</title>
		<link>http://idnotfound.wordpress.com/2008/02/20/on-demand-web-server-with-python/</link>
		<comments>http://idnotfound.wordpress.com/2008/02/20/on-demand-web-server-with-python/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 04:08:04 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/?p=5</guid>
		<description><![CDATA[A friend of mine has just showed me something that is not only useful but extremely simple to use. I&#8217;d say it fits the mind-blowing category. How many times have you wanted to serve a file on an HTTP server for someone to download it from? Well, just install Apache, you&#8217;d say. I used to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=5&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A friend of mine has just showed me something that is not only useful but extremely simple to use. I&#8217;d say it fits the mind-blowing category.</p>
<p>How many times have you wanted to serve a file on an HTTP server for someone to download it from? Well, just install Apache, you&#8217;d say. I used to do that, but it feels like overkill. Maybe Lighttpd? I honestly found it was easier to just host it somewhere else than install and configure any of these in case they&#8217;re not already in use.</p>
<p>But here&#8217;s another solution: use <b>Python</b>! It is installed by default on most Linux distributions, if not all. It is so widespread right now that, if you&#8217;re not using it already &#8211; be it for programming or as a dependency for something else you use &#8211; you will need it sooner than you think. And not only it should already be installed, it needs zero configuration!</p>
<p>Fire up your terminal and try this:</p>
<p><code>$ python -m SimpleHTTPServer 8000</code></p>
<p>Next, point your browser to <code>http://localhost:8000</code>. <i>Voilà</i>! You just got yourself a web server! In case you haven&#8217;t tried this yourself yet, a directory listing for the current directory should appear. Close it with <code>Ctrl-C</code> when you&#8217;re done with it.</p>
<p><b>Extra tip:</b> you can create a directory under your home such as <code>webjail</code>, or whatever name suits you, and start your webserver from there. Create symbolic links for stuff you want avaiable so you can keep your other files &#8220;secret&#8221;. Unlike my previous Apache setups with <code>public_html</code>, symlinks do work, so there is no need for hard copies. The only difference from regular files is that they will show a &#8220;@&#8221; appended to the filename on the listing, but that&#8217;s not really an issue, is it? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/idnotfound.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/idnotfound.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=5&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2008/02/20/on-demand-web-server-with-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple terminals in a single SSH session</title>
		<link>http://idnotfound.wordpress.com/2008/01/14/multiple-terminals-in-a-single-ssh-session/</link>
		<comments>http://idnotfound.wordpress.com/2008/01/14/multiple-terminals-in-a-single-ssh-session/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 12:52:50 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://idnotfound.wordpress.com/2008/01/14/multiple-terminals-in-a-single-ssh-session/</guid>
		<description><![CDATA[When I sit to work, I am using linux terminals 95% of the time. And I tend to use lots of them. One for vim, another for compiling and testing, another for checking whatever files the program outputs, and so on&#8230; If you&#8217;re a multiple windows/tabs kind of guy (or gal, why not?) like me, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=3&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I sit to work, I am using linux terminals 95% of the time. And I tend to use lots of them. One for vim, another for compiling and testing, another for checking whatever files the program outputs, and so on&#8230; If you&#8217;re a multiple windows/tabs kind of guy (or gal, why not?) like me, you know what I am talking about!</p>
<p><strong>Ctrl + Shift + N</strong> is my favorite shortcut ever on <code>gnome-terminal</code>, but when I am not physically on the machine but working via SSH, it is not nearly as fun. In fact, it is annoying as hell as it opens a new <em>local</em> terminal, and I have to log in again, go to the path I am interested in, and only then being able to do whatever I want to do (which, sometimes, is pretty quick and I end up closing the terminal, just to regret next time I need it again). Thankfully, I found a nice way to solve this!</p>
<p><span id="more-3"></span></p>
<h3>Normal Use (under Linux)</h3>
<p>Well, a friend of mine reminded me of cool switch that is <code>ssh -X</code>. What it does is enable X11 forwarding. In other words, it redirects to your local (from your point of view) computer all X/graphical applications you run remotely; that is, if you run, let&#8217;s say, <code>gnome-terminal</code>, it will show a terminal on your computer that is actually running on the remote (again, from your point of view) machine.</p>
<p><em>Ok, so what do I do with that?</em> How about <strong>Ctrl + Shift + N</strong>? Cool, uh? <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p>Enough stories, this tip is about opening multiple remote terminals through SSH and only having to log in once. What I do is:</p>
<p><code>$ ssh -X mylogin@remotemachine gnome-terminal<br />
Password: ...<br />
[Ctrl+Z]<br />
$ bg<br />
$ exit</code></p>
<p>Ok, that sounded complicated, so I&#8217;ll go over it line-by-line:</p>
<ol>
<li>The syntax for <code>ssh</code> is <code>ssh [options] [login@]host [command]</code>. So what I am doing is connecting with the <code>-X</code> switch, and running <code>gnome-terminal</code> remotely. If you provide a command like this, after the process terminates, the connection is closed.</li>
<li>I enter my password to connect&#8230;</li>
<li>By now, the terminal we ran remotely should pop on your screen. Go back to your local terminal and hit <strong>Ctrl + Z</strong> to pause the <code>ssh</code> process. You&#8217;ll get a prompt back.</li>
<li>On the prompt, type <code>bg</code>, which unpauses the paused process, but runs it on background.</li>
<li>You now close your terminal with <code>exit</code>. It is important to use <code>exit</code> and <strong>not</strong> clicking on the close button from your window manager, otherwise the <code>ssh</code> process we sent to background will be terminated too, and your remote terminals will disappear. I&#8217;m not sure why, but it works like that.</li>
</ol>
<p>Now you try it&#8230; It&#8217;s fun, isn&#8217;t it? But why, oh why haven&#8217;t I just gone with the <code>ssh -X mylogin@remotemachine gnome-terminal <strong>&amp;</strong></code> one-liner? Well, because I couldn&#8217;t type my password that way. I know there are ways to allow direct login without password, but <span style="text-decoration:line-through;">I have never fiddled with that</span> that&#8217;s covered in <a title="Setting up a no-password SSH session" href="/2008/06/17/setting-up-a-no-password-ssh-session/" target="_blank">anoter post</a>. In case you got direct login working, you could use the one-liner.</p>
<p>If you&#8217;re not much into GNOME, things should probably be just the same with other terminals. However, if you&#8217;re on a Windows machine&#8230; fear not, as you can use this too!</p>
<h3>Using it under Windows</h3>
<p>A friend once told me about a X Server you can install on Windows that, along with <a href="http://www.putty.nl" target="_blank">PuTTY</a> (a.k.a. <em><a title="This is actually a quote from PuTTY's FAQ!" href="http://www.putty.nl/faq.html#faq-meaning" target="_blank">the stuff that makes your Windows useful</a></em>), can be used to make your terminal windows pop as if you were running Linux! (why aren&#8217;t you, by the way? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</p>
<p>The name of the program is <a href="http://sourceforge.net/projects/xming" target="_blank">Xming</a>, and that&#8217;s all you should need. He gave me the instructions back then, but it&#8217;s been a while, so I found <a href="http://help.nceas.ucsb.edu/index.php/Install_and_run_an_X_server_on_Windows" target="_blank">this (30sec tutorial with screenshots)</a> and <a href="http://www.ece.uvic.ca/computing/win-xsessions.shtml" target="_blank">this (text-only, with some troubleshooting info)</a> on Google, tested it, and it worked nicely. A bit slower than on Linux (and the terminal looked pretty ugly &#8211; maybe I needed to install the fonts package), but worked.</p>
<p>Quick note, although it is out of the scope of this post: you could set up some shortcuts on the system tray icon for applications you launch regularly, like <a href="http://www.straightrunning.com/XmingNotes/#head-144" target="_blank">this</a>. I haven&#8217;t tried it, and it is up to you to learn how. In case you feel like writing a nice tutorial or something, I&#8217;d be happy to post it here.</p>
<h3>Ubuntu Troubleshooting</h3>
<p>I was perfectly able to use the above method to connect to the Fedora machine where I work, but couldn&#8217;t do the same to my home Ubuntu, where the X applications never ran. I googled around, and found <a href="http://www.miscdebris.net/blog/2007/05/24/x11-forwarding-with-openssh-on-bare-ubuntu-server-edition/" target="_blank">this blog post</a> that might be useful for people running Ubuntu Server. However, that is not my case, but the interesting part for me was <a href="http://www.openssh.org/faq.html#2.7" target="_blank">this link on the blog post</a> indicating the necessary configs on <code>/etc/ssh/ssh_config</code> (note it is not the daemon config &#8211; not sure why!) which were turned off for me. After that, everything worked perfectly.</p>
<p>On the same blog, there was also <a href="http://www.miscdebris.net/blog/2007/06/01/speed-up-ssh-x11-forwarding/" target="_blank">this tip for speeding up X11 forwarding</a>, which could be useful eventually.</p>
<h3>Wrapping up</h3>
<p>Hope you liked it. In case you were wondering, yes, this was what got my friend so excited that made me go ahead and create this blog. Took me a while because I wanted to make it all nicely detailed. So if you get all excited too, I&#8217;d love to hear about it on the comments! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/idnotfound.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/idnotfound.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=3&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2008/01/14/multiple-terminals-in-a-single-ssh-session/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://idnotfound.wordpress.com/2008/01/10/hello-world/</link>
		<comments>http://idnotfound.wordpress.com/2008/01/10/hello-world/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 20:48:18 +0000</pubDate>
		<dc:creator>Eduardo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[First blog post&#8230; Why not start with this widespread, familiar sentence us programmers know so well? It was also the title for WordPress&#8217; (automatic) first post, so I thought: why change it? This blog is probably the realization of a long latent, dormant idea of having a personal website. A place to put little programs/utilities [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=1&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First blog post&#8230; Why not start with this widespread, familiar sentence us programmers know so well? It was also the title for WordPress&#8217; (automatic) first post, so I thought: <i>why change it?</i></p>
<p>This blog is probably the realization of a long latent, dormant idea of having a personal website. A place to put little programs/utilities I tend to do every once in a while, be it as a fancy repository for myself in the future or as a place to share with others; ideas or cool things I found out by myself and, as such, have no way to bookmark in <a href="http://del.icio.us" target="_blank">del.icio.us</a> or similar&#8230; <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>It was inspired by a enthusiastic reaction of a friend of mine after I told him of a cool thing I thought of, and which sounded very clever and helpful for me. At that exact moment, I felt the <i>urge</i> to share things with the world, and I went on this blogging spree.</p>
<p>I&#8217;m not sure what the future will bring (if I&#8217;ll keep this on WordPress or if I&#8217;ll eventually take a step further and make a <i>real</i> website), but I plan on posting cool stuff that computer geeks, programmers, linux users and people alike (that should be enough to cover <i>you</i>) might find useful or interesting.</p>
<p>Hope you like it! Please leave a comment when you stop by, it is good to know we&#8217;re not writing to ourselves sometimes, and what people think about it! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/idnotfound.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/idnotfound.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/idnotfound.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/idnotfound.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/idnotfound.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=idnotfound.wordpress.com&amp;blog=2492372&amp;post=1&amp;subd=idnotfound&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://idnotfound.wordpress.com/2008/01/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73adef2b44488d2a86a6d87c3978b86e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IdNotFound</media:title>
		</media:content>
	</item>
	</channel>
</rss>
