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

<channel>
	<title>REVERT TO CONSOLE &#187; Tools</title>
	<atom:link href="http://www.reverttoconsole.com/blog/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reverttoconsole.com</link>
	<description>for f in *;do echo &#124; sed &#039;i\rtc&#039; &#62;&#62; $f;done; java programming et al</description>
	<lastBuildDate>Thu, 25 Aug 2011 15:02:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Accessing Github Using Corkscrew for SSH Tunneling Over HTTP</title>
		<link>http://www.reverttoconsole.com/blog/tools/accessing-github-using-corkscrew-for-ssh-tunneling-over-http/</link>
		<comments>http://www.reverttoconsole.com/blog/tools/accessing-github-using-corkscrew-for-ssh-tunneling-over-http/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 03:45:09 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=941</guid>
		<description><![CDATA[In my last post, I showed how to use corkscrew to access a remote host via an http_proxy. To extend this example, I wanted to use git and my github account. I can do this because github was nice enough to have port 443 available for ssh. Like in my example before, I created a [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.reverttoconsole.com/blog/tools/tunneling-ssh-over-http-proxies-with-corkscrew/">last post</a>, I showed how to use <a href="http://www.agroman.net/corkscrew/">corkscrew</a> to access a remote host via an http_proxy.</p>
<p>To extend this example, I wanted to use git and <a href="https://github.com/jeffhemminger">my github account</a>. I can do this because github was nice enough to have port 443 available for ssh.</p>
<p>Like in my example before, I created a config entry for github:</p>
<pre>
host gh
     user git
     hostname ssh.github.com
     port 443
     proxycommand corkscrew my.http.proxy 8081 %h %p ~/.ssh/proxyauth
</pre>
<p>From there it&#8217;s really easy:</p>
<pre>
> git clone gh:jeffhemminger/dot-emacs.git
</pre>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Faccessing-github-using-corkscrew-for-ssh-tunneling-over-http%2F&amp;title=Accessing+Github+Using+Corkscrew+for+SSH+Tunneling+Over+HTTP" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/tools/accessing-github-using-corkscrew-for-ssh-tunneling-over-http/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tunneling SSH Over HTTP Proxies With Corkscrew</title>
		<link>http://www.reverttoconsole.com/blog/tools/tunneling-ssh-over-http-proxies-with-corkscrew/</link>
		<comments>http://www.reverttoconsole.com/blog/tools/tunneling-ssh-over-http-proxies-with-corkscrew/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 03:44:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=932</guid>
		<description><![CDATA[In some work situations it&#8217;s necessary to implement strict firewalls that block, for example, common ssh ports. In such situations it&#8217;s common that you&#8217;ll be provided with an http-proxy, and this can be used if necessary to tunnel SSH. I&#8217;ve recently had to do this, and this is how I did it, after installing corkscrew: [...]]]></description>
			<content:encoded><![CDATA[<p>In some work situations it&#8217;s necessary to implement strict firewalls that block, for example, common ssh ports.</p>
<p>In such situations it&#8217;s common that you&#8217;ll be provided with an http-proxy, and this can be used if necessary to tunnel SSH.</p>
<p>I&#8217;ve recently had to do this, and this is how I did it, after installing <a href="http://www.agroman.net/corkscrew/">corkscrew</a>:</p>
<p>Create a config file in ~/.ssh</p>
<pre>
host myremoteserver
    user username
    hostname my.remote.domain
    port 443
    proxycommand corkscrew my.http.proxy 8081 %h %p ~/.ssh/proxyauth
</pre>
<p>Create an auth file containing your proxy username and password (I added mine to ~/.ssh/proxyauth in the above example)</p>
<pre>
username:password
</pre>
<p>Now, to ssh to the remote server:</p>
<pre>
ssh myremoteserver
</pre>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Ftunneling-ssh-over-http-proxies-with-corkscrew%2F&amp;title=Tunneling+SSH+Over+HTTP+Proxies+With+Corkscrew" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/tools/tunneling-ssh-over-http-proxies-with-corkscrew/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GIT Commands I Need to Memorize</title>
		<link>http://www.reverttoconsole.com/blog/tools/git-commands-i-need-to-memorize/</link>
		<comments>http://www.reverttoconsole.com/blog/tools/git-commands-i-need-to-memorize/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 18:42:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=599</guid>
		<description><![CDATA[I work as an application developer. Most of my career has been spent in large corporate environments that have configuration management teams, systems administrators, dbas, etc in addition to software engineers. As such I am a version control user, and not an administrator or power user. During my daily routine I commit to a remote [...]]]></description>
			<content:encoded><![CDATA[<p>I work as an application developer. Most of my career has been spent in large corporate environments that have configuration management teams, systems administrators, dbas, etc in addition to software engineers. As such I am a version control <em>user</em>, and not an administrator or power user.</p>
<p>During my daily routine I commit to a remote repo, and I update my existing repo. I regularly compare my local changes with existing ones, and I regularly look at commit history.</p>
<p>I rarely branch code, I rarely check out branches or commit to branches other than the trunk.</p>
<p>I&#8217;ve done this with <a href="http://www.nongnu.org/cvs/">CVS</a> (which still remains my preferred vcs), <a href="http://en.wikipedia.org/wiki/Microsoft_Visual_SourceSafe">Visual Source Safe</a>, <a href="http://subversion.tigris.org/">SVN</a>, and StarTeam (which happens to be my least favorite vcs).</p>
<p>When I first learned about <a href="http://git-scm.com/">GIT</a> a couple of years ago, I was interested to hear that it was somehow different than these other systems.</p>
<p>I&#8217;ve been using GIT very irregularly for the last couple of years, I have a small <a href="http://github.com/ehemminger">github account</a>. But I haven&#8217;t used it enough to commit the standard commands (listed above) to memory. So this then is my meager attempt at doing so:<br />
*** This assumes you&#8217;ve installed git and have <a href="http://help.github.com/git-email-settings/">configured the global settings</a>.</p>
<ul>
<li>
Creating a repo:</p>
<pre>
mkdir project
(create some code in the directory)
cd project
git init
</pre>
<p>
But wait there&#8217;s more&#8230;<br />
This is deceptively easy. In fact you&#8217;re more likely to want to create a local and remote repository, a la github style for example.<br />
In that case, you&#8217;re going to want to do this:</p>
<ol>
<li><a href="http://help.github.com/creating-a-repo/">Create a remote repo</a></li>
<li><a href="http://help.github.com/msysgit-key-setup/">Generate your ssh-keys</a></li>
<li>Git init, like above</li>
<li>
<pre>
git add file_to_commit
git commit -m 'first commit of all files added'
git remote add origin git@github.com:user/git-repo.git
</pre>
</li>
</ol>
</li>
<li>Check out an existing repo:<br />
This is pretty straightforward, but assumes you&#8217;ve set up your ssh-keys.</p>
<pre> git clone [url] </pre>
</li>
<li> Commit local changes:<br />
Once you start working, a benefit of having a local repository is that you can commit a lot, without having to worry about breaking a continuous integration environment in the process.<br />
This is pretty much the same as with other vcs.<br />
First add:</p>
<pre> git add somefile.txt </pre>
<p>Then commit:</p>
<pre> commit -m 'my message' </pre>
<p>Caveat:</p>
<ul>
<li> It&#8217;s probably useful to add a couple of files at once, rather than one at a time:
<pre> git add one.txt two.txt </pre>
<p> or</p>
<pre> git add 'documentation/*.screen' </pre>
<p> will recursively add all new files ending with .screen from the documentation directory
</li>
<li>
<pre> git status -s </pre>
<p> will tell you what has been added, and what has been changed since the add. (-s is for short format)
</li>
<li> Commit changes to remote repo
<pre> git push origin master </pre>
</li>
</ul>
</li>
<li>
Remove stuff:</p>
<pre> git rm file </pre>
<p>will remove the file from the staging area entirely and also off your disk.</p>
<pre> git rm -r dir </pre>
<p>recursive delete
</li>
<li>
Check what&#8217;s been committed:<br />
This is different than status because I want to know what&#8217;s different between my remote repo and my local one.</p>
<pre> git diff --stat master...origin</pre>
<p>Git will automatically figure out what the common commit of the two commit is and do the diff off of that.
</li>
</ul>
<p>Hat tips:<br />
<a href="http://gitref.org/index.html">Git Reference</a> &#8211; my favorite site I&#8217;ve found explaining git. It&#8217;s practical, provides examples, and the authors don&#8217;t go out of their way to make simple concepts seem complex. I&#8217;ve paraphrased a few of their examples here.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fgit-commands-i-need-to-memorize%2F&amp;title=GIT+Commands+I+Need+to+Memorize" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/tools/git-commands-i-need-to-memorize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion, JavaHL, and Eclipse on Linux</title>
		<link>http://www.reverttoconsole.com/blog/linux/subversion-javahl-and-eclipse-on-linux/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/subversion-javahl-and-eclipse-on-linux/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 12:40:00 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=589</guid>
		<description><![CDATA[I normally use emacs and command line svn when working at home on Linux. Eclipse to me, in principle, is a necessary evil of programming with larger groups. But a recent volunteer project I&#8217;ve been working on for the Philippine Scholars of Minnesota is forcing me out of this habit. And with this change, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I normally use emacs and command line svn when working at home on Linux. Eclipse to me, in principle, is a necessary evil of programming with larger groups. But a recent volunteer project I&#8217;ve been working on for the <a href="http://www.philippinescholars.org/">Philippine Scholars of Minnesota</a> is forcing me out of this habit.</p>
<p>And with this change, I&#8217;ve suddenly been introduced to the world of <a href="http://subclipse.tigris.org/wiki/JavaHL">JavaHL</a>. So what is JavaHL? Per the previous link, it&#8217;s the Java language binding for the Subversion API. On Windows the subclipse project is able to package JavaHL, but not on other operating systems. So that&#8217;s why I&#8217;ve never had to deal with it before.</p>
<p>Fortunately, after finding out what JavaHL actually is, it&#8217;s pretty easy to install on Ubuntu, as you might expect:</p>
<pre>
sudo apt-get install libsvn-java
</pre>
<p>This will install JavaHL to /usr/lib/jni as a standard install, and this is where eclipse will look for it by default. If you&#8217;ve installed it in a non-standard way, you might want to look at <a href="http://islandlinux.org/howto/installing-javahl-subclipseeclipse-ubuntu">this link</a> regarding overwriting the java.library.path with an eclipserc file.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsubversion-javahl-and-eclipse-on-linux%2F&amp;title=Subversion%2C+JavaHL%2C+and+Eclipse+on+Linux" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/subversion-javahl-and-eclipse-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick command line spell check of a single word or sentence</title>
		<link>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:43:53 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=413</guid>
		<description><![CDATA[Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line. It&#8217;s simple but effective. If anyone else knows a cleaner or even simpler way, please let us know. #!/bin/bash WORD=$1 TEMPFILE=temp.spell echo $WORD > $TEMPFILE aspell -c $TEMPFILE cat $TEMPFILE rm -f $TEMPFILE rm -f $TEMPFILE.bak [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line.  It&#8217;s simple but effective.  If anyone else knows a cleaner or even simpler way, please let us know.</p>
<p><code><br />
#!/bin/bash</p>
<p>WORD=$1<br />
TEMPFILE=temp.spell</p>
<p>echo $WORD > $TEMPFILE<br />
aspell -c $TEMPFILE<br />
cat $TEMPFILE<br />
rm -f $TEMPFILE<br />
rm -f $TEMPFILE.bak<br />
</code></p>
<p>I named this script &#8220;spell&#8221;.  Simply use it like so:<br />
<code><br />
$ spell reccomend<br />
</code></p>
<p>Aspell will run and you can make your changes.<br />
<code><br />
reccomend</p>
<p>1) recommends                           6) commend<br />
2) recommend                            7) recommenced<br />
3) reckoned                             <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> recommended<br />
4) regiment                             9) Redmond<br />
5) recombined                           0) rejoined<br />
i) Ignore                               I) Ignore all<br />
r) Replace                              R) Replace all<br />
a) Add                                  l) Add Lower<br />
b) Abort                                x) Exit<br />
</code></p>
<p>In this case, if I type &#8220;2&#8243;, the correction will be made, aspell will exit and the spelling I chose gets printed out.</p>
<p>Here&#8217;s an example of how to use it with a sentence.<br />
<code><br />
$ spell "I go to the storede and buy beakh clotes"<br />
</code></p>
<p>Now aspell will take you through each misspelled word.  After you finish the corrections it will exit and print out the corrected sentence or series of words.<br />
<code><br />
I go to the store and buy beach clothes<br />
</code></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mcabber Update</title>
		<link>http://www.reverttoconsole.com/blog/linux/mcabber-update/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/mcabber-update/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 09:22:55 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=406</guid>
		<description><![CDATA[The only thing I wanted to add to this, It&#8217;s nice to filter you list of users based on their status. If someone is offline, for example, I don&#8217;t want to see them in my list. Likewise if they&#8217;re away. from inside mcabber, type: /roster hide_offline or, set an entry in your configuration. From the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.reverttoconsole.com/blog/nix/revert-to-console-for-im-gtalk-example-using-mcabber/">The only thing I wanted to add to this</a>,</p>
<p>It&#8217;s nice to filter you list of users based on their status. If someone is offline, for example, I don&#8217;t want to see them in my list. Likewise if they&#8217;re away.</p>
<p>from inside mcabber, type:<br />
/roster hide_offline</p>
<p>or, set an entry in your configuration. <a href="http://www.lilotux.net/~mikael/mcabber/files/mcabberrc.example">From the sample mcabber config</a>:</p>
<p># You can set up a mask to filter buddies and display them according to<br />
# their status.  The mask should contain the shortcut letters of the<br />
# status you want to see ([o]nline, [f]ree_for_chat, [d]o_not_disturb,<br />
# [n]ot_available, [a]way, [_]offline).<br />
# For example, to display everybody the filter should be &#8220;ofdna_&#8221; (default).<br />
# To display only the connected buddies, use &#8220;ofdna&#8221;.<br />
# Please note that this option is only used at startup (once mcabber is<br />
# running you can use &#8220;/roster display&#8221;).<br />
#set roster_display_filter = ofdna_</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmcabber-update%2F&amp;title=Mcabber+Update" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/mcabber-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Xresources</title>
		<link>http://www.reverttoconsole.com/blog/linux/my-xresources/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/my-xresources/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 09:59:59 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=402</guid>
		<description><![CDATA[I put this in a file, .Xresources, in my home directory. It is loaded automatically each time I create a new shell, I&#8217;m not sure if it&#8217;s enabled by default or if something I installed did it. ! rxvt settings rxvt*font: 12X15 rxvt*saveLines: 1500 rxvt*scrollBar_right: true # Index color index cyan black ~l # Mailing [...]]]></description>
			<content:encoded><![CDATA[<p>I put this in a file, .Xresources, in my home directory. It is loaded automatically each time I create a new shell, I&#8217;m not sure if it&#8217;s enabled by default or if something I installed did it.</p>
<pre lang="bash" line="1">
! rxvt settings
rxvt*font: 12X15
rxvt*saveLines: 1500
rxvt*scrollBar_right: true

# Index
color index     cyan           black  ~l      # Mailing list
color index     yellow         black  ~N      # New
color index     yellow         black  ~O      # Old
color index     magenta        black  "! ~C ." # No To: or Cc: (newsdeliver)
color index     blue           black  ~T      # Tagged
color index     white          red    ~F      # Flagged (important)
color index     red            black  ~D      # Deleted

# Quoted messages
color quoted    yellow          black
color quoted1   red             black
color quoted2   cyan            black
color quoted3   green           black
color signature magenta         black

# Smileys:   <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   :-/  <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />
color body      brightwhite     black "[;:]-[)/(|]"
</pre>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-xresources%2F&amp;title=My+Xresources" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/my-xresources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating JavaScript Tests with Continuous Integration</title>
		<link>http://www.reverttoconsole.com/blog/javascript/integrating-javascript-tests-with-continuous-integration/</link>
		<comments>http://www.reverttoconsole.com/blog/javascript/integrating-javascript-tests-with-continuous-integration/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:35:21 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=384</guid>
		<description><![CDATA[At my current client I&#8217;ve been building a rather complex rich client app using ExtJs. The team has written a lot of JavaScript code, and has been writing a lot of JavaScript unit tests as well. We&#8217;ve gone through several unit testing tools along the way trying to solve some logistical problems. We started with [...]]]></description>
			<content:encoded><![CDATA[<p>At my current client I&#8217;ve been building a rather complex rich client app using ExtJs. The team has written a lot of JavaScript code, and has been writing a lot of JavaScript unit tests as well.</p>
<p>We&#8217;ve gone through several unit testing tools along the way trying to solve some logistical problems. We started with <a href="http://www.jsunit.net/">JSUnit</a>, added <a href="http://seleniumhq.org">Selenium</a>, switched from <a href="http://www.jsunit.net/">JSUnit</a>t to <a href="http://groups.google.com/group/envjs?pli=1">envjs</a>, and are now using a hybrid approach I&#8217;ll describe in detail.</p>
<p>Some of the issues we wanted to address with our testing tools were:</p>
<ul>
<li>How easy is it to run the tests?</li>
<li>How easy is it to debug the tests?</li>
<li>How easy is it to integrate the tests into our existing continuous integration environment</li>
</ul>
<p>Most of the tools we used easily met the first two logistical issues, but the last one was not as simple.</p>
<p>The following describes an approach that meets all of the above list (after the jump).</p>
<p><span id="more-384"></span></p>
<p>Here is a very simple JavaScript object to test and illustrate the example:</p>
<pre lang="javascript" line="1">
var swineFluIndicator = {
  hasSwineFlu: function(sample) {
    return !!sample.oink ? true : false;
  }
};
</pre>
<p>If the sample has a property &#8220;oink&#8221;, the sample is infected with swine flu. Simple.</p>
<p>To test our code in development, we used the <a href="http://github.com/nkallen/screw-unit/tree/master">Screw.Unit</a> test framework.</p>
<p>We went with Screw.Unit for several reasons:</p>
<ul>
<li>Simple to implement- It&#8217;s just a JavaScript library</li>
<li>It generates a simple DOM output, which makes integration easy &#8211; I&#8217;ll demonstrate later.</li>
<li>It&#8217;s easy to customize, and the framework does not pollute the global namespace at all.</li>
<li>It&#8217;s simple to run and debug.</li>
</ul>
<p>Here is an example Screw.Unit test of the sample code:</p>
<pre lang="javascript" line="1">
Screw.Unit(function() {
  describe("test whether a given sample has swine flu", function() {
   it("clean sample", function() {
     var swineFluIndicator  = new SwineFluIndicator();
     var testSample = {
       value : '123'
     };
      expect(swineFluIndicator.hasSwineFlu(testSample)).to(be_false);
    });
  });
});
</pre>
<p>Screw.Unit tests are executed in the browser (so debugging with <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> is easy, and produce a very simple DOM that&#8217;s simple to read:<br />
<img src="http://s3.amazonaws.com/assets.pivotallabs.com/87/original/runner.png" alt="Screw.Unit Runner" /></p>
<p>Writing JavaScript unit tests is pretty easy; now it&#8217;s time to integrate them. <a href="http://htmlunit.sourceforge.net/">HtmlUnit</a> have released 2 new versions in 2009 so far that offer unprecedented DOM support via Rhino. With HtmlUnit, our test consists of rendering the page and interpreting the simple DOM results.</p>
<p>Set up the clients and load the page:</p>
<pre lang="java" line="1">
WebClient firefoxClient = new WebClient(BrowserVersion.FIREFOX_2);
WebClient ieClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6);

firefoxClient.setThrowExceptionOnScriptError(true);
ieClient.setThrowExceptionOnScriptError(true);
HtmlPage htmlPage = (HtmlPage) client.getPage(testFile.toURL());</pre>
<p>and provide a means of interpreting the page results:</p>
<pre lang="java" line="1">
protected void interpretTestResults(final HtmlPage htmlPage) {
        String header = "";
        String heading = "";
        String paragraph = "";
        // returns a list of tests
        List testDivs = (List) htmlPage
            .getByXPath("//*[contains(@class,'describe focused')]");

        for (HtmlListItem htmlListItem : testDivs) {
            List heading1List = (List) htmlListItem.getByXPath("./h1");
            header = heading1List.get(0).getTextContent();
            // returns a list of its divisions; if there are nested
            // describes, there will be multiple its
            List test = (List) htmlListItem
                .getByXPath(".//*[contains(@class,'its')]");
            for (HtmlUnorderedList htmlUnorderedList : test) {
                // if there are no child nodes, this is part of a nested
                // describe
                if (htmlUnorderedList.hasChildNodes()) {
                    List failedItemList = (List) htmlUnorderedList
                        .getByXPath(".//*[contains(@class,'it enqueued failed')]");
                    if (failedItemList.size() == 0) {
                        // successful
                    } else {
                        for (HtmlListItem failedItem : failedItemList) {
                            List describedList = (List) failedItem
                                .getByXPath("./h2");
                            Assert.assertTrue(describedList.size() == 1);
                            heading = describedList.get(0).getTextContent();
                            List errorMessageList = (List) failedItem
                                .getByXPath("./*[contains(@class, 'error')]");
                            for (HtmlParagraph htmlParagraph : errorMessageList) {
                                paragraph += htmlParagraph.getTextContent();
                            }
                        }
                        Assert.fail("Header: " + header + " heading: " + heading + " paragraph: "
                            + paragraph);
                    }
                }
            }
        }
    }</pre>
<p>This method takes an HtmlUnit HtmlPage and, using xpath expressions, iterates over the test result DIV tags generated by Screw.Unit. It ignores tests that passed, and focuses on the failed tests. For failed tests it gets the provided information about the test (the <em>it </em>and <em>describes </em>strings), so that we&#8217;ll know what test failed and why.</p>
<p>Lastly, rather than write a test for every Screw.Unit test page we write, we made use of JUnit4&#8242;s Parameterized test. This way we provide a list of Screw.Unit tests and have the Parameterized test execute a test for each.</p>
<p>Annotate the class:</p>
<pre lang="java" line="1">
@RunWith (Parameterized.class)
public class ScrewUnitTest {</pre>
<pre lang="java" line="1">
Provide a static Collection:
@SuppressWarnings ("unchecked")
    @Parameters
    public static Collection data() {
        Collection fileCollection = new ArrayList();
        Collection fileList = FileUtils.listFiles(new File(HTML_TEST_DIR), extensions, true);
        for (File file : fileList) {
            File[] fileArray = { file };
            fileCollection.add(fileArray);
        }
        return fileCollection;
    }
</pre>
<p>and a constructor:</p>
<pre lang="java" line="1">
public ScrewUnitTest(File file) {
        this.file = file;
    }</pre>
<p>Then for every file in the Collection, this.file will be available for reference in the tests. And our JavaScript tests can be easily run by a continuous integration system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/javascript/integrating-javascript-tests-with-continuous-integration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multiple Gmail Inboxes</title>
		<link>http://www.reverttoconsole.com/blog/tools/multiple-gmail-inboxes/</link>
		<comments>http://www.reverttoconsole.com/blog/tools/multiple-gmail-inboxes/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 16:38:02 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=338</guid>
		<description><![CDATA[This caught my eye recently as a nice addition to the gmail labs. I&#8217;ve been using a second inbox as a todo-list, filtered on starred items. I can also prioritize tasks based on different stars.]]></description>
			<content:encoded><![CDATA[<p><a href="http://gmailblog.blogspot.com/2009/02/new-in-labs-multiple-inboxes.html">This caught my eye</a> recently as a nice addition to the gmail labs.</p>
<p>I&#8217;ve been using a second inbox as a todo-list, filtered on starred items. <a href="http://googlesystem.blogspot.com/2008/07/gmail-superstars.html">I can also prioritize tasks based on different stars</a>.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Ftools%2Fmultiple-gmail-inboxes%2F&amp;title=Multiple+Gmail+Inboxes" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/tools/multiple-gmail-inboxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Screen</title>
		<link>http://www.reverttoconsole.com/blog/linux/my-screen/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/my-screen/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:27:30 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=297</guid>
		<description><![CDATA[Screen is a great tool for command-line usage, and is also available for cygwin. If you enjoy using the command line, and haven&#8217;t checked out screen, I highly recommend it. I found some of the commands and configuration changes a little difficult to remember, so I&#8217;m adding them here. First of all, the main screen [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnu.org/software/screen/">Screen</a> is a great tool for command-line usage, and is also available for <a href="http://www.cygwin.com/">cygwin</a>. If you enjoy using the command line, and haven&#8217;t checked out screen, I highly recommend it. I found some of the commands and configuration changes a little difficult to remember, so I&#8217;m adding them here.</p>
<p>First of all, the main screen escape key is ctrl-a. That&#8217;s all well and good, unless you&#8217;re an emacs user, then it&#8217;s downright offensive (ctrl-a is the emacs command to go to the beginning of a line- one I happen to use a lot). Fortunately it&#8217;s easy enough to change. I added a screenrc file that looks like this:</p>
<pre>
# ctrl-/ is my preferred shortcut key
escape \034\034
# turn off visual bell
vbell off
caption always &quot;%H %= %-w%L&gt;%{= BW}%n*%t%{-}%52&lt;%+w %L=&quot;
startup_message off
deflogin on
shell -/bin/bash
</pre>
<p>It&#8217;s easy enough to switch between screens from a single (rxvt) shell now, but as an emacs user I naturally enjoy having my screen split so I can multitask. It took me a while to figure out how to do that effectively with screen.</p>
<p><strong>ctrl-/ S</strong> splits the screen.<br />
<strong>ctrl-/ n</strong> switches to the next screen, but does it within the current region, so it&#8217;s not like M-x o in emacs.<br />
<strong>ctrl-/ tab</strong> switches between the split regions, just like M-x o in emacs.<br />
<string>ctrl-/ X</strong> &#8220;unsplits&#8221; the screen.</p>
<p><strong>References</strong></p>
<ul>
<li><a href="http://www.mattcutts.com/blog/a-quick-tutorial-on-screen/">A Quick Tutorial</a></li>
<li><a href="http://www.mattcutts.com/blog/screen-power-tips-screenrc/">Some good screenrc tips</a></li>
<li><a href="http://www.catonmat.net/blog/wp-content/plugins/wp-downloadMonitor/user_uploads/screen.cheat.sheet.pdf">Screen Cheat Sheet pdf</a></li>
</ul>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fmy-screen%2F&amp;title=My+Screen" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/my-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

