<?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>The Stata Things &#187; Cygwin</title>
	<atom:link href="http://enoriver.net/index.php/category/cygwin/feed/" rel="self" type="application/rss+xml" />
	<link>http://enoriver.net</link>
	<description>computing for fun and profit</description>
	<lastBuildDate>Mon, 07 May 2012 13:43:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Download code from books with wget</title>
		<link>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/</link>
		<comments>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 16:51:31 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=986</guid>
		<description><![CDATA[The books I'm reading these days come with examples of code, saved on associated web sites. Sometimes that code is neatly packaged into a zip archive or tarball, with every piece of code sitting in a directory named after the chapter it was referenced in. But other times these web sites have the code sitting [...]]]></description>
			<content:encoded><![CDATA[<p>The books I'm reading these days come with examples of code, saved on associated web sites. Sometimes that code is neatly packaged into a zip archive or tarball, with every piece of code sitting in a directory named after the chapter it was referenced in. But other times these web sites have the code sitting in directories that you're expected to browse by hand. One example is <a href="http://sobell.com/UB2/code/">here</a>.</p>
<p>Suppose you don't want to do that. Suppose you just want to get the code all in the same directory structure on your local machine, and only the code, not the associated html files that make it render in a browser. In that situation, you can do this:<br />
<code><br />
wget -r -np -nH -R "*.html*" http://www.sobell.com/UB2/code/<br />
</code><br />
Recursive downloads with wget are discouraged because they hit the web server hard with a fast succession of requests. But I think the example above is a case of polite wget use: it only downloads what the original host of the code intended to make available for downloading. The <em>-r</em> part means "recursive". The <em>-np</em> part means "but not upwards". The <em>-nH</em> part means "and do not visit any hosts referenced here". Finally, the <em>-R "*.html*"</em> part means "and I don't want any file with .html in it".</p>
<p>As it turns out, wget can do a lot of things, so its man page is rather long. I googled around for a more concise reference, and I found <a href="http://www.informatik.uni-hamburg.de/RZ/software/www/wget/wget_4.html">this</a>. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby, Rails and Cygwin</title>
		<link>http://enoriver.net/index.php/2008/12/17/ruby-rails-and-cygwin/</link>
		<comments>http://enoriver.net/index.php/2008/12/17/ruby-rails-and-cygwin/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 03:22:16 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Cygwin]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=414</guid>
		<description><![CDATA[Somebody needs to write a simple content management system (CMS) for a project that a few friends of mine started a couple of years ago. Every year, a bunch of us chip in for two small scholarships for the graduating class of the high school in Salonta, Romania. The job would be a lot easier [...]]]></description>
			<content:encoded><![CDATA[<p>Somebody needs to write a simple content management system (CMS) for a project that a few friends of mine started a couple of years ago.</p>
<p>Every year, a bunch of us chip in for two small scholarships for the graduating class of the high school in Salonta, Romania. The job would be a lot easier if we had a suitable website. It would say a little about the reasons for this enterprise, explain the application terms, and then serve as an interface between the applicants and the selection committee. It should have an online application form linked to an applicant database and to a tree of personal folders where only applicants themselves and the selection committee have access. These folders would hold application materials -- essays, transcripts, what have you.</p>
<p>I volunteered to build this myself, based on some brief PHP experience I had accummulated in the process of building the first, non-WordPress version of this site. I guess now I'll have to, unless I find something both free and right for the job sometime soon.</p>
<p>This looks like a good excuse to dabble in Ruby on Rails. That, in turn, brought me to back to Cygwin, which I installed a while ago. I used it to debug and compile C++ code, and didn't pay much mind to any of the other things you can do with it. Cygwin comes with Ruby, it turns out. I updated it based on instructions <a title="Updating Cygwin" href="http://classes.cs.kent.edu/sce/cygwinupdate.html">here</a> just to make sure that I had the latest version, and I was good to go:</p>
<p><code><br />
$ ruby -v<br />
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]</code></p>
<p>Rails is another matter. I had to install it separately. With help from <a title="Rails on Cygwin" href="http://www.pluitsolutions.com/2006/03/30/install-ruby-on-rails-ror-on-cygwin/">here</a>, the effort was trivial and seems to have worked:</p>
<p><code><br />
$ rails .<br />
exists<br />
create  app/controllers<br />
create  app/helpers<br />
create  app/models<br />
[snip]<br />
</code><br />
Why Rails? Because according to its creator, Rails is so great that it's probably easier to learn Ruby in order to use it, than it would be to learn another framework in some language you already know. The full citation is <a href="http://www.loudthinking.com/posts/34-myth-5-rails-is-hard-because-of-ruby">here</a>. Well, I hope it's true. I'll keep a running progress report.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2008/12/17/ruby-rails-and-cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cygwin, the kind-of-UNIX</title>
		<link>http://enoriver.net/index.php/2008/10/08/cygwin-the-kind-of-unix/</link>
		<comments>http://enoriver.net/index.php/2008/10/08/cygwin-the-kind-of-unix/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 22:09:31 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Cygwin]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=206</guid>
		<description><![CDATA[A couple of days ago I installed Cygwin because I wanted a way to run UNIX applications in Windows. Cygwin sets up a UNIX-like directory with the root, /, wherever it is that you install it (by default, C:\cygwin). Example of usage: to get SSH access to my server, I normally use PuTTY. But after I [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I installed <a href="http://www.cygwin.com/">Cygwin</a> because I wanted a way to run UNIX applications in Windows. Cygwin sets up a UNIX-like directory with the root, /, wherever it is that you install it (by default, C:\cygwin).</p>
<p>Example of usage: to get SSH access to my server, I normally use PuTTY. But after I installed the OpenSSH Cygwin package, I could just do this from the Cygwin command line:</p>
<p><code>~ ssh my_server_username@my_server.homeip.net</code></p>
<p>For that to work, I had to set up a .ssh directory in my Cygwin user folder, namely C:\cygwin\home\my_Windows_username\. But you can't set up directory names that start with a dot in Windows XP. Instead, you can set up the \home\my_Windows_username part, and then from the Cygwin window, you just do this:</p>
<p><code>~ mkdir /home/my_Windows_username/.ssh</code></p>
<p>Of course Cygwin, like UNIX and unlike Windows, is case-sensitive. I copied my id_dsa private key from the USB stick here, and I was in business. As soon as the server recognized my key, Cygwin created a known_hosts file as well. So far, very UNIX-like. Took me a while, though, to figure out how Cygwin emulated the UNIX directory structure. Google took me <a href="http://punctuatedproductivity.com/category/cygwin/">here</a>, and then all was well.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2008/10/08/cygwin-the-kind-of-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

