<?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>jNet</title>
	<atom:link href="http://johnrizzo.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnrizzo.net</link>
	<description>Nobody here but us chickens</description>
	<lastBuildDate>Tue, 17 May 2011 15:04:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Cygwin, A fish out of water!!!</title>
		<link>http://johnrizzo.net/blog/2011/05/15/513/</link>
		<comments>http://johnrizzo.net/blog/2011/05/15/513/#comments</comments>
		<pubDate>Sun, 15 May 2011 16:00:25 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://johnrizzo.net/?p=513</guid>
		<description><![CDATA[Cygwin is a great tool]]></description>
			<content:encoded><![CDATA[<div>Cygwin is a great tool for unix people who find themselves in a Microsoft world.  I&#8217;ve been using Cygwin for years but never for more than some very basic things.  Lately I&#8217;ve been spending some more time with it and I have to say I&#8217;m really impressed.  I won&#8217;t go into any unix basics or how to install Cygwin as there are many good references on the internet.<sup>[1][2]</sup> What I will do is list some tips and techniques that I have found useful and not entirely obvious such as setting up a tool for managing packages similar to Debians venerable apt-get, managing ssh keys, replacing the standard windows dos shell as the terminal and using apt-cyg to install packages not in the standard Cygwin repositories.</div>
<div><span id="more-513"></span></div>
<h2>How I setup Cygwin</h2>
<div>You can always read the <a href="http://www.cygwin.com/install.html">standard instructions for cygwin</a> but after using it for a while I prefer something a little different.  First of all I don&#8217;t like to use the UI to do the install.  Also, the standard install creates a link to a batch file which runs inside of the standard dos terminal.  If you like this shell then this post is not for you!!!</div>
<ul>
<li>Download the Cygwin <a href="http://cygwin.com/setup.exe">setup</a> program.</li>
<li>Run the following command or something similar at the windows cmd prompt.  You can read more about the options in the Cygwin FAQ or by typing setup.exe &#8211;help.  <strong><em>***NOTE: add util-linux to the list of packages to prevent things like getopt not being found errors in bash***</em></strong></li>
</ul>
<div><a href="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup4.png"><img class="size-full wp-image-524 aligncenter" title="cygwin_setup" src="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup4.png" alt="" width="542" height="274" /></a></div>
<ul>
<li>Install mintty to replace the dos window that cygwin normally runs in.</li>
</ul>
<div><a href="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup31.png"><img class="aligncenter" title="cygwin_setup3" src="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup31.png" alt="" width="542" height="475" /></a></div>
<div>Now  you can add a shortcut to c:\cygwin\bin\mintty.exe and finally you&#8217;ll  be working in a unix like environment with a reasonable shell.</div>
<div>You may want to finish your setup by updating your /etc/passwd and /etc/group files.  The following commands will add both the local and domain users and groups to your environment.  Note that I&#8217;ve changed the path separator used for domain accounts from &#8216;\&#8217; to &#8216;_&#8217;.  This is due issues with to how Cygwin will handle domain accounts.</div>
<pre>me@cygwin ~
$ mkpasswd.exe -l -D -S '_' &gt; /etc/passwd

me@cygwin ~
$ mkgroup.exe -l -D -S '_' &gt; /etc/group</pre>
<div>The only problem is that your windows user directory is usually something like c:\Users on Windows 7 but Cygwin creates its own /home directory within the c:\cygwin windows path.  I like to merge my windows and unix files when using cygwin so I don&#8217;t have to remember that I actually have user files in c:\cygwin.  I&#8217;ve uninstalled Cygwin in the past only to remember just after clearing out my recycling bin.  But others may not like to comingle things.  It is up to you.  If you want to change where /home points in cygwin then add the following to your /etc/fstab.</div>
<pre>$ cat /etc/fstab
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table

# This is default anyway:
# none /cygdrive cygdrive binary,posix=0,user 0 0
#C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
c:/Users /home ntfs binary,posix=0,user 0 0</pre>
<h2>A note about Cygwin 1.7.9-1</h2>
<div>The latest version of Cygwin has changed in a number of ways.  One of them is how it handles MS-DOS style paths.  For me this didn&#8217;t cause much of a problem but now Cygwin issues a warning when you run many commands which encounter a MS-DOS style path.  To disable this create a <strong>CYGWIN </strong>environment variable in windows and add <strong>nodosfilewarning</strong> as a value for that variable.  You can find more explicit details <a href="http://www.e-texteditor.com/wiki/index.php/FAQ#Why_do_I_get_.22cygwin_warning:_MS-DOS_style_path_detected_.5B....5D.22_when_I_run_a_command.3F">here</a>.</div>
<h2>apt-cyg</h2>
<div>Ok so now you&#8217;ve got a very basic install but I would definitely download the apt-cyg<sup>[6]</sup> program to regain some sanity.  This is a program that allows you to add, search, install, upgrade or uninstall packages just like you would with apt-get or yum which is convenient but apt-cyg is also a bit like portage on gentoo which means that you can install source packages as well.  I find this very useful.</div>
<div><a href="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup21.png"><img class="size-full wp-image-525 aligncenter" title="cygwin_setup2" src="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup21.png" alt="" width="542" height="322" /></a></div>
<div>To make apt-cyg work a little better you may want to add these aliases to your shell.  I use bash so I added the following;</div>
<div>alias apt-cyg=&#8217;apt-cyg -m http://cygwin.mirrors.pair.com/&#8217;<br />
alias apt-cygports=&#8217;apt-cyg -m ftp://sourceware.org/pub/cygwinports/&#8217;</div>
<div>These are great because now I can just type apt-cyg to install the binary packages that are maintained by the Cygwin community proper while also installing the ports/source based packages as well.  You can do quite a bit with apt-cyg.  Take a look at the project site<sup>[6]</sup> for more details.</div>
<h2>Getting SSH to work just right</h2>
<div>SSH is a wonderful thing.  Using ssh-agent, you can enter your password just once and log into many different workstations securely.  With Cygwin this takes a little work.  For some reason the way I normally start ssh-agent didn&#8217;t work in Cygwin.  So here is how I did it.</div>
<div>Using our fancy new apt-cyg command we&#8217;ll install ssh and update our shell to start ssh-agent when we first log in.  All subsequent shells will attach to this running agent and any keys it has been authorized to manage.  When you log out the agent will shut down and thus no one can just log into your workstation and use that as a means to gain access to your other hosts.</div>
<pre>$ apt-cyg find openssh
Working directory is /setup
Mirror is http://cygwin.mirrors.pair.com/
--2011-05-10 17:52:13--  http://cygwin.mirrors.pair.com//setup.bz2
Resolving cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)... 216.92.2.149
Connecting to cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)|216.92.2.149|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 268404 (262K) [text/plain]
Saving to: `setup.bz2'

100%[======================================================================================================================&gt;] 268,404     --.-K/s   in 0.02s

2011-05-10 17:52:13 (12.7 MB/s) - `setup.bz2' saved [268404/268404]

Updated setup.ini

Searching for installed packages matching openssh:

Searching for installable packages matching openssh:
openssh</pre>
<pre>$ apt-cyg install openssh
Working directory is /setup
Mirror is http://cygwin.mirrors.pair.com/
--2011-05-10 17:52:31--  http://cygwin.mirrors.pair.com//setup.bz2
Resolving cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)... 216.92.2.149
Connecting to cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)|216.92.2.149|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 268404 (262K) [text/plain]
Saving to: `setup.bz2'

100%[======================================================================================================================&gt;] 268,404     --.-K/s   in 0.02s

2011-05-10 17:52:31 (12.1 MB/s) - `setup.bz2' saved [268404/268404]

Updated setup.ini

Installing openssh
Found package openssh</pre>
<pre>Package openssh installed</pre>
<div>Now that we have ssh let&#8217;s update bash to start ssh-agent when we start our first shell.  There are some good sources on different ways to set this up<sup>[7]</sup> but if you&#8217;re using bash you can add the following to your $HOME/.bash_profile</div>
<pre>SSH_ENV="$HOME/.ssh/environment"

function start_agent {
 echo "Initialising new SSH agent..."
 /usr/bin/ssh-agent | sed 's/^echo/#echo/' &gt; "${SSH_ENV}"
 echo succeeded
 chmod 600 "${SSH_ENV}"
 . "${SSH_ENV}" &gt; /dev/null
 /usr/bin/ssh-add;
}

# Source SSH settings, if applicable

if [ -f "${SSH_ENV}" ]; then
 . "${SSH_ENV}" &gt; /dev/null
 #ps ${SSH_AGENT_PID} doesn't work under cywgin
 ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ &gt; /dev/null || {
 start_agent;
 }
else
 start_agent;
fi</pre>
<div>Lastly, we have to create a ssh-key and add it to our ssh-agent.</div>
<pre>$ ssh-keygen.exe
Generating public/private rsa key pair.
Enter file in which to save the key (/home/me/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/me/.ssh/id_rsa.
Your public key has been saved in /home/me/.ssh/id_rsa.pub.
The key fingerprint is:
d1:29:8f:5b:f9:f3:88:12:c5:b5:aa:5a:18:bf:e4:7d me@cygwin
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|         . ..    |
|        o.o. .   |
|         =o..    |
|      . S.+.     |
|       +.o..     |
|      . =o  o    |
|       +oo .E+   |
|      ..o.o.. .  |
+-----------------+</pre>
<div>Restart mintty and you&#8217;ll be asked to enter the passphrase you used when creating your key.</div>
<div><a href="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup41.png"><img class="size-full wp-image-527 aligncenter" title="cygwin_setup4" src="http://johnrizzo.net/wp-content/uploads/2011/05/cygwin_setup41.png" alt="" width="623" height="291" /></a></div>
<h2>Python</h2>
<div>Ok so why did I go through the trouble of setting up apt-cyg?  If it were just for the ease of installing packages it would have proved itself worthy but it isn&#8217;t just the convenience alone.  apt-cyg uses a ports like approach to packages which in this case means that they are compiled on your machine.  One benefit to this approach is that you can often find packages in the apt-cyg repository that aren&#8217;t available in the standard binary distribution.</div>
<div>Ok so lets look at python.  I&#8217;ve installed the standard distribution of python that comes with Cygwin.  Now I want to install some things that I use on a daily basis, namely setuptools, pip, virtualenv and others.  But they aren&#8217;t available.  I could just download the packages and install them manually.  This isn&#8217;t a big deal but keep in mind that there are often differences in how you would build something to work properly in Cygwin than what you would do on many linux/bsd distributions.  Why do all that work myself when there is a community of people who work on this very thing.</div>
<pre>$ apt-cyg find setuptools
Working directory is /setup
Mirror is http://cygwin.mirrors.pair.com/
--2011-05-16 09:31:51--  http://cygwin.mirrors.pair.com//setup.bz2
Resolving cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)... 216.92.2.149
Connecting to cygwin.mirrors.pair.com (cygwin.mirrors.pair.com)|216.92.2.149|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 268764 (262K) [text/plain]
Saving to: `setup.bz2'

100%[======================================================================================================================&gt;] 268,764     --.-K/s   in 0.02s

2011-05-16 09:31:51 (11.5 MB/s) - `setup.bz2' saved [268764/268764]

Updated setup.ini

Searching for installed packages matching setuptools:

Searching for installable packages matching setuptools:</pre>
<div>You can see that there is no binary for setuptools in the Cygwin binary repository but low and behold the gods of the ports community have saved us the work of doing this ourselves.</div>
<pre>$ apt-cygports find setuptools
Working directory is /setup
Mirror is ftp://sourceware.org/pub/cygwinports/
--2011-05-16 09:31:41--  ftp://sourceware.org/pub/cygwinports//setup.bz2
           =&gt; `.listing'
Resolving sourceware.org (sourceware.org)... 209.132.180.131
Connecting to sourceware.org (sourceware.org)|209.132.180.131|:21... connected.
Logging in as anonymous ... Logged in!
==&gt; SYST ... done.    ==&gt; PWD ... done.
==&gt; TYPE I ... done.  ==&gt; CWD (1) /pub/cygwinports/ ... done.
==&gt; PASV ... done.    ==&gt; LIST ... done.

    [ &lt;=&gt;                                                                                                                   ] 728         --.-K/s   in 0.06s

2011-05-16 09:31:42 (12.9 KB/s) - `.listing' saved [728]

Removed `.listing'.
--2011-05-16 09:31:42--  ftp://sourceware.org/pub/cygwinports//setup.bz2
           =&gt; `setup.bz2'
==&gt; CWD not required.
==&gt; PASV ... done.    ==&gt; RETR setup.bz2 ... done.
Length: 456183 (445K)

100%[======================================================================================================================&gt;] 456,183      434K/s   in 1.0s

2011-05-16 09:31:43 (434 KB/s) - `setup.bz2' saved [456183]

Updated setup.ini

Searching for installed packages matching setuptools:

Searching for installable packages matching setuptools:
python-setuptools
python3-setuptools</pre>
<div>
<p>After running apt-cygports install python-setuptools I&#8217;m all set.  A quick<span style="font-size: small;"> </span></p>
<pre>$ python -c 'import setuptools'</pre>
<p>&nbsp;</p>
</div>
<p>shows me that setuptools is installed so now I can just install my python packages the way I like to.</p>
<pre>$ easy_install pip virtualenv
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Reading http://www.pip-installer.org
Best match: pip 1.0.1
Downloading http://pypi.python.org/packages/source/p/pip/pip-1.0.1.tar.gz#md5=28dcc70225e5bf925532abc5b087a94b
Processing pip-1.0.1.tar.gz
Running pip-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-AmKs1m/pip-1.0.1/egg-dist-tmp-eM10iI
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.0.1 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip-2.6 script to /usr/bin

Installed /usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip
Searching for virtualenv
Reading http://pypi.python.org/simple/virtualenv/
Reading http://virtualenv.openplans.org
Reading http://www.virtualenv.org
Best match: virtualenv 1.6.1
Downloading http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.1.tar.gz#md5=1a475df2219457b6b4febb9fe595d915
Processing virtualenv-1.6.1.tar.gz
Running virtualenv-1.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-azd5Po/virtualenv-1.6.1/egg-dist-tmp-L5w7AD
warning: no previously-included files matching '*.*' found under directory 'docs/_templates'
Adding virtualenv 1.6.1 to easy-install.pth file
Installing virtualenv script to /usr/bin

Installed /usr/lib/python2.6/site-packages/virtualenv-1.6.1-py2.6.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv</pre>
<p>Now a word of warning.  I don&#8217;t like to manually install things on my system in a way that I can&#8217;t keep them managable and distict from what the system is managing.  The packages that easy_install just installed were put into /usr/ namespace.  I could have had them installed into /usr/local but in my laziness I have let this one slide.  To prevent any further cruft I have installed virtualenv.  Virtualenv and the python virtual toolset could have a post all their own.  In any case if you want to use virtualenv with cygwin you can see how I use it below.</p>
<pre>$ pip install virtualenvwrapper
Downloading/unpacking virtualenvwrapper
  Downloading virtualenvwrapper-2.7.1.tar.gz (690Kb): 690Kb downloaded
  Running setup.py egg_info for package virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/lib/python2.6/site-packages/virtualenv-1.6.1-py2.6.egg (from virtualenvwrapper)
Installing collected packages: virtualenvwrapper
  Running setup.py install for virtualenvwrapper
      2 [main] python 644 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent: 0x18B40000 != 0x1A230000
Stack trace:
Frame     Function  Args
00289F08  6102796B  (00289F08, 00000000, 00000000, 00000000)
0028A1F8  6102796B  (6117EC60, 00008000, 00000000, 61180977)
0028B228  61004F1B  (611A7FAC, 6124355C, 18B40000, 1A230000)
End of stack trace
      2 [main] python 7940 fork: child 644 - died waiting for dll loading, errno 11
    Error [Errno 11] Resource temporarily unavailable while executing command /usr/bin/python -c "import setuptools;__file__='/home/jrizzo/build/virtualenvwrapper/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-vDBPql-record/install-record.txt
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg/pip/req.py", line 1100, in install
    requirement.install(install_options, global_options)
  File "/usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg/pip/req.py", line 572, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/usr/lib/python2.6/site-packages/pip-1.0.1-py2.6.egg/pip/__init__.py", line 220, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1049, in _execute_child
    self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable</pre>
<h3>a forking mess</h3>
<p>Before continuing with my installation of  python I want to point out something you may run into from time to  time.  This happened to me when setting up python so I point it out now,  but this could happen whenever you update the Cygwin binaries.</p>
<p>This error is due to difficulty implementing POSIX standard fork on Windows.  In order to work around some issues there is some voodoo magic going on that requires a very special memory layout in assemblies such as the cygwin1.dll.  To fix this problem you will probably need to run a rebaseall and possibly peflagsall.  Just remember that you can&#8217;t run those commands while you have any cygwin processes running.  Even if you are careful about not having any cygwin processes running you should probably to reboot after you run those commands.  If you don&#8217;t reboot don&#8217;t yell at me <img src='http://johnrizzo.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .  <a href="http://www.heikkitoivonen.net/blog/2008/11/26/cygwin-upgrades-and-rebaseall/">Others </a>have written about this in more detail so take a look before blindly running rebaseall.</p>
<h3>Continuing with your normally scheduled broadcast&#8230; back to setting up python</h3>
<p>So now after running rebaseall you can see that pip installed virtualenvwrapper nicely.</p>
<pre>$ pip install virtualenvwrapper
Downloading/unpacking virtualenvwrapper
  Running setup.py egg_info for package virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/lib/python2.6/site-packages/virtualenv-1.6.1-py2.6.egg (from virtualenvwrapper)
Installing collected packages: virtualenvwrapper
  Running setup.py install for virtualenvwrapper
    changing mode of build/scripts-2.6/virtualenvwrapper.sh from 644 to 755
    Skipping installation of /usr/lib/python2.6/site-packages/virtualenvwrapper/__init__.py (namespace package)
    Installing /usr/lib/python2.6/site-packages/virtualenvwrapper-2.7.1-py2.6-nspkg.pth
    changing mode of /usr/bin/virtualenvwrapper.sh to 755
Successfully installed virtualenvwrapper
Cleaning up...</pre>
<p>Now I can setup my python virtual environment and install the things I use on an every day basis. The following steps were taken directly from the virtualenvwrapper.sh script</p>
<ol>
<li>Create a directory to hold the virtual environments. (mkdir $HOME/.virtualenvs).</li>
<li>Add a line like &#8220;export WORKON_HOME=$HOME/.virtualenvs&#8221; to your .bashrc.</li>
<li>Add a line like &#8220;source /path/to/this/file/virtualenvwrapper.sh&#8221; to your .bashrc.</li>
<li>Run: source ~/.bashrc</li>
<li>Run: workon</li>
<li>A list of environments, empty, is printed.</li>
<li>Run: mkvirtualenv temp</li>
<li>Run: workon</li>
<li>This time, the &#8220;temp&#8221; environment is included.</li>
<li>Run: workon temp</li>
<li>The virtual environment is activated.</li>
</ol>
<p>Generally speaking the standard steps for using virtualenvwrapper are good however a couple of notes.  I usually use the following command when creating virtual environments so that I don&#8217;t have any conflict or dependency on the system installed packages.</p>
<pre>me@cygwin ~/.virtualenvs
$ mkvirtualenv --distribute --no-site-packages --python=python2.6.exe py26
Running virtualenv with interpreter /usr/bin/python2.6.exe
New python executable in py26/bin/python2.6
Also creating executable in py26/bin/python.exe
Installing distribute....................................................................................................................................................................................done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating /home/me/.virtualenvs/py26/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/me/.virtualenvs/py26/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/me/.virtualenvs/py26/bin/preactivate
virtualenvwrapper.user_scripts creating /home/me/.virtualenvs/py26/bin/postactivate
virtualenvwrapper.user_scripts creating /home/me/.virtualenvs/py26/bin/get_env_details
(py26)</pre>
<p>So now I can install the other programs I want without worrying about any cygwin specific packaging.</p>
<pre>me@cygwin ~/.virtualenvs
$ which pip
/home/me/.virtualenvs/py26/bin/pip
(py26)
me@cygwin ~/.virtualenvs
$ pip install ipython
Downloading/unpacking ipython
 Downloading ipython-0.10.2.zip (6.4Mb): 6.4Mb downloaded
 Running setup.py egg_info for package ipython
 running egg_info
Installing collected packages: ipython
 Running setup.py install for ipython
 running install
 Installing iptest script to /home/me/.virtualenvs/py26/bin
 Installing ipythonx script to /home/me/.virtualenvs/py26/bin
 Installing ipcluster script to /home/me/.virtualenvs/py26/bin
 Installing ipython script to /home/me/.virtualenvs/py26/bin
 Installing pycolor script to /home/me/.virtualenvs/py26/bin
 Installing ipcontroller script to /home/me/.virtualenvs/py26/bin
 Installing ipengine script to /home/me/.virtualenvs/py26/bin
Successfully installed ipython
Cleaning up...
(py26)</pre>
<p>A lot more can be done here.  In fact I usually use virtualenvwrapper on top of virtualenv and several other things but I think this is enough for now.  To read more take a look at the following links.</p>
<ul>
<li>Virtualenv: http://pypi.python.org/pypi/virtualenv</li>
<li>Virtualenvwrapper: http://www.doughellmann.com/docs/virtualenvwrapper/</li>
</ul>
<h2>Summary</h2>
<div>So now you can see some of the things that I do with Cygwin to make working in a Windows world more comfortable but what about you?  Do you have any tips or techniques that give you that cozy Unix feeling?  Let me know what you think and maybe I&#8217;ll follow up with other things I&#8217;ve found.</div>
<div><strong>References</strong></div>
<ol>
<li>http://www.cygwin.com/install.html</li>
<li>http://lifehacker.com/179514/geek-to-live&#8211;introduction-to-cygwin-part-i</li>
<li>http://www.e-texteditor.com/forum/viewtopic.php?p=1823</li>
<li>http://sourceware.org/cygwinports/</li>
<li>http://www.gentoo-wiki.info/HOWTO_Gentoo_on_Cygwin</li>
<li>http://code.google.com/p/apt-cyg/</li>
<li>http://mah.everybody.org/docs/ssh</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2011/05/15/513/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Maker Journey : Thoughts and Considerations</title>
		<link>http://johnrizzo.net/blog/2010/10/09/my-maker-journey-thoughts-and-considerations/</link>
		<comments>http://johnrizzo.net/blog/2010/10/09/my-maker-journey-thoughts-and-considerations/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 18:31:48 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[cnc]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[hobby]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[woodworking]]></category>

		<guid isPermaLink="false">http://johnrizzo.net/?p=450</guid>
		<description><![CDATA[As I mentioned in my]]></description>
			<content:encoded><![CDATA[<div>
<div>
<p>As I mentioned in my previous post about starting my maker journey,  I&#8217;m really interested in making things and home fabrication.  Here are some additional thoughts about how I&#8217;m going about this and what is behind the decisions I&#8217;m making.  Depending on what your goals are you may make very different decisions than I have.</p>
<p><span id="more-450"></span></p>
<p><img title="More..." src="http://johnrizzo.net/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p>First things first.  If I&#8217;m going to go down this path I have to have a real place to work.  I live near New York which means space is an expensive commodity.  I have two kids which means it just isn&#8217;t safe keeping chemicals in the house.  My garage is fairly secure in that my kids don&#8217;t go in there, it is climate controlled and I can lock up anything dangerous but it isn&#8217;t ideal for spending long periods of time.  I&#8217;ve decided to convert a small utility room in my house for the cleaner aspects of my projects and to have a place in my garage that I can use for everything else.  Ideally everything should be compact enough that when I&#8217;m not working on something I can close it up and it won&#8217;t be very noticeable.</p>
<p>Given my space and safety concerns I have to figure out how to build this workshop efficiently.  Planning is going to be critical to make the space work for me.  First, I have to identify exactly how I want to use this space.  At a high level I want to be able to do chemistry and physics research as well as fabricate various robotic and electronic devices.  More practically, I&#8217;ll probably be doing the following;</p>
<ol>
<li>Prototyping. Mostly electronics but ideally I&#8217;d be able to prepare a single unit of anything I can think of.</li>
<li>Repairs to stuff in my house</li>
<li>Computer assembly</li>
<li>Programming and general computer usage</li>
<li>Building tools like a CNC mill or Fab@home device</li>
<li>Working with my wife and kids on various projects</li>
</ol>
<p>I really have to pay attention to things like cleanliness, climate (humidity, temperature, etc), and good quality air flow.  This last one is really important since I may be working with some volatile chemicals.</p>
<h2>What is going in the shop? Tools, Tables, etc</h2>
<h3>Wood Working</h3>
<p>Woodworking is going to be tough on my goal of creating a clean place to work.  I&#8217;ve been reading a lot about making sure that I keep an eye on air quality.  Since I&#8217;m going to separate the dirtier side of things (wood working, CNC milling, etc) from the cleaner things (circuit work and computing) I should be able to control how much the two environments interact.  There are many different systems for extracting dust, fumes and larger debris from your workshop.  If I let the garage get messy I&#8217;m sure my wife will kill me.  I&#8217;ll have to keep an eye on this.  I think I may be able to get by with a portable multi-purpose desk that I use for wood working, tool storage and assembly.</p>
<p>After a considerable amount of research and advice from the guys at <a href="http://www.tooltown.com/home">Tool Town in Paramus NJ</a> I&#8217;ve been convinced to go with the <a href="http://festoolusa.com">Festool</a> line of equipment.  While it is definitely a premium line of tools I think that the storage and compact tool design is worth it.  These are apparently some of the best quality tools out there so I hopefully won&#8217;t have to replace them any time soon.</p>
<p>Two features stood out most when I was looking at these tools.  The first is that they are all integrated with a very small system for keeping dust and debris out of the air and off the floor.  In fact after experimenting for a little while I can honestly say I could use these in my living room without worrying about dust.  They are seriously efficient in this regard.</p>
<p>The second feature that I really like is that they have a very nice integrated set of accessories such as the workbench and guide rail system that will make it so that I don&#8217;t need to get tools that would typically take up a much larger space.  For example, for about 500$, the TS55EQ circular saw and produce incredibly accurate cuts that would typically require a dedicated table saw such as the <a href="http://www.sawstop.com/procabinet/procab_home.php">SawStop 10&#8243; Cabinet Saw</a>.  You can easily see what I mean when you look at them side by side.</p>
<p><img class="alignleft" title="FestTool TS75" src="http://www.mcfeelys.com/images/pages/TS75_561183_a_05a.jpg" alt="FestToolTS75" width="240" height="240" /><img class="alignnone" title="SawStop Table Saw" src="http://toolmonger.com/wp-content/uploads/2007/06/post-sawstop.jpg" alt="SawStop Table Saw" width="360" height="238" /></p>
<p>OK so here is a pretty complete list of the basic tools I think I&#8217;ll need.</p>
<ul>
<li>At least 10&#8243; Circular Saw (<a href="http://www.festoolusa.com/products/plunge-cut-circular-saws/ts-55-eq-plunge-cut-circular-saw-561174.html">Festool TS 55 EQ</a> and Festool Rail Guide System)</li>
<li>Table Saw ( I think I can get by with the Festool circular saw and guide rail system.  We&#8217;ll see.)</li>
<li>Jigsaw (<a href="http://www.festoolusa.com/products/jigsaws/ps-300-eq-jigsaw-561097.html">Festool PS 300</a>)</li>
<li>Cordless Drill (<a href="http://www.festoolusa.com/products/cordless-drills/tdk-156-cordless-drill-564139.html">Festool TDK 15.6 CE</a>).</li>
<li>Dust Extractor (<a href="http://www.festoolusa.com/products/dust-extractors/ct-26-e-hepa-dust-extractor-583492.html">Festool CT 22 E</a>)</li>
<li>Orbital Sander (Cheapo one that I already have)</li>
<li>Router (<a href="http://www.festoolusa.com/products/routers/of-1400-eq-router-574267.html">Festool OF 1400</a>)</li>
<li>Workbench: I&#8217;ve decided that I&#8217;m going to take things slow and build my own tools.  Basically I&#8217;ll be following the guys at <a href="http://finewoodworking.com">FineWoodWorking.com</a>.  You can get the plans <a href="http://images.taunton.com/downloads/GSIW_workbench.pdf">here</a> and video <a href="http://www.finewoodworking.com/SkillsAndTechniques/SkillsAndTechniquesArticle.aspx?id=30724">here</a>.</li>
<li>Dremel ( I already have a pretty good one with a drill press type of setup as well)</li>
<li>Chisels (I have a good set that my brother gave me as a gift)</li>
<li>Lots of clamps</li>
<li>Drill Press (I&#8217;ll decide later.)</li>
<li>12&#8243; or 13&#8243; Benchtop Planar (I&#8217;ll decide later.)</li>
<li>10&#8243; or greater Miter Saw (I&#8217;ll decide later.)</li>
<li>8&#8243; or greater Joiner (I&#8217;ll decide later.)</li>
<li>Band Saw (I&#8217;ll decide later.)</li>
</ul>
<p>I&#8217;ll post the prices of everything soon so you can check back if you are interested in the cost.</p>
<h3>CNC Milling</h3>
<p>These are the CNC Mills that I&#8217;ve found online and think make the most sense.  Following the <a href="http://lcamtuf.coredump.cx/guerrilla_cnc1.shtml">Guerrilla guide to CNC machining and resin casting</a> I&#8217;m sold that additive fabrication just isn&#8217;t there yet.  I&#8217;ll probably play with that more later.  For now I think that one of the following CNC mills will work for what I want to do or I may just design my own.  Let&#8217;s see how the wood working setup goes first <img src='http://johnrizzo.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<ul>
<li>BlueChicCNC</li>
<li><a href="http://buildyourcnc.com/blackToe2x4v40.aspx">blackToe 2&#215;4</a></li>
<li><a href="http://lumenlab.com/d/store/cnc-robots">M3 or micRo v3 from LumenLabs</a></li>
</ul>
<p>For the software I figure I&#8217;ll use <a href="http://linuxcnc.org/">EMC2</a> which is an open source package for controlling machine tools.  If I end up building my own then I&#8217;m going to have to build the breakout boards, motor controller board, etc but I&#8217;m sure I can use one of the designs available online.  As for the modeling tools, I will have to update you later on that.  I&#8217;ve been looking and quite frankly I am not sure if any of the open source tools out there are really ready yet.</p>
<h3>Print 3D Objects</h3>
<p>As I mentioned, I&#8217;m following the Guerrilla guide which focus&#8217; more on the resin casting method with a normal CNC mill.  When I do get to this point I&#8217;ll probably look into one of these projects;</p>
<ul>
<li><a href="http://fabathome.com/">Fab@Home</a></li>
<li><a href="http://makerbot.com/">MakerBot</a></li>
<li><a href="http://reprap.org/">RepRap</a></li>
</ul>
<h3>Laser Cutter</h3>
<p>Just how cool would it be to have your own laser cutter.  I have a friend who has a $40k laser setup but I&#8217;m just not prepared to drop that kind of cash on a laser just yet.  All in due time.</p>
<ul>
<li><a href="http://www.kickstarter.com/projects/nortd/lasersaur-open-source-laser-cutter-0">Lasersaur</a></li>
</ul>
<div>
<h2>Conclusion</h2>
<p>So this is going to be a lot of fun and a lot of work.  I&#8217;ll be posting updates from time to time so check back if you are interested.  I&#8217;ve just started to build my worktable and laying out the space.  I&#8217;ll be posting my writeup with photos of that work in a couple of weeks when I&#8217;m finished.</p>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2010/10/09/my-maker-journey-thoughts-and-considerations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Maker Journey</title>
		<link>http://johnrizzo.net/blog/2010/08/29/my-maker-journey/</link>
		<comments>http://johnrizzo.net/blog/2010/08/29/my-maker-journey/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 04:00:24 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[cnc]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[hobby]]></category>
		<category><![CDATA[woodworking]]></category>

		<guid isPermaLink="false">http://johnrizzo.net/?p=347</guid>
		<description><![CDATA[As many of you know, for the past year or so, I've been following a lot of different projects out there.  Most of these are related to fabricating things.  I'm not talking about making a chair or some crappy device that only a geek would want to look at.  I'm talking about real products produced in a professional manner.]]></description>
			<content:encoded><![CDATA[<p>As many of you know, for the past year or so, I&#8217;ve been following a lot of different projects out there.  Most of these are related to fabricating things.  I&#8217;m not talking about making a chair or some crappy device that only a geek would want to look at.  I&#8217;m talking about real products produced in a professional manner.</p>
<p><span id="more-347"></span></p>
<p>It is also important to know that I&#8217;m not talking about manufacturing things.  That is an entirely different process and should not be taken lightly.  My wife is an Industrial Engineer and the complexity of planning and developing methods that can achieve a scale where it is economical to produce a product is entirely out of scope for what I&#8217;m thinking. (Read: I&#8217;m not that smart <img src='http://johnrizzo.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>In any case I&#8217;ve taken the plunge and started writing about the process.  I&#8217;ll post updates periodically with some eye candy and details if you are interested in doing this yourself.</p>
<p>My next post will be on the details of setting up my space and building my work desk.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2010/08/29/my-maker-journey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paladyne in the news</title>
		<link>http://johnrizzo.net/blog/2010/04/30/paladyne-in-the-news/</link>
		<comments>http://johnrizzo.net/blog/2010/04/30/paladyne-in-the-news/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 15:05:41 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[bank debt]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://johnrizzo.net/?p=280</guid>
		<description><![CDATA[A company I work for,]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Paladyne Logo" src="http://a3.twimg.com/profile_images/758384781/squarelogo.png" alt="" width="55" height="51" />A company I work for, Paladyne, has recently started the process of leveraging many different technologies to inform the community about the things they are doing.  You can check them out on <a href="http://twitter.com/PaladyneSys">Twitter</a> and their <a href="http://paladyne.wordpress.com/">WordPress Blog</a>.</p>
<p>I particularly like the post on <a href="http://tinyurl.com/ybxvgs4">Bank Debt</a> (shameless plug <img src='http://johnrizzo.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  and Sols writeup &#8220;<a href="http://paladyne.wordpress.com/2010/04/27/can-you-beat-the-sheet/">Can you beat the sheet?</a>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2010/04/30/paladyne-in-the-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wes McKinney at AQR and how he uses python for financial analytics</title>
		<link>http://johnrizzo.net/blog/2010/03/31/python-finance/</link>
		<comments>http://johnrizzo.net/blog/2010/03/31/python-finance/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 04:00:25 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://johnrizzo.net/?p=208</guid>
		<description><![CDATA[I watched a great PyCon]]></description>
			<content:encoded><![CDATA[<p><a href="http://johnrizzo.net/wp-content/uploads/2010/03/pycon.png"><img class="alignleft size-full wp-image-287" title="pycon" src="http://johnrizzo.net/wp-content/uploads/2010/03/pycon.png" alt="" width="85" height="109" /></a>I watched a great PyCon 2010 demo where Wes McKinney at AQR showed how he uses python for financial analytics.</p>
<p><span id="more-208"></span><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/g4VigcifWAI%2Em4v" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="350" src="http://blip.tv/play/g4VigcifWAI%2Em4v" allowfullscreen="true"></embed></object></p>
<p>Other Useful tidbits I picked up from the demo</p>
<ul>
<li>scikits.statsmodels package, <a href="http://scipystats.blogspot.com/">http://scipystats.blogspot.com/</a></li>
<li>SciPy and NumPy, <a href="http://numpy.scipy.org/">http://scipy.org/</a></li>
<li>cython, <a href="http://www.cython.org/">http://www.cython.org/</a></li>
<li>pandas, <a href="http://code.google.com/p/pandas/">http://code.google.com/p/pandas/</a> Great library written by Wes McKinney (AQR Capital Management, LLC)</li>
<li>Python Interface to R: <a href="http://rpy.sourceforge.net/">http://rpy.sourceforge.net/</a></li>
</ul>
<h3>Now for a bit of a tangent <img src='http://johnrizzo.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </h3>
<p>He made a comment about transitioning from prototyping to a &#8220;Production&#8221; ready system which is relevant to what I do professionally. In the scientific or finance world this often involves using tools such as Mathcad or Mathematica to prototype your work and then having to take that prototype and build it into your production application.</p>
<p>This may mean handing the prototype off to another team entirely.  There are many places for errors to creap in and the process around making enhancements or updates can be slow and combersome.</p>
<p>I&#8217;m doing significant research into how to improve this now so I&#8217;ll write about this separately as I have something substantial.  Let me know if you have found any methods that work for you.  Stay tuned!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2010/03/31/python-finance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My Projects</title>
		<link>http://johnrizzo.net/blog/2009/08/08/test/</link>
		<comments>http://johnrizzo.net/blog/2009/08/08/test/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 08:07:48 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[hobby]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://localhost/blog/2010/02/28/test/</guid>
		<description><![CDATA[Ok so now that I'm bearing my soul to the world with this public blogging I guess I can put up the projects that I've been working on as well. Feel free to comment and let me know if you like any of them or if you know any way to make them better.

http://johnrizzo.net/projects/]]></description>
			<content:encoded><![CDATA[<p>Ok so now that I&#8217;m bearing my soul to the world with this public blogging I guess I can put up the projects that I&#8217;ve been working on as well.  Feel free to comment and let me know if you like any of them or if you know any way to make them better.</p>
<p><a href="http://johnrizzo.net/projects/">http://johnrizzo.net/projects/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2009/08/08/test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writings</title>
		<link>http://johnrizzo.net/blog/2009/07/22/writings/</link>
		<comments>http://johnrizzo.net/blog/2009/07/22/writings/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 08:18:09 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://localhost/?p=167</guid>
		<description><![CDATA[I&#8217;ve been writing a lot]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been writing a lot lately about various things that interest me. I usually don&#8217;t publish these writings anywhere since they are really just a way for me to work out my thoughts. Recently I was talking with some friends and one of them convinced me that what I write about may be useful to others. I&#8217;ve begruggingly agreed but I&#8217;ll try to keep the things I publish to more than just the ramblings of yet another voice on the net.</p>
<p>So as a form of introduction, &#8220;Hello&#8221; and I hope you find the things I publish useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnrizzo.net/blog/2009/07/22/writings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.026 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-22 14:35:27 -->

