<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9170434694647900866</id><updated>2012-02-09T09:30:36.751-08:00</updated><category term='ruby'/><category term='VirtualBox Windows share Ubuntu Debian Linux Multiple Users'/><category term='linux ubuntu timidity swami midi lame audio'/><category term='coloring pages coloringpages gimp image'/><category term='spec'/><category term='autotest'/><category term='autostart'/><category term='Meerkat'/><category term='10.10'/><category term='ruby 1.9.2'/><category term='youtube'/><category term='narray ruby code install compile'/><category term='mplayer'/><category term='Rserve-Ruby-client'/><category term='firefox browsing Karmic Koala 9.10 Ubuntu'/><category term='gnome'/><category term='keyboardshortcuts'/><category term='bare'/><category term='git'/><category term='xbindkeys'/><category term='analysis'/><category term='ubuntu linux pymix 9.04 errors compilation arrayobject.h'/><category term='ssh server personal Ubuntu 10.04 lucid lynx'/><category term='checkinstall rubygems ruby 1.9 ruby1.9'/><category term='rserve-simpler'/><category term='R-project R slope regression pearsons correlation cor'/><category term='Ubuntu karmic koala wmii tiling gnome rumai windowmanager lucid lynx 9.10 10.04'/><category term='Maverick'/><category term='linux'/><category term='sharing'/><category term='Rserve'/><category term='KDE'/><category term='ruby round rounding numeric float sprintf'/><category term='multifactorial'/><category term='10.04'/><category term='Lynx'/><category term='R columns statistics matrix linear algebra'/><category term='ruby 1.9'/><category term='howto set 1440 Timex sports watch instructions'/><category term='streaming'/><category term='10.04 Asus 1201N Lucid Wireless Fix Bug'/><category term='rvm'/><category term='lattice'/><category term='gems'/><category term='bacon'/><category term='ubuntu gutsy nvidia'/><category term='ssh tunneling firewall sshfs'/><category term='Lucid'/><category term='rserve-client'/><category term='jaunty jackelope'/><category term='dropbox'/><category term='server'/><category term='cartoon biology molecularbiology figure schematic diagram illustration'/><category term='youtube-dl'/><category term='ubuntu'/><category term='ruby nokogiri mp3 download'/><category term='ruby bash shell escape filename file name'/><category term='R'/><category term='linux fonts wmii rumai'/><title type='text'>sudo or do not</title><subtitle type='html'>(there is no try)

linux, ruby, R, calculators, technology...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-201253450449960959</id><published>2012-02-06T07:17:00.000-08:00</published><updated>2012-02-07T08:58:03.362-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Rserve-Ruby-client'/><category scheme='http://www.blogger.com/atom/ns#' term='rserve-simpler'/><category scheme='http://www.blogger.com/atom/ns#' term='gems'/><category scheme='http://www.blogger.com/atom/ns#' term='rserve-client'/><category scheme='http://www.blogger.com/atom/ns#' term='Rserve'/><category scheme='http://www.blogger.com/atom/ns#' term='R'/><title type='text'>R and Rserve on Windows</title><content type='html'>&lt;div&gt;This is easy if your system is 32-bit. &amp;nbsp;If it is 64 bit you need to make sure you are using 32-bit R &lt;u&gt;because the R serve binary is 32 bit&lt;/u&gt;!&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Install the windows R binary package (accepting the defaults)&lt;/li&gt;&lt;li&gt;Put the R bin directory on your path (right click computer&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: #f9f9f9; font-family: sans-serif; font-size: 22px; line-height: 19px;"&gt;→&lt;/span&gt;&amp;nbsp;Advanced Properties&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: #f9f9f9; font-family: sans-serif; font-size: 22px; line-height: 19px;"&gt;→&lt;/span&gt;&amp;nbsp;Environment Variables). &amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;For a 32-bit Windows install you should use a path like this: &amp;nbsp;C:\Program Files\R\R-2.14.1\bin&lt;/li&gt;&lt;li&gt;For a 64-bit Windows install you need to link to the &lt;b&gt;i386 folder&lt;/b&gt;:&amp;nbsp;C:\Program Files\R\R-2.14.1\bin\i386&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Fire up R from the cmd line (&lt;u&gt;make sure that it is the 32 bit R&lt;/u&gt;, even if you are on a 64-bit computer) and execute the command: install.packages("Rserve") -- note to where it installs Rserve.&lt;/li&gt;&lt;li&gt;Copy the binaries Rserve.exe and Rserve_d.exe to your R bin directory referenced aboved.&lt;/li&gt;&lt;li&gt;Fire up a new cmd line and run the command: "R CMD Rserve' and configure the firewall popup to allow rserve to work.&lt;/li&gt;&lt;li&gt;You know if everything is working if you can execute this code inside of &lt;b&gt;irb&lt;/b&gt; (depends on rserve/simpler [gem install rserve-simpler]):&lt;/li&gt;&lt;ul&gt;&lt;li&gt;require 'rserve/simpler/R'&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-201253450449960959?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/201253450449960959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=201253450449960959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/201253450449960959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/201253450449960959'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2012/02/r-and-rserve-on-windows.html' title='R and Rserve on Windows'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6340037703531152871</id><published>2011-08-08T10:18:00.000-07:00</published><updated>2011-08-08T12:06:14.959-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><category scheme='http://www.blogger.com/atom/ns#' term='youtube-dl'/><category scheme='http://www.blogger.com/atom/ns#' term='youtube'/><title type='text'>*Listen* to Youtube on linux (legally)</title><content type='html'>Per the terms of service, you are not supposed to download YouTube videos.  However, it does NOT say that you cannot view them in something other than a web browser. &amp;nbsp;The main problem with youtube is how much garbage/dodginess there is. &amp;nbsp;Also, most of the time I just want to listen to the music anyway....  what to do?&lt;br /&gt;&lt;br /&gt;The answer: &lt;a href="http://filmsbykris.com/wordpress/?p=968"&gt;use youtube-dl to provide the correct download link, then stream to mplayer&lt;/a&gt; and null the video.&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download youtube-dl and put somewhere in your path (such as ~/bin/) and make executable. &amp;nbsp;If your player breaks, just download the latest version (up within 24 hrs of a youtube site modification) and it should work again. &amp;nbsp; They have a youtube-dl .deb package in the ubuntu repos, but it is obsoleted pretty fast (for instance 10.04 doesn't work).&lt;/li&gt;&lt;li&gt;make sure mplayer and python are installed: (sudo apt-get install mplayer python)&lt;/li&gt;&lt;li&gt;Use this command:&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;mplayer -vo null -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g -f 34 --cookies /tmp/cookie.txt "http://www.youtube.com/watch?v=pGruu89cCw8")&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Of course, you will change the video link to be the one you like. &amp;nbsp;Here is some explanation of what is going on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Youtube requires cookies to be enabled. &amp;nbsp;We get the video link via youtube-dl and put it into the cookie file. &amp;nbsp;mplayer is using cookies and reads the url to play from the cookie file.&lt;/li&gt;&lt;li&gt;The &lt;b&gt;-g&lt;/b&gt; means get the url, and &lt;b&gt;-f&lt;/b&gt; changes which file format you are getting the link to (&lt;a href="http://en.wikipedia.org/wiki/YouTube"&gt;look up youtube codes&lt;/a&gt;... current options are &lt;b&gt;5&lt;/b&gt;, &lt;b&gt;34&lt;/b&gt;, &lt;b&gt;35&lt;/b&gt;, &lt;b&gt;18&lt;/b&gt;, &lt;b&gt;22&lt;/b&gt;, &lt;b&gt;37&lt;/b&gt;, &lt;b&gt;38&lt;/b&gt;, &lt;b&gt;43&lt;/b&gt;, &lt;b&gt;44&lt;/b&gt;, &lt;b&gt;45&lt;/b&gt;, &lt;b&gt;17&lt;/b&gt;). &amp;nbsp;&lt;b&gt;34&lt;/b&gt; is the lowest resolution flv format at 128 kbits/s sound (and I think is standard "360"). &amp;nbsp;&lt;b&gt;18&lt;/b&gt; would give you 96 kbits/s sound. &amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;-vo null &lt;/b&gt;means no video output. &amp;nbsp;Use &lt;b&gt;-fs &lt;/b&gt;instead if you want full screen, or nothing for that option if you want regular.&lt;/li&gt;&lt;/ul&gt;There you have it. &amp;nbsp;Robust, legal, streaming audio player for youtube.&lt;br /&gt;&lt;br /&gt;This also seems to work on &lt;u&gt;short&lt;/u&gt;&amp;nbsp;playlists, but not always:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mplayer -vo null -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g -f 34 --cookies /tmp/cookie.txt "http://www.youtube.com/view_play_list?p=460F66B8E8E56FB6")&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Navigate through the tracks with "&amp;gt;" and "&amp;lt;".&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6340037703531152871?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6340037703531152871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6340037703531152871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6340037703531152871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6340037703531152871'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/08/listen-to-youtube-on-linux-legally.html' title='*Listen* to Youtube on linux (legally)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4533101229820654634</id><published>2011-04-11T08:22:00.000-07:00</published><updated>2011-04-11T08:37:17.633-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Meerkat'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby 1.9.2'/><category scheme='http://www.blogger.com/atom/ns#' term='rvm'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='Lynx'/><category scheme='http://www.blogger.com/atom/ns#' term='Maverick'/><category scheme='http://www.blogger.com/atom/ns#' term='10.10'/><category scheme='http://www.blogger.com/atom/ns#' term='Lucid'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='10.04'/><title type='text'>rvm with Ubuntu 10.04 and 10.10</title><content type='html'>If you plan on doing a lot of development in ruby, then &lt;a href="https://rvm.beginrescueend.com/"&gt;rvm&lt;/a&gt; (ruby version manager) is the way to use lots of different ruby versions and gems.  If you just want to run ruby, you should use your system's package manager.&lt;br /&gt;&lt;br /&gt;This is a condensed version of &lt;a href="http://www.christopherirish.com/2010/08/25/how-to-install-rvm-on-ubuntu-10-04/"&gt;Chistopher Irish's excellent write-up&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(leading &lt;b&gt;$&lt;/b&gt; is the bash prompt)&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;$ sudo apt-get install curl git-core ruby&lt;br /&gt;$ bash &lt; &lt;(curl -s https://rvm.beginrescueend.com/install/rvm)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If you haven't already replaced your .bashrc, you probably have a line in there like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;[ -z "$PS1" ] &amp;&amp; return&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Replace that line with:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;if [[ -n "$PS1" ]]; then&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then, add this to the last line of the .bashrc file (however, you can leave off that very final, dangling 'fi' if you did NOT have a return statement that you replaced earlier).&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi&lt;br /&gt;&lt;br /&gt;fi&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;There are going to be prerequisites to installing most ruby's.  Use the command &lt;b&gt;rvm notes&lt;/b&gt; to discover those dependencies for your system.&lt;br /&gt;&lt;br /&gt;Okay, we'll grab some prerequisites for compiling 1.9.2:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;$ sudo aptitude install build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libreadline-dev libxml2-dev git-core subversion autoconf&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, we can list the ruby versions we can install, install 1.9.2, and set it as default.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;rvm list known  # see which ruby versions we could install&lt;br /&gt;rvm install 1.9.2-head&lt;br /&gt;rvm --default 1.9.2-head  # make ruby 1.9.2 our default&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4533101229820654634?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4533101229820654634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4533101229820654634' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4533101229820654634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4533101229820654634'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/04/rvm-with-ubuntu-1004-and-1010.html' title='rvm with Ubuntu 10.04 and 10.10'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6004551633099420576</id><published>2011-03-15T15:32:00.000-07:00</published><updated>2011-03-15T15:32:21.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='bacon'/><category scheme='http://www.blogger.com/atom/ns#' term='spec'/><category scheme='http://www.blogger.com/atom/ns#' term='autotest'/><title type='text'>bacon and autotest</title><content type='html'>Took a little to figure this out, so thought I would share. &amp;nbsp;You need an empty file in your spec folder called .bacon in your spec folder. &amp;nbsp;This appears to load up a lot of the proper bacon environment things into autotest. &amp;nbsp;However, if you want to override specific behaviors, you do that in a .autotest file in the top directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;touch spec/.bacon&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Inside &lt;b&gt;.autotest&lt;/b&gt;:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'bacon'&lt;br /&gt;require 'autotest/bacon'&lt;br /&gt;&lt;br /&gt;# see inside &lt;bacon gem&gt;/lib/autotest/bacon.rb for template&lt;br /&gt;&lt;br /&gt;class Autotest::Bacon &lt; Autotest&lt;br /&gt;  undef make_test_cmd&lt;br /&gt;  def make_test_cmd(files_to_test)&lt;br /&gt;    # I modified this to only include _spec.rb files:&lt;br /&gt;    args = files_to_test.keys.flatten.select {|v| v =~ /_spec.rb$/ }.join(' ')&lt;br /&gt;    args = '-a' if args.empty?&lt;br /&gt;    # TODO : make regex to pass to -n using values&lt;br /&gt;    # use bacon -h to see all your possible options!&lt;br /&gt;    "#{ruby} -S bacon -I#{libs} -o TestUnit #{args}"&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6004551633099420576?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6004551633099420576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6004551633099420576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6004551633099420576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6004551633099420576'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/03/bacon-and-autotest.html' title='bacon and autotest'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2795307938905783703</id><published>2011-03-07T10:05:00.000-08:00</published><updated>2011-03-07T10:05:49.143-08:00</updated><title type='text'>image landscapes for ebooks (and other digital-based reading)</title><content type='html'>The problem with electronic text is that it lacks the spatial character of a book. &amp;nbsp;You don't really know where you are at in a giant, monolithic column of perfect text, especially when resizing it changes where text is located. &amp;nbsp;However, in a book, you have several spatial cues that are constant: which page, which part of the page, how deep into the book (depth) and any imperfections on the page itself or with the text. &amp;nbsp;So, with ebooks, how can you duplicate this effect?&lt;br /&gt;&lt;br /&gt;One could write a program that lays books out so that the book is more like a book (there are cues that indicate depth, etc.). &amp;nbsp;With svg you could easily add certain permanent imperfections to the text to give it more character.&lt;br /&gt;&lt;br /&gt;There are two other ways to add a spatial dimension to reading text:&lt;br /&gt;&lt;br /&gt;1. Layer text, or pages, into a 3D landscape. &amp;nbsp;If the pages of your book traversed an interesting cityscape, room, landscape, or mountain path, etc., you would have spatial anchors upon which to peg the text.&lt;br /&gt;&lt;br /&gt;2. The page itself could link out into either auto-generated or user defined images (or text). &amp;nbsp;In this way, each page is given visual character that links it to other ideas and images.&lt;br /&gt;&lt;br /&gt;IMO, both the ideas and the implementation of these ideas (i.e., embedding pages of text, with textual imperfections into a 3D landscape, or adding pictures and text to the pages of the book itself, etc.) are obvious and trivial. &amp;nbsp;Any college student taking a web or 3D design class could do it. &amp;nbsp;It merely remains for someone to do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2795307938905783703?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2795307938905783703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2795307938905783703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2795307938905783703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2795307938905783703'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/03/image-landscapes-for-ebooks-and-other.html' title='image landscapes for ebooks (and other digital-based reading)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-462001076638745375</id><published>2011-02-21T23:08:00.000-08:00</published><updated>2011-02-21T23:08:16.929-08:00</updated><title type='text'>ruby list comprehension</title><content type='html'>I have seen list comprehension cited as a feature of python that ruby lacks.  I want to play around with the idea to see where it goes...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.secnetix.de/olli/Python/list_comprehensions.hawk"&gt;A nice write up on list comprehensions in python&lt;/a&gt; has an example where you can use list comprehension to find prime numbers.  They divide it into two steps because it gets a little hairy on one line.  Here's finding primes on one line using list comprehension:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&gt;&gt;&gt; [x for x in range(2, 50) if x not in [j for i in range(2, 8) for j in range(i*2, 50, i)]]&lt;br /&gt;[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;It's not bad, but it's easy to get lost in there (my ruby eyes are not highly trained in python, of course).&lt;br /&gt;&lt;br /&gt;Now, one of the things list comprehensions do is it does selection and modification in the same phrase.  This part of list comprehensions is easy to implement.&lt;br /&gt;&lt;br /&gt;[ add the equivalent python here ]&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;(2..10).select(&amp;:even?).map {|v| v**2 }&lt;br /&gt;(2..10).map {|v| v**2 if v.even? }.compact&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Implementing this aspect of list comprehensions in ruby is less than trivial:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;module Enumerable&lt;br /&gt;  def lc(&amp;block)&lt;br /&gt;    block.nil? ? self : self.map(&amp;block).compact&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The other part of list comprehensions is the fact that the evaluation happens from right to left  (in the python code) so that the execution of the code is efficient.&lt;br /&gt;&lt;br /&gt;This gets the job done, but the right-most block is executed multiple times to make it work:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;(2..50).reject {|j| (2..8).map {|i| (i*2).step(50,i).to_a}.flatten.include?(j) &lt;br /&gt;&lt;br /&gt;# also other ways to think about this (need to finish this post)&lt;br /&gt;Set.new(2..50) - (2..8).reduce(Set.new) {|np,i| np.merge((i*2).step(50,i)) }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-462001076638745375?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/462001076638745375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=462001076638745375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/462001076638745375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/462001076638745375'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/02/ruby-list-comprehension.html' title='ruby list comprehension'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2296670081510654496</id><published>2011-02-09T11:32:00.000-08:00</published><updated>2011-02-09T11:32:06.295-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='sharing'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='bare'/><category scheme='http://www.blogger.com/atom/ns#' term='dropbox'/><title type='text'>Using Dropbox and git</title><content type='html'>Dropbox is really fantastic, but its version control abilities are limited.  Git is a fantastic tool for versioning things. &amp;nbsp;Here's how I use both to keep detailed version history of the projects that matter to me:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Solo Repo (use a Normal git repo)&lt;/h2&gt;&lt;br /&gt;For most projects, I do not need to merge changes with multiple people, but I want a version history.  For these, I set up a normal git repository.  This repo has no "origin", so I never push to anything, just stage and checkin.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;cd ~/Dropbox/myproject&lt;br /&gt;git init&lt;br /&gt;git add .&lt;br /&gt;git commit -m 'first commit'&lt;br /&gt;# after a while&lt;br /&gt;git status&lt;br /&gt;git commit -a -m 'another commit' &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Easy to do, and all my changes (even when I don't happen to check them in) follow me on all the computers I use dropbox on.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Shared Repo (use a Bare git repo)&lt;/h2&gt;&lt;br /&gt;In this case, I'll make a bare git repo and then share the folder with others.  I'll assume I'm starting with an existing project directory, but it is not a git repo yet.  (there are other ways to do this).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# my project is sitting on my local machine somewhere.&lt;br /&gt;# I will make it a normal git repository&lt;br /&gt;cd someproject&lt;br /&gt;git init&lt;br /&gt;git add .&lt;br /&gt;git commit -m 'first commit'&lt;br /&gt;# now make a bare git repository on my dopbox folder&lt;br /&gt;# by convention, bare repos end in '.git'&lt;br /&gt;mkdir -p ~/Dropbox/git/someproject.git  &lt;br /&gt;pushd ~/Dropbox/git/someproject.git &lt;br /&gt;git init --bare&lt;br /&gt;popd  # back where I was&lt;br /&gt;git remote add origin ~/Dropbox/git/someproject.git&lt;br /&gt;# now we can push and pull to our origin (see below if you get errors)&lt;br /&gt;git pull&lt;br /&gt;git push&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If you get trouble when pushing or pulling to your remote, add these lines to your ~/.gitconfig file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;[push]&lt;br /&gt; default = matching&lt;br /&gt;[branch "master"]&lt;br /&gt; remote = origin&lt;br /&gt; merge = refs/heads/master&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2296670081510654496?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2296670081510654496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2296670081510654496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2296670081510654496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2296670081510654496'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2011/02/using-dropbox-and-git.html' title='Using Dropbox and git'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4311619297268455082</id><published>2010-12-17T14:52:00.000-08:00</published><updated>2010-12-17T14:52:00.626-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby bash shell escape filename file name'/><title type='text'>Shell escaped file names in ruby</title><content type='html'>When files have crazy characters in their filename (like ' or ""), it can make creating a robust script challenging.  After all, if you write the script with either a single quotation mark or a double quotation mark, the other one will trip you up:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;file1 = "my'crazy'file.txt"&lt;br /&gt;file2 = 'my"crazy"file.txt'&lt;br /&gt;system "mv \"#{file2}\" bettername.txt"  # fails on file2&lt;br /&gt;system "mv '#{file2}' bettername.txt"    # fails on file1&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The answer is to use the multiple arguments invocation, which will properly escape your filename to be fully shell compatible:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;system "mv", file1, "bettername.txt"  # works on file1 or file2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4311619297268455082?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4311619297268455082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4311619297268455082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4311619297268455082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4311619297268455082'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/12/shell-escaped-file-names-in-ruby.html' title='Shell escaped file names in ruby'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2346567476065565814</id><published>2010-12-09T21:40:00.000-08:00</published><updated>2010-12-09T21:45:54.640-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='narray ruby code install compile'/><title type='text'>Playing with (compiling) the redesigned NArray</title><content type='html'>Masahiro Tanaka has been redesigning NArray.  Word is that it may be pulled into mainline ruby.&lt;br /&gt;&lt;br /&gt;So, what is it like?  Amazing from what I can tell.  How do you play with it?  At least on Ubuntu 10.10, this is what I did (there may be other dependencies I've neglected here):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install libatlas-dev libatlas-base-dev&lt;br /&gt;# modify extconf.rb:&lt;br /&gt;have_header("atlas/cblas.h")   ===&gt;   have_header("cblas.h")&lt;br /&gt;# modify linalg.c&lt;br /&gt;#include &amp;lt;atlas/cblas.h&amp;gt;   ===&gt;   #include &amp;lt;cblas.h&amp;gt;&lt;br /&gt;# for ruby 1.9, you also need to change a few normal array things:&lt;br /&gt;&lt;br /&gt;diff -r ../narray-new-1.8/narray.c ./narray.c&lt;br /&gt;211,212c211,212&lt;br /&gt;&lt;     n = RARRAY(idxargs)-&gt;len;&lt;br /&gt;&lt;     ptr = RARRAY(idxargs)-&gt;ptr;&lt;br /&gt;---&lt;br /&gt;&gt;     n = RARRAY_LEN(idxargs);&lt;br /&gt;&gt;     ptr = RARRAY_PTR(idxargs);&lt;br /&gt;232c232,233&lt;br /&gt;&lt; const static size_t zero=0;&lt;br /&gt;---&lt;br /&gt;&gt; //const static size_t zero=0;&lt;br /&gt;&gt; static const size_t zero=0;&lt;br /&gt;463c464&lt;br /&gt;&lt;      ndim = RARRAY(v)-&gt;len;&lt;br /&gt;---&lt;br /&gt;&gt;      ndim = RARRAY_LEN(v);&lt;br /&gt;761a763&lt;br /&gt;&gt;     VALUE *ptr;&lt;br /&gt;774,775c776,778&lt;br /&gt;&lt;  RARRAY(v)-&gt;ptr[i] = SIZE2NUM(na-&gt;shape[c]);&lt;br /&gt;&lt;  RARRAY(v)-&gt;len++;&lt;br /&gt;---&lt;br /&gt;&gt;  RARRAY_PTR(v)[i] = SIZE2NUM(na-&gt;shape[c]);&lt;br /&gt;&gt;  ptr = RARRAY_LEN(v);&lt;br /&gt;&gt;     ptr++;&lt;br /&gt;diff -r ../narray-new-1.8/nstruct.c ./nstruct.c&lt;br /&gt;301c301&lt;br /&gt;&lt;      ndim = RARRAY(argv[i])-&gt;len;&lt;br /&gt;---&lt;br /&gt;&gt;      ndim = RARRAY_LEN(argv[i]);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;now, you should be able to "ruby extconf.rb", "make", and then &lt;i&gt;require 'narray'&lt;/i&gt; or &lt;i&gt;require './narray.so'&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2346567476065565814?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2346567476065565814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2346567476065565814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2346567476065565814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2346567476065565814'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/12/working-with-redesigned-narray.html' title='Playing with (compiling) the redesigned NArray'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1814598496253084946</id><published>2010-09-28T09:22:00.000-07:00</published><updated>2010-09-28T11:22:38.646-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='checkinstall rubygems ruby 1.9 ruby1.9'/><title type='text'>Compile ruby 1.9.2 on Ubuntu</title><content type='html'>assumes you have build-essential package installed&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2&lt;br /&gt;tar -xjvf ruby-1.9.2-p0.tar.bz2&lt;br /&gt;cd ruby-1.9.2-p0&lt;br /&gt;./configure --enable-shared --program-suffix=1.9.2&lt;br /&gt;make&lt;br /&gt;make check # optional&lt;br /&gt;sudo checkinstall make install&lt;br /&gt;# [follow the defaults until here:&lt;br /&gt;# NOTE that you want the extra files inside your directory.&lt;br /&gt;# those extra files contain things like the openssl libraries!!&lt;br /&gt;&lt;br /&gt;    Some of the files created by the installation are inside the build&lt;br /&gt;    directory: /home/jtprince/src/ruby-1.9.2-p0&lt;br /&gt;&lt;br /&gt;    You probably don't want them to be included in the package,&lt;br /&gt;    especially if they are inside your home directory.&lt;br /&gt;    Do you want me to list them?  [n]: n&lt;br /&gt;    Should I exclude them from the package? (Saying yes is a good idea)  [y]: n&lt;br /&gt;&lt;br /&gt;# At this point, you can install the package on machines of the same&lt;br /&gt;# architecture with "sudo dpkg -i ruby-1.9.2_p0-1_amd64.deb" [depending on your arch]&lt;br /&gt;&lt;br /&gt;sudo rm /usr/bin/ruby&lt;br /&gt;sudo ln -s /usr/local/bin/ruby1.9.2 /usr/bin/ruby&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Okay, now you need to get rubygems working properly.  Remember, rubygems comes with ruby 1.9.X, so you don't need to download it separately.&lt;br /&gt;&lt;br /&gt;At this point, we have to ensure our soft links point where we want and to tell gems to point to ruby 1.9.2 &lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;sudo cp /usr/bin/gem1.9.{1,2}&lt;br /&gt;# then edit /usr/bin/gem1.9.2&lt;br /&gt;# change #!/usr/bin/ruby1.9.1 ==&gt; #!/usr/local/bin/ruby1.9.2&lt;br /&gt;&lt;br /&gt;# now set up the soft link so that "gem" calls our gem1.9.2&lt;br /&gt;sudo rm /etc/alternatives/gem&lt;br /&gt;sudo ln -s /usr/bin/gem1.9.2 /etc/alternatives/gem&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Maybe it is unnecessary, but I moved my local gem folder so that all my gems are compiled from scratch again to ensure they have been built against 1.9.2.  &lt;a href="http://sudoit.blogspot.com/2010/05/debianubuntu-gem-environment-of-your.html"&gt;how to set up a local gem environment&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;mv ~/.gem/ruby/{,not_using_}1.9.1&lt;br /&gt;mkdir ~/.gem/ruby/1.9.2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1814598496253084946?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1814598496253084946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1814598496253084946' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1814598496253084946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1814598496253084946'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/compile-ruby-192-on-ubuntu.html' title='Compile ruby 1.9.2 on Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1911325307052628706</id><published>2010-09-21T13:17:00.000-07:00</published><updated>2010-09-21T13:17:12.302-07:00</updated><title type='text'>Installing graphviz on Ubuntu Lucid Lynx 10.04</title><content type='html'>If you want &lt;b&gt;sfdp&lt;/b&gt; (a great layout for large graphs), then you need the .debs from the graphviz site (not through the ubuntu repos).&lt;br /&gt;&lt;br /&gt;Download the develpment snapshots &lt;a href="http://www.graphviz.org/Download_linux_ubuntu.php"&gt;here&lt;/a&gt;&lt;br /&gt;note, if you don't use the language specific bindings listed, you don't need to download those.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;sudo aptitude install libdevil1c2 libgtkglext1&lt;br /&gt;sudo dpkg -i graphviz_*.deb graphviz-dev*_all.deb &lt;br /&gt;graphviz-doc*_all.deb libgraphviz4_*.deb libgraphviz-dev_*.deb libgv-ruby_*.deb&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, you can run &lt;b&gt;sfdp&lt;/b&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1911325307052628706?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1911325307052628706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1911325307052628706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1911325307052628706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1911325307052628706'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/installing-graphviz-on-ubuntu-lucid.html' title='Installing graphviz on Ubuntu Lucid Lynx 10.04'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-440518004051026406</id><published>2010-09-14T18:57:00.001-07:00</published><updated>2010-09-14T18:57:59.969-07:00</updated><title type='text'>Biostatistics vs Lab Research</title><content type='html'>&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/PbODigCZqL8&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xd0d0d0&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/PbODigCZqL8&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xd0d0d0&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-440518004051026406?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/440518004051026406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=440518004051026406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/440518004051026406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/440518004051026406'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/biostatistics-vs-lab-research.html' title='Biostatistics vs Lab Research'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6991262098629825265</id><published>2010-09-05T22:42:00.000-07:00</published><updated>2010-09-05T22:57:42.170-07:00</updated><title type='text'>for anything complicated, ruby eats bash for breakfast</title><content type='html'>&lt;a href="http://www.sklav.com/node/4"&gt;http://www.sklav.com/node/4&lt;/a&gt; shows a bash solution to the issue debated &lt;a href="http://www.linuxtutorialblog.com/post/solution-converting-flac-to-mp3"&gt;here&lt;/a&gt;.  Regardless of how good a bash script is, it inevitably is not very DRY, I think because it is hard to be DRY in bash scripting.&lt;br /&gt;&lt;br /&gt;Here is a ruby solution.  Of course, all I did was factor, which is easy in ruby:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;&lt;br /&gt;lame_opts = "--preset standard -q0"&lt;br /&gt;&lt;br /&gt;if ARGV.size == 0&lt;br /&gt;  puts "usage: #{File.basename(__FILE__)} &lt;file&gt;.flac ..."&lt;br /&gt;  puts "output: &lt;file&gt;.mp3"&lt;br /&gt;  puts ""&lt;br /&gt;  puts "uses lame opts: #{lame_opts}"&lt;br /&gt;  puts "retains tag info"&lt;br /&gt;  exit&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;tag_convert = {&lt;br /&gt;  :tt =&gt; "TITLE",&lt;br /&gt;  :tl =&gt; "ALBUM",&lt;br /&gt;  :ta =&gt; "ARTIST",&lt;br /&gt;  :tn =&gt; "TRACKNUMBER",&lt;br /&gt;  :tg =&gt; "GENRE",&lt;br /&gt;  :ty =&gt; "DATE",&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ARGV.each do |file|&lt;br /&gt;  tag_opts = tag_convert.map do |key,val|&lt;br /&gt;    # comes out as TITLE=&lt;the title&gt;&lt;br /&gt;    data = `metaflac --show-tag=#{val} #{file}`.split("=",2).last&lt;br /&gt;    "--#{key} #{data}"&lt;br /&gt;  end&lt;br /&gt;  mp3name = file.chomp(File.extname(file)) + ".mp3"&lt;br /&gt;  `flac -dc #{file} | lame #{lame_opts} #{tag_opts.join(" ")} --add-id3v2 - #{mp3name}`&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Fairly easy to follow, especially since we don't repeat ourselves.  Most of the code is in creating a useful help message.&lt;br /&gt;&lt;br /&gt;For Perl hackers, here is the entire script on a few lines of less than 105 chars per line:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;tag_convert = {:tt=&gt;"TITLE",:tl=&gt;"ALBUM",:ta=&gt;"ARTIST",:tn=&gt;"TRACKNUMBER",:tg=&gt;"GENRE",:ty=&gt;"DATE"}&lt;br /&gt;ARGV.each do |f| &lt;br /&gt;  tgs = tag_convert.map {|k,v| "--#{k} "+`metaflac --show-tag=#{v} #{f}`.split("=",2).last}.join(" ")&lt;br /&gt;  `flac -dc #{f} | lame --preset standard -q0 #{tgs} --add-id3v2 - #{f.sub(/.flac$/i,".mp3")}`&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;There are still ways to compress this further, but it is very concise and surprisingly easy to follow (if you know ruby).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6991262098629825265?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6991262098629825265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6991262098629825265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6991262098629825265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6991262098629825265'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/for-anything-complicated-ruby-eats-bash.html' title='for anything complicated, ruby eats bash for breakfast'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1345118282121955155</id><published>2010-09-01T15:46:00.000-07:00</published><updated>2010-09-01T15:46:12.637-07:00</updated><title type='text'>For sets of integers, lookup speed goes: Array &gt; Hash &gt; Set</title><content type='html'>You have some set of integers and you need to query it repeatedly to determine if a member is in it or not. &lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;require 'benchmark'&lt;br /&gt;require 'set'&lt;br /&gt;&lt;br /&gt;ar = (0...1000).to_a&lt;br /&gt;&lt;br /&gt;ar_index = []&lt;br /&gt;hash_index = {}&lt;br /&gt;ar.each do |v|&lt;br /&gt;  ar_index[v] = true&lt;br /&gt;  hash_index[v] = true&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;set_index = Set.new(ar)&lt;br /&gt;access = (0...1000).to_a&lt;br /&gt;&lt;br /&gt;TIMES = 10000&lt;br /&gt;&lt;br /&gt;Benchmark.bmbm do |r|&lt;br /&gt;  r.report("array index") { TIMES.times { access.each {|v| ar_index[v] } } }&lt;br /&gt;  r.report("hash index") { TIMES.times { access.each {|v| hash_index[v] } } }&lt;br /&gt;  r.report("hash include") { TIMES.times { access.each {|v| hash_index.include?(v) } } }&lt;br /&gt;  r.report("set include") { TIMES.times { access.each {|v| set_index.include?(v) } } }&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The output (ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;                   user     system      total        real&lt;br /&gt;array index    0.730000   0.000000   0.730000 (  0.745341)&lt;br /&gt;hash index     0.990000   0.000000   0.990000 (  1.003517)&lt;br /&gt;hash include   1.310000   0.000000   1.310000 (  1.332846)&lt;br /&gt;set include    1.970000   0.000000   1.970000 (  2.024808)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1345118282121955155?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1345118282121955155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1345118282121955155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1345118282121955155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1345118282121955155'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/for-sets-of-integers-lookup-speed-goes.html' title='For sets of integers, lookup speed goes: Array &gt; Hash &gt; Set'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2753173135426169119</id><published>2010-09-01T13:17:00.000-07:00</published><updated>2010-09-01T13:18:06.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby round rounding numeric float sprintf'/><title type='text'>It's faster to numerically round than to sprintf in ruby</title><content type='html'>&lt;pre&gt;&lt;code&gt;require 'benchmark'&lt;br /&gt;&lt;br /&gt;class Float&lt;br /&gt;  def round_to(x)&lt;br /&gt;    (self * 10**x).round.to_f / 10**x&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def ceil_to(x)&lt;br /&gt;    (self * 10**x).ceil.to_f / 10**x&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def floor_to(x)&lt;br /&gt;    (self * 10**x).floor.to_f / 10**x&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def round_to_sprintf_f(x)&lt;br /&gt;    ("%.#{x}f" % x).to_f&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def round_to_sprintf_sprintf(x)&lt;br /&gt;    sprintf("%.#{x}f", x)&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def round_to_sprintf_modulus(x)&lt;br /&gt;    "%.#{x}f" % x&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;num = 34.2342134&lt;br /&gt;place = 3&lt;br /&gt;&lt;br /&gt;TIMES = 1000000&lt;br /&gt;Benchmark.bmbm do |r|&lt;br /&gt;  r.report("numeric round_to (float)") { TIMES.times { num.round_to(place) } }&lt;br /&gt;  r.report("numeric round_to (to string)") { TIMES.times { num.round_to(place).to_s } }&lt;br /&gt;  r.report("sprintf (float)") { TIMES.times { num.round_to_sprintf_f(place) } }&lt;br /&gt;  r.report("sprintf (string)") { TIMES.times { num.round_to_sprintf_sprintf(place) } }&lt;br /&gt;  r.report("sprintf modulus (string)") { TIMES.times { num.round_to_sprintf_modulus(place) } }&lt;br /&gt;end&lt;/code&gt;&lt;/pre&gt;The output:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;% ruby -v&lt;br /&gt;ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]&lt;br /&gt;...&lt;br /&gt;                                   user     system      total        real&lt;br /&gt;numeric round_to (float)       0.820000   0.000000   0.820000 (  0.819920)&lt;br /&gt;numeric round_to (to string)   1.990000   0.000000   1.990000 (  1.989912)&lt;br /&gt;sprintf (float)                3.620000   0.000000   3.620000 (  3.614758)&lt;br /&gt;sprintf (string)               2.650000   0.000000   2.650000 (  2.654812)&lt;br /&gt;sprintf modulus (string)       3.190000   0.000000   3.190000 (  3.191807)&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The conclusion: Regardless of whether you are going to a string or numeric after rounding, it is faster to round numerically than with sprintf.  Also, using the sprintf function is faster than '%'.  Usually speed doesn't matter, but when it does...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2753173135426169119?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2753173135426169119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2753173135426169119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2753173135426169119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2753173135426169119'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/09/its-faster-to-numerically-round-than-to.html' title='It&apos;s faster to numerically round than to sprintf in ruby'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5572587108879356228</id><published>2010-08-19T11:05:00.000-07:00</published><updated>2010-08-19T11:05:07.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R columns statistics matrix linear algebra'/><title type='text'>apply &amp; sweep : Column-wise &amp; Row-wise operations in R</title><content type='html'>How do you do operations on rows and columns in R?  &lt;b&gt;apply&lt;/b&gt; and &lt;b&gt;sweep&lt;/b&gt; are the main tools.  Here is an example of "autoscaling" (mean center and divide by standard deviation) &lt;i&gt;on each column&lt;/i&gt;:&lt;br /&gt;&lt;br /&gt;[I verified that this is correct on oocalc]&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# 1 -&gt; across the rows&lt;br /&gt;# 2 -&gt; across the columns &lt;br /&gt;m &lt;- matrix(data=c(1,2,3,4,4.5,6,7,8,9,10,11,13), nrow=4, ncol=3)&lt;br /&gt;m&lt;br /&gt;#      [,1] [,2] [,3]&lt;br /&gt;# [1,]    1  4.5    9&lt;br /&gt;# [2,]    2  6.0   10&lt;br /&gt;# [3,]    3  7.0   11&lt;br /&gt;# [4,]    4  8.0   13&lt;br /&gt;&lt;br /&gt;colmeans &lt;- apply(mymatrix, 2, mean)  # the column-wise means&lt;br /&gt;# mc = the column-wise mean centered data&lt;br /&gt;mc &lt;- sweep(m, 2, colmeans, "-")   # subtract is the default&lt;br /&gt;&lt;br /&gt;col_stdev &lt;- apply(m, 2, sd)  # column-wise standard deviations&lt;br /&gt;&lt;br /&gt;mcstd &lt;- sweep(mc, 2, col_stdev, "/")  # divide by standard deviations&lt;br /&gt;&lt;br /&gt;mcstd&lt;br /&gt;#            [,1]       [,2]      [,3]&lt;br /&gt;# [1,] -1.1618950 -1.2558275 -1.024695&lt;br /&gt;# [2,] -0.3872983 -0.2511655 -0.439155&lt;br /&gt;# [3,]  0.3872983  0.4186092  0.146385&lt;br /&gt;# [4,]  1.1618950  1.0883839  1.317465&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5572587108879356228?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5572587108879356228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5572587108879356228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5572587108879356228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5572587108879356228'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/08/apply-sweep-column-wise-row-wise.html' title='apply &amp; sweep : Column-wise &amp; Row-wise operations in R'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1903944936154835146</id><published>2010-08-05T16:56:00.000-07:00</published><updated>2010-08-05T16:56:31.613-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R-project R slope regression pearsons correlation cor'/><title type='text'>Regression line, R^2 (Pearson's correlation coefficient), slope, and y intercept in R</title><content type='html'>A basic feature in Excel and OpenOffice Calc is to find and plot the regression line.  Here is an example of doing this in R.  This is more work in R, but you are sacrificing for more power.&lt;br /&gt;&lt;br /&gt;Here is how we get the data out:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;x = c(1,2,3,4,5)&lt;br /&gt;y = c(3,4,5,5.1,6.2)&lt;br /&gt;pearsons_r = cor(x,y)&lt;br /&gt;r_squared = pearsons_r^2&lt;br /&gt;fit = lm(y~x) # notice the order of variables&lt;br /&gt;y_intercept = as.numeric(fit$coeff[1])&lt;br /&gt;slope = as.numeric(fit$coeff[2])&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here is how we plot it:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;plot(x,y)&lt;br /&gt;abline(lm(y~x)) # again, notice the order&lt;br /&gt;function_string = paste("f(x) = ", slope, "x + ", y_intercept,  sep="")&lt;br /&gt;r_sq_string = paste("R^2 =", r_squared)&lt;br /&gt;display_string = paste(function_string, r_sq_string, sep="\n")&lt;br /&gt;mtext(display_string, side=3, adj=1)  # top right outside of the margin&lt;/code&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j5Oah6iCmCU/TFtPg3iqDtI/AAAAAAAAAdw/bSun6c2G8ng/s1600/R+regression+line+plot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_j5Oah6iCmCU/TFtPg3iqDtI/AAAAAAAAAdw/bSun6c2G8ng/s320/R+regression+line+plot.png" width="314" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1903944936154835146?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1903944936154835146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1903944936154835146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1903944936154835146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1903944936154835146'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/08/regression-line-r2-pearsons-correlation.html' title='Regression line, R^2 (Pearson&apos;s correlation coefficient), slope, and y intercept in R'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_j5Oah6iCmCU/TFtPg3iqDtI/AAAAAAAAAdw/bSun6c2G8ng/s72-c/R+regression+line+plot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4157574258070792006</id><published>2010-06-17T14:01:00.000-07:00</published><updated>2010-06-17T14:01:35.895-07:00</updated><title type='text'>clone a VDI Virtual Box image for using elsewhere</title><content type='html'>How robust is this procedure (found &lt;a href="http://forums.virtualbox.org/viewtopic.php?t=674"&gt;here&lt;/a&gt;)?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Shut down the virtual machine you would like to copy&lt;/li&gt;&lt;li&gt;In File &amp;gt; Virtualdiskmanager, select the virtual machine disk  image you would like to copy, and press the Release button&lt;/li&gt;&lt;li&gt;In a terminal window, issue following command (see virtualbox  user manual):&lt;br /&gt;vboxmanage clonevdi /directory/image1.vdi /directory/image2.vdi&lt;/li&gt;&lt;li&gt; In File &amp;gt; Virtualdiskmanager, add the new disk image you've  created in step 3&lt;/li&gt;&lt;li&gt;In the main virtualbox window, press the New button to create a  new virtual machine, and link it to the new disk image you've created.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4157574258070792006?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4157574258070792006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4157574258070792006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4157574258070792006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4157574258070792006'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/06/clone-vdi-virtual-box-image-for-using.html' title='clone a VDI Virtual Box image for using elsewhere'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8152817582357519737</id><published>2010-06-09T16:40:00.000-07:00</published><updated>2010-06-10T07:57:57.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cartoon biology molecularbiology figure schematic diagram illustration'/><title type='text'>Cartoons in biology??  How about: diagram, figure, illustration or schematic</title><content type='html'>Molecular biologists often refer to depictions of cellular processes or structure as &lt;b&gt;&lt;i&gt;cartoons&lt;/i&gt;&lt;/b&gt;.&amp;nbsp; (&lt;a href="http://www.rpgroup.caltech.edu/courses/aph161/Handouts/chap2.pdf"&gt;here is an example&lt;/a&gt;).&amp;nbsp; I think it is a poor word choice.&amp;nbsp; &lt;i&gt;Cartoon&lt;/i&gt; is generally used to indicate a humorous depiction or an unfinished product (&lt;i&gt;i.e.&lt;/i&gt;, a sketch on a &lt;i&gt;carton&lt;/i&gt;), so it is somewhat insulting to the creator of the illustration (unless it is, in fact, unfinished or humorous).&amp;nbsp; What I think they are trying to say by calling their diagram a cartoon is something like: "do not forget that this diagram is a vast oversimplification of reality!&amp;nbsp; Proteins are not really boxes and lines are really not protein associations!&amp;nbsp; Proteins aren't made of ribbons!"&amp;nbsp; At times, one also gets the feeling they are trying to convey something more, "Our field is so complex, our diagrams are ludicrously simple compared to reality!" or even, "Aren't I cute for calling this a cartoon even though this is a science talk!"&lt;br /&gt;&lt;br /&gt;Fortunately, there are several other words suggesting that a depiction is not a precise  representation of reality but rather a simplification that serves to  emphasize certain facts or relationships, &lt;b&gt;and&lt;/b&gt; they don't carry any of &lt;i&gt;cartoon&lt;/i&gt;'s demeaning connotations: &lt;i&gt;diagram&lt;/i&gt;, &lt;i&gt;figure&lt;/i&gt;, &lt;i&gt;illustration&lt;/i&gt;, &lt;i&gt;schematic&lt;/i&gt;.&amp;nbsp; IMHO, these are vastly preferable for referring to depictions of biological phenomenon.&amp;nbsp; This seems to be well supported by definitions, synonyms, and word associations:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: medium;"&gt;Merriam-Webster  (online)&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;span class="f"&gt;&lt;cite&gt;&lt;br /&gt;&lt;/cite&gt;&lt;/span&gt;&lt;b&gt;diagram&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Etymology:  Greek &lt;i&gt;diagramma,&lt;/i&gt; from &lt;i&gt;diagraphein&lt;/i&gt;  to  mark out by lines, from &lt;i&gt;dia-&lt;/i&gt; + &lt;i&gt;graphein&lt;/i&gt; to write  —  more at carve&lt;/div&gt;&lt;div&gt;Date:    1619&lt;/div&gt;&lt;div class="d"&gt;&lt;b&gt;1&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; a graphic design that  explains rather than represents; &lt;i&gt;especially&lt;/i&gt;  &lt;b&gt;:&lt;/b&gt;  a drawing that shows arrangement and relations (as of parts)&lt;br /&gt;&lt;b&gt;2&lt;/b&gt;  &lt;b&gt;:&lt;/b&gt; a line drawing made for mathematical or scientific  purposes&lt;/div&gt;&lt;br /&gt;&lt;b&gt;schema&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Inflected Form(s):  &lt;i&gt;plural&lt;/i&gt;   &lt;b&gt;sche·ma·ta&lt;/b&gt; &lt;span class="pr"&gt;\-mə-tə\&lt;/span&gt;  &lt;i&gt;also&lt;/i&gt;  &lt;b&gt;schemas&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Etymology:  Greek &lt;i&gt;schēmat-, schēma&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Date: circa 1890&lt;/div&gt;&lt;div class="d"&gt;&lt;b&gt;1&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; a diagrammatic  presentation; &lt;i&gt;broadly&lt;/i&gt;  &lt;b&gt;:&lt;/b&gt; a structured  framework or plan &lt;b&gt;:&lt;/b&gt; outline&lt;/div&gt;&lt;script type="text/javascript"&gt;&lt;!-- if ( typeof(outputMyDictionaryLink) != "undefined" )  { var entry = document.getElementById("mwEntryData");   var hw  = entry &amp;&amp; entry.getAttribute("mwref:hw") ? entry.getAttribute("mwref:hw") : "";   var fl  = entry &amp;&amp; entry.getAttribute("mwref:fl") ? entry.getAttribute("mwref:fl") : "";   outputMyDictionaryLink(hw, fl);  }; // if ( typeof(outputMyDictionaryLink) != "undefined" )// --&gt;&lt;/script&gt;                     &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;figure&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Etymology: Middle English, from  Anglo-French, from Latin &lt;i&gt;figura,&lt;/i&gt;  from &lt;i&gt;fingere&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Date: 13th century&lt;/div&gt;&lt;b&gt;2 a&lt;/b&gt;  &lt;b&gt;:&lt;/b&gt; a geometric form (as a line,  triangle, or sphere) especially when considered as a set of geometric  elements (as points) in space of a given number of dimensions &lt;span class="vi"&gt;&lt;a a="" figure="" href="http://www.blogger.com/post-edit.g?blogID=9170434694647900866&amp;amp;postID=8152817582357519737" is="" plane="" square=""&gt;&lt;/a&gt;&lt;/span&gt; &lt;b&gt;b&lt;/b&gt; &lt;b&gt;:&lt;/b&gt;  bodily shape or form especially of a person &lt;span class="vi"&gt;&lt;/span&gt; &lt;b&gt;c&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; an  object noticeable only as a shape or form &lt;span class="vi"&gt;&lt;figure&gt;&lt;i&gt;s&lt;/i&gt;  moving in the dusk&amp;gt;&lt;/figure&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;3 a&lt;/b&gt; &lt;b&gt;:&lt;/b&gt;  the graphic representation of a form especially of a person or  geometric entity &lt;b&gt;b&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; a diagram or  pictorial illustration of textual matter&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;illustration&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Date: 14th century&lt;/div&gt;&lt;div class="d"&gt;&lt;b&gt;2&lt;/b&gt;   &lt;b&gt;:&lt;/b&gt; something that serves to illustrate: as &lt;b&gt;a&lt;/b&gt; &lt;b&gt;:&lt;/b&gt;  an example or instance that helps make something clear &lt;b&gt;b&lt;/b&gt;  &lt;b&gt;:&lt;/b&gt; a picture or diagram that helps make something clear  or attractive &lt;/div&gt;&lt;br /&gt;&lt;b&gt;cartoon&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Etymology:  Italian &lt;i&gt;cartone&lt;/i&gt; pasteboard, cartoon,  augmentative of &lt;i&gt;carta&lt;/i&gt; leaf of paper  — more at card&lt;/div&gt;&lt;div&gt;Date:   1671&lt;/div&gt;&lt;div class="d"&gt;&lt;b&gt;1&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; a  preparatory design, drawing, or painting (as for a fresco)&lt;br /&gt;&lt;b&gt;2 a&lt;/b&gt;  &lt;b&gt;:&lt;/b&gt; a drawing intended as satire, caricature, or humor &lt;span class="vi"&gt;&lt;a cartoon="" href="http://www.blogger.com/post-edit.g?blogID=9170434694647900866&amp;amp;postID=8152817582357519737" political=""&gt;&lt;/a&gt;&lt;/span&gt; &lt;b&gt;b&lt;/b&gt; &lt;b&gt;:&lt;/b&gt;  comic  strip&lt;br /&gt;&lt;b&gt;3&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; animated   cartoon&lt;br /&gt;&lt;b&gt;4&lt;/b&gt; &lt;b&gt;:&lt;/b&gt; a ludicrously  simplistic, unrealistic, or one-dimensional portrayal or version &lt;span class="vi"&gt;&lt;the&gt;&lt;the an="" cartoon="" entertaining="" film="" is="" s="" villain=""&gt;;&lt;/the&gt;&lt;/the&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: medium;"&gt;Thesaurus.com&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;diagram&lt;/b&gt;&lt;br /&gt;Part&amp;nbsp;  of&amp;nbsp; Speech:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; noun&lt;br /&gt;Definition: &amp;nbsp;&amp;nbsp;&amp;nbsp; drawing, sketch of form or  plan&lt;br /&gt;Synonyms: &amp;nbsp;&amp;nbsp;&amp;nbsp; big picture, blueprint, chart, description,  design, draft, figure, floor plan, game, game plan, ground plan, layout,  outline, perspective, representation, rough draft &lt;br /&gt;&lt;br /&gt;&lt;b&gt;schema&lt;/b&gt;&lt;br /&gt;Part&amp;nbsp;  of&amp;nbsp; Speech:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; noun&lt;br /&gt;Definition: &amp;nbsp;&amp;nbsp;&amp;nbsp; design&lt;br /&gt;Synonyms: &amp;nbsp;&amp;nbsp;&amp;nbsp;  architecture, arrangement, blueprint, chart, comp, composition,  conception, constitution, construction, delineation, depiction, diagram,  doodle, drawing, dummy, form, formation, game plan, idea, layout,  makeup, map, method, model, outline, paste-up, pattern, perspective,  picture, plan, project, scheme, strategy, study, tracery, tracing,  treatment&lt;br /&gt;&lt;br /&gt;&lt;b&gt;figure&lt;/b&gt;&lt;br /&gt;Part&amp;nbsp; of&amp;nbsp; Speech:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; noun&lt;br /&gt;Definition:  &amp;nbsp;&amp;nbsp;&amp;nbsp; object with design; depiction&lt;br /&gt;Synonyms: &amp;nbsp;&amp;nbsp;&amp;nbsp; cast, composition,  decoration, device, diagram, drawing, effigy, embellishment, emblem,  illustration, image, model, mold, motif, motive, ornamentation, pattern,  piece, portrait, representation, sketch, statue&lt;br /&gt;&lt;br /&gt;&lt;b&gt;illustration&lt;/b&gt;&lt;br /&gt;Part&amp;nbsp; of&amp;nbsp; Speech:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; noun&lt;br /&gt;Definition: &amp;nbsp;&amp;nbsp;&amp;nbsp; drawing, artwork that assists explanation&lt;br /&gt;Synonyms: &amp;nbsp;&amp;nbsp;&amp;nbsp; adornment, cartoon, decoration, depiction, design,  engraving, etching, figure, frontispiece, halftone, image, line drawing,  painting, photo, photograph, picture, plate, sketch, snapshot,  tailpiece, vignette&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cartoon&lt;/b&gt;&lt;br /&gt;Part&amp;nbsp; of&amp;nbsp; Speech:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; noun&lt;br /&gt;Definition: &amp;nbsp;&amp;nbsp;&amp;nbsp;  funny drawing, often with dialogue or caption&lt;br /&gt;Synonyms: &amp;nbsp;&amp;nbsp;&amp;nbsp;  animation, caricature, comic strip, drawing, lampoon, parody,  representation, satire, sketch, takeoff&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;www.wordassociation.org&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;associated to  diagram&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; chart&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; graph&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; draw&amp;nbsp;&amp;nbsp;&amp;nbsp;  v. weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; plan&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; block&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;associated  from diagram&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; chart&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; picture&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;  diaphragm&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; drawing&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; graph&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&lt;br /&gt;associated  to schema&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; scheme&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; axiom&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;  concept&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; fema&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; pooh&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;associated  from schema&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; scheme&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; database&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;  diagram&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; paradigm&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; seem&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;&lt;br /&gt;associated  to figure&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; stick&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; action&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;  father&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; shape&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; authority&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;associated from figure&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; shape&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; eight&amp;nbsp;&amp;nbsp;&amp;nbsp;  medium&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; skate&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; skating&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;  out&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&lt;br /&gt;associated to schematic&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; plan&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;  scheme&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; architecture&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; blueprint&amp;nbsp;&amp;nbsp;&amp;nbsp;  weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; diagram&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;associated from schematic&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;  blueprint&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; system&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; design&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;  drawing&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; love&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;&lt;br /&gt;associated to illustration&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; example&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; drawing&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; book&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; capella&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;associated from illustration&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; picture&amp;nbsp;&amp;nbsp;&amp;nbsp; strong&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; drawing&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; book&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; cartoon&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; draw&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;&lt;br /&gt;associated to cartoon&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; animation&amp;nbsp;&amp;nbsp;&amp;nbsp; v.  weak&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; simpsons&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; anime&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;  disney&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; character&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;associated  from cartoon&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; character&amp;nbsp;&amp;nbsp;&amp;nbsp; medium&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; network&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;  animation&amp;nbsp;&amp;nbsp;&amp;nbsp; weak&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; comic&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; tv&amp;nbsp;&amp;nbsp;&amp;nbsp; v. weak&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8152817582357519737?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8152817582357519737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8152817582357519737' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8152817582357519737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8152817582357519737'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/06/cartoons-in-biology-how-about-diagram.html' title='Cartoons in biology??  How about: diagram, figure, illustration or schematic'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6325598455322733794</id><published>2010-05-26T22:09:00.000-07:00</published><updated>2010-05-26T22:09:09.593-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby nokogiri mp3 download'/><title type='text'>Download all the mp3 links in a page given the url with ruby and nokogiri</title><content type='html'>You'll need ruby and the gem nokogiri installed.  Then run this &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;&lt;br /&gt;require 'nokogiri'&lt;br /&gt;require 'open-uri'&lt;br /&gt;&lt;br /&gt;if ARGV.size == 0&lt;br /&gt;  puts "usage: #{File.basename(__FILE__)} 'url' ..."&lt;br /&gt;  exit&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;ARGV.each do |url|&lt;br /&gt;  doc = open(url) {|io| Nokogiri.HTML(io.read) }&lt;br /&gt;&lt;br /&gt;  mp3_links = doc.xpath("//a").select {|link| link['href'] =~ /\.mp3$/ }&lt;br /&gt;  mp3_links.each do |link|&lt;br /&gt;    href = link['href']&lt;br /&gt;    outname = File.basename(href)&lt;br /&gt;    puts "Downloading: #{outname}"&lt;br /&gt;    open(href) do |io|&lt;br /&gt;      File.open(outname,'w') {|out| out.print(io.read) }&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6325598455322733794?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6325598455322733794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6325598455322733794' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6325598455322733794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6325598455322733794'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/05/download-all-mp3-links-in-page-given.html' title='Download all the mp3 links in a page given the url with ruby and nokogiri'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5604768097654825768</id><published>2010-05-12T08:36:00.000-07:00</published><updated>2010-08-23T09:01:48.642-07:00</updated><title type='text'>A debian/ubuntu gem environment of your very own</title><content type='html'>There are some differences with the way apt-get rubygems and downloaded and 'sudo ruby setup.rb' gems behave.  Here is how to bring the directory structure in conformity with the apt-get version and have your gem's bin folder in your path.  This is for using gems on a &lt;b&gt;per-user&lt;/b&gt; basis.&lt;br /&gt;&lt;br /&gt;Add these two lines to your ~/.bashrc file:&lt;br /&gt;&lt;pre&gt;# this will export the path to whatever version of ruby you are using:&lt;br /&gt;export GEM_HOME="$HOME/.gem/ruby/`ruby -e 'x=RUBY_VERSION;print(x=~/^1.8/ ? "1.8" : x)'`"&lt;br /&gt;export PATH="$PATH:$GEM_HOME/bin"&lt;/pre&gt;&lt;br /&gt;Then 'source ~/.bashrc' if needed and you can use either version of rubygems indistinguishably.&lt;br /&gt;&lt;br /&gt;Now, you can install gems with either rubygems, you don't need sudo privileges, and your gem executables will be active.  Wallah!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;gem install rake&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5604768097654825768?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5604768097654825768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5604768097654825768' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5604768097654825768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5604768097654825768'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/05/debianubuntu-gem-environment-of-your.html' title='A debian/ubuntu gem environment of your very own'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3215106426900911678</id><published>2010-05-07T13:06:00.000-07:00</published><updated>2010-05-07T13:14:55.658-07:00</updated><title type='text'>Yet another reason to love Ubuntu, multiple folder extraction</title><content type='html'>Today I needed to extract 20+ folders and I thought, I don't want to right-click over 20 times, wouldn't it be cool if I could just select all the folders, right-click and extract? Well, it worked like a charm and made my day. Now if only Ubuntu could solve the problem of all of my folders being over 2.5 Gb and taking forever to extract.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3215106426900911678?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3215106426900911678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3215106426900911678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3215106426900911678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3215106426900911678'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/05/yet-another-reason-to-love-ubuntu.html' title='Yet another reason to love Ubuntu, multiple folder extraction'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8043645948548347434</id><published>2010-05-04T22:42:00.000-07:00</published><updated>2010-05-04T22:55:57.893-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh server personal Ubuntu 10.04 lucid lynx'/><title type='text'>Your own legal ssh personal server on comcast with Ubuntu 10.04</title><content type='html'>&lt;h2&gt;Legal Matters&lt;/h2&gt;&lt;i&gt;It appears to me that a personal ssh server is legal and acceptable to use [at least if you are with Comcast].&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt; &lt;br /&gt;The Comcast &lt;a href="http://www.comcast.net/terms/use/"&gt;Terms of Service&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;The relevant bullets under &lt;b&gt;Technical restrictions&lt;/b&gt; are:&lt;br /&gt;&lt;blockquote&gt;* use or run dedicated, stand-alone equipment or servers from the Premises that provide network content or any other services to anyone outside of your Premises local area network (“Premises LAN”), also commonly referred to as public services or servers. Examples of prohibited equipment and servers include, but are not limited to, e-mail, Web hosting, file sharing, and proxy services and servers;&lt;br /&gt;* use or run programs from the Premises that provide network content or any other services to anyone outside of your Premises LAN, &lt;u&gt;&lt;i&gt;except for personal and non-commercial residential use&lt;/i&gt;&lt;/u&gt;;&amp;nbsp; (my emphasis)&lt;/blockquote&gt;Also, note that the ssh port (22) is &lt;a href="http://customer.comcast.com/Pages/FAQViewer.aspx?Guid=d3609bda-26c4-4200-a9ba-ba991251a9f6&amp;amp;AspxAutoDetectCookieSupport=1"&gt;not blocked by comcast&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How to setup a personal ssh server&lt;/h2&gt;This should work in many different distros and versions with only minor modification.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;pre&gt;sudo aptitude install openssh-server&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Since I have kids with weak passwords using my computer, I only want a couple accounts to be accessible.  Edit /etc/ssh/sshd_config and add something like this:&lt;br /&gt;&lt;pre&gt;AllowUsers user1 user2 user3&lt;br /&gt;&lt;/pre&gt;This will prevent other user accounts from being accessible.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It is generally a good idea to use a static IP address so your router knows where to send the ssh traffic.&amp;nbsp; Right click your wireless icon on the panel and edit your connection.&amp;nbsp; Shown to the right is a setup that is compatible with a linksys router (i.e., the router IP address is 192.168.1.1). &lt;a href="http://4.bp.blogspot.com/_j5Oah6iCmCU/S-EBpCwcRKI/AAAAAAAAAcY/j6Xm-0W8WPc/s1600/ipconnect.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_j5Oah6iCmCU/S-EBpCwcRKI/AAAAAAAAAcY/j6Xm-0W8WPc/s200/ipconnect.jpg" width="165" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Forward port 22 traffic to your statically assigned PC (see image below for router specs).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use a service like &lt;a href="http://dyndns.com/"&gt;dyndns.com&lt;/a&gt; to associate a static IP address with your dynamically assigned address.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Run ddclient to update dyndns.com.&lt;br /&gt;&lt;pre&gt;sudo aptitude install ddclient&lt;/pre&gt;Here is a configuration file (/etc/ddclient.conf) that works for me:&lt;br /&gt;&lt;pre&gt;daemon=600&lt;br /&gt;use=web, web=checkip.dyndns.com/, web-skip='IP Address'&lt;br /&gt;login=&lt;your login=""&gt;&lt;br /&gt;password=&lt;your dyndns.com="" password=""&gt;protocol=dyndns2&lt;br /&gt;server=members.dyndns.org&lt;br /&gt;wildcard=YES&lt;br /&gt;jtprince.dyndns.org, bwv549.homeip.net&lt;/your&gt;&lt;/your&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_j5Oah6iCmCU/S-EISg9LxCI/AAAAAAAAAcw/wOrynehnaMo/s1600/routing.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/_j5Oah6iCmCU/S-EISg9LxCI/AAAAAAAAAcw/wOrynehnaMo/s200/routing.png" width="198" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;your login=""&gt;&lt;your dyndns.com="" password=""&gt;&amp;nbsp;&lt;/your&gt;&lt;/your&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Now, you should be able to ssh into your home computer from anywhere in the world.  Also, please note that you can do just about anything with ssh access.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8043645948548347434?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8043645948548347434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8043645948548347434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8043645948548347434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8043645948548347434'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/05/your-own-legal-ssh-personal-server-on.html' title='Your own legal ssh personal server on comcast with Ubuntu 10.04'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_j5Oah6iCmCU/S-EBpCwcRKI/AAAAAAAAAcY/j6Xm-0W8WPc/s72-c/ipconnect.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4528494690607455568</id><published>2010-04-30T16:27:00.000-07:00</published><updated>2010-04-30T16:43:10.733-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.04 Asus 1201N Lucid Wireless Fix Bug'/><title type='text'>Asus Eee PC 1201N Wireless WPA2 Ubuntu Lucid Lynx 10.04 Fix</title><content type='html'>I was able to use wireless on 9.10 by compiling the one talked about on newegg and elsewhere.  However, I couldn't connect to the school's network.  On 10.04, it appears that they are using the same driver and it has the same problems (appears to work but won't connect to my school's WPA2 network).  I used &lt;a href="https://launchpad.net/~matt-price/+archive/mattprice"&gt;Matt Price's package&lt;/a&gt; and it works now!&lt;br /&gt;&lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;code&gt;sudo add-apt-repository ppa:matt-price/mattprice&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then add these lines to /etc/apt/sources.list:&lt;br /&gt;&lt;code&gt;deb http://ppa.launchpad.net/matt-price/mattprice/ubuntu lucid main &lt;br /&gt;deb-src http://ppa.launchpad.net/matt-price/mattprice/ubuntu lucid main&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4528494690607455568?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4528494690607455568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4528494690607455568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4528494690607455568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4528494690607455568'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/04/asus-eee-pc-1201n-wireless-wpa2-ubuntu.html' title='Asus Eee PC 1201N Wireless WPA2 Ubuntu Lucid Lynx 10.04 Fix'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-724008191690778117</id><published>2010-03-06T23:02:00.001-08:00</published><updated>2010-03-15T10:12:24.689-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh tunneling firewall sshfs'/><title type='text'>ssh tunneling (port forwarding)</title><content type='html'>The past two places I've worked at have had a single computer that would accept outside ssh communication.  However, other computers in the network also had useful things on them but could only be reached from inside the network.  How to connect to these other computers directly?&lt;br /&gt;&lt;br /&gt;ssh port forwarding allows you to open up an ssh session between you and your gateway computer.  Then, you can use that port to interact with the other computers in the network.  Here is an example of how to do this:&lt;br /&gt;&lt;br /&gt;Open a terminal and type in something like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;ssh -L&amp;lt;unused_port#&amp;gt;:&amp;lt;final_destination&amp;gt;:22 &amp;lt;gateway_computer&amp;gt;&lt;br /&gt;ssh -L22000:internalserver.super.duper.com:22 gateway.super.duper.com    # e.g.&lt;br /&gt;# you might want to add the -N and -C flags:&lt;br /&gt;ssh -N -C ...&lt;br /&gt;# -N   Do not execute a remote command (useful for forwarding ports)&lt;br /&gt;# -C   compress (for slow network connections only)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then, open another terminal and you can interact with the internal server as you normally would, just by interacting with your localhost through the specified port:&lt;br /&gt;&lt;code&gt;# log in to the internal server&lt;br /&gt;ssh -p 22000 localhost&lt;br /&gt;# scp stuff from the internal server&lt;br /&gt;scp -P 22000 localhost:~/somefile.txt ./     # copy files from the internal server to local&lt;br /&gt;# mount a folder from the internal server locally using sshfs&lt;br /&gt;sshfs -p 22000 localhost:/home/&amp;lt;user&amp;gt;/&amp;lt;internal_dir&amp;gt; /home/&amp;lt;user&amp;gt;/mnt -o follow_symlinks&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Yes that is localhost.  You are connecting to port 22000 on the localhost and that is being tunneled via the gateway computer to the internal server!&lt;br /&gt;&lt;br /&gt;This works but isn't the absolute slickest setup.  Anyone know the equivalent commands for .ssh/config files?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://crashingdaily.wordpress.com/2007/02/10/mounting-filesystems-with-ssh-forwarding-across-a-gateway/"&gt;This site&lt;/a&gt; has some alternative methods for mounting across ssh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-724008191690778117?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/724008191690778117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=724008191690778117' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/724008191690778117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/724008191690778117'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/03/ssh-tunneling-port-forwarding.html' title='ssh tunneling (port forwarding)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-7589241339326234823</id><published>2010-03-04T10:55:00.000-08:00</published><updated>2010-03-04T11:12:51.346-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux fonts wmii rumai'/><title type='text'>Fonts in rumai (wmii)</title><content type='html'>&lt;span style="font-family: arial;"&gt;How do you know what fonts you can use in rumai or wmii?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-family: arial;"&gt;xlsfonts&lt;/span&gt;&lt;span style="font-family: arial;"&gt; will list all the fonts in the format that wmii expects:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;xlsfonts &gt; available_fonts.txt&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;You can use the '*' symbol to generalize.  Here are some that work ok.  Some are quite ugly, others OK:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-*-fixed-medium-r-*-*-18-*-*-*-*-*-*-*&lt;br /&gt;-*-fixed-bold-r-*-*-12-*-*-*-*-*-*-*&lt;br /&gt;-*-fixed-medium-r-*-*-12-*-*-*-*-*-*-*&lt;br /&gt;lucidasans-bold-12&lt;br /&gt;-adobe-helvetica-medium-r-*-*-12&lt;br /&gt;-adobe-helvetica-bold-r-*-*-12&lt;br /&gt;-adobe-palatino-bold-r-*-*-14&lt;br /&gt;-*-lucida-bold-r-*-*-12&lt;br /&gt;-*-dejavu sans mono-medium-r-*-*-14&lt;br /&gt;-*-dejavu sans mono-medium-r-*-*-14&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-7589241339326234823?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/7589241339326234823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=7589241339326234823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7589241339326234823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7589241339326234823'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/03/fonts-in-rumai-wmii.html' title='Fonts in rumai (wmii)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3204149116375800273</id><published>2010-03-02T22:01:00.000-08:00</published><updated>2010-05-11T14:47:57.541-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu karmic koala wmii tiling gnome rumai windowmanager lucid lynx 9.10 10.04'/><title type='text'>wmii (rumai) with gnome in Ubuntu 9.10 &amp; 10.04</title><content type='html'>NOTE: modified from &lt;a href="http://www.kurses.com/wmii"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a step by step to install rumai as the windows manager in gnome.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;install necessary packages&lt;/li&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install dwm-tools # for menus&lt;br /&gt;sudo apt-get install libixp libx11-dev  # for the install itself (necessary??)&lt;/code&gt;&lt;/pre&gt;On Lucid Lynx I needed to install these two packages also:&lt;pre&gt;&lt;code&gt;sudo apt-get install 9base libxft2-dev   # plan 9 file system (need on 10.04)&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Install a good build&lt;/li&gt;The Ubuntu wmii packages (karmic? and jaunty?) and even the current repo can be buggy.  Download a solid build (hg2474) &lt;a href="https://docs.google.com/leaf?id=0B_PYE_eLmB97NDJmOGIyMjEtMmZlNy00NmQwLTlmZTMtMWEzMzgwZjYxZWY4&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50"&gt;here&lt;/a&gt; or &lt;a href="http://www.kurses.com/wmii/wmii-hg2474.tar.gz?attredirects=0&amp;amp;d="&gt;here&lt;/a&gt;.Unpack it, go into the &lt;span style="font-style: italic; font-weight: bold;"&gt;src&lt;/span&gt; directory and &lt;span style="font-style: italic; font-weight: bold;"&gt;sudo make install&lt;/span&gt;.&lt;li&gt;modify some gnome settings&lt;/li&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;gconftool-2 -s /apps/nautilus/preferences/show_desktop --type bool false&lt;br /&gt;gconftool-2 -s /desktop/gnome/background/draw_background --type bool false&lt;br /&gt;## Tell gnome to use wmii as the window manager&lt;br /&gt;gconftool-2 -s /desktop/gnome/session/required_components/windowmanager wmii --type string&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;have wmii fire up at login&lt;/li&gt;System -&gt; Preferences -&gt; Startup ApplicationsAdd an entry for &lt;i&gt;/usr/bin/wmii&lt;/i&gt;&lt;li&gt;get rumai&lt;/li&gt;make sure you have ruby and rubygems.  Works great with ruby 1.9. (I'm using 1.9.1)&lt;pre&gt;&lt;code&gt;gem install rumai&lt;/code&gt;&lt;/pre&gt;Also make sure your rubygems are executable by adding something like this to your .bashrc:&lt;pre&gt;&lt;code&gt;export PATH="$PATH:$HOME/.gem/ruby/`ruby -e 'print RUBY_VERSION'`/bin"&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;grab a rumai config wmiirc&lt;/li&gt;To make it easy for beginners, my master branch work's out of the box:&lt;pre&gt;&lt;code&gt;git clone git://github.com/jtprince/wmiirc.git ~/.wmii&lt;/code&gt;&lt;/pre&gt;For more advanced possibilities, you'll want to start with &lt;b&gt;sunaku's&lt;/b&gt; and then branch, etc.:&lt;pre&gt;&lt;code&gt;git clone git://github.com/sunaku/wmiirc.git ~/.wmii&lt;/code&gt;&lt;/pre&gt;Now make a soft link to the file this wmii will be looking in:&lt;pre&gt;&lt;code&gt;ln -s ~/.wmii ~/.wmii-hg&lt;/code&gt;&lt;/pre&gt;Now logout and back in and it should work.This is pretty stable and works pretty well.  If wmii crashes, restart in a terminal or from the panel (add a "run application") with the command "wmii" or "killall wmii &amp;&amp; wmii".&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3204149116375800273?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3204149116375800273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3204149116375800273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3204149116375800273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3204149116375800273'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/03/wmii-with-gnome-in-ubuntu-910.html' title='wmii (rumai) with gnome in Ubuntu 9.10 &amp; 10.04'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1869539334991128383</id><published>2010-01-08T16:59:00.000-08:00</published><updated>2010-09-03T09:46:23.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='lattice'/><category scheme='http://www.blogger.com/atom/ns#' term='multifactorial'/><category scheme='http://www.blogger.com/atom/ns#' term='R'/><title type='text'>multifactorial plotting in R: lattice</title><content type='html'>I've mentioned before in personal communications that if you have lots of factors in a data set you can just flatten out the data set and then &lt;a href="http://www.learnopenoffice.org/CalcTutorial33.htm"&gt;use openoffice data pilot to pivot around different factors&lt;/a&gt; (also can be done in ruby with &lt;a href="http://www.rubyreports.org/"&gt;Ruport&lt;/a&gt; and '&lt;a href="http://api.rubyreports.org/classes/Ruport/Data/Table.html#M000011"&gt;pivot&lt;/a&gt;').  This is a good method.&lt;br /&gt;&lt;br /&gt;There is a much better method I recently came across: "trellis plots".  The package in &lt;span style="font-weight: bold;"&gt;R&lt;/span&gt; is called &lt;span style="font-size: 130%;"&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;lattice&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is clearly the way to quickly and neatly plot multifactorial data in lots of meaningful ways.&lt;br /&gt;&lt;br /&gt;Some resources:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.stat.auckland.ac.nz/~ihaka/787/lectures-trellis.pdf"&gt;Excellent Lecture on making trellis plots with lattice (pdf)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://chartsgraphs.wordpress.com/2008/10/05/r-lattice-plot-beats-excel-stacked-area-trend-chart/"&gt;some hype&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.springerlink.com/content/978-0-387-75968-5"&gt;The online book on lattice&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://lmdvr.r-forge.r-project.org/figures/figures.html"&gt; code and figures from the book&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.statmethods.net/advgraphs/trellis.html"&gt;** a table suggesting general forms for each type of plot &lt;/a&gt;(thanks Eldon)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In R (as sudo if you want system wide installation):&lt;br /&gt;&lt;pre&gt;install.packages("lattice", dependencies=TRUE)  # I don't think there are any dependencies&lt;br /&gt;library("lattice")&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1869539334991128383?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1869539334991128383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1869539334991128383' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1869539334991128383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1869539334991128383'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/01/multifactorial-plotting-in-r-lattice.html' title='multifactorial plotting in R: lattice'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6416632138411234967</id><published>2010-01-04T23:04:00.000-08:00</published><updated>2010-01-04T23:20:46.509-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu linux pymix 9.04 errors compilation arrayobject.h'/><title type='text'>pymix compilation errors on Ubuntu</title><content type='html'>&lt;a href="http://www.pymix.org/"&gt;pymix&lt;/a&gt; was a little tricky to compile.  Here's what I did to get it working.&lt;br /&gt;&lt;br /&gt;I downloaded and installed numpy [but that is probably not necessary].&lt;br /&gt;&lt;br /&gt;Then I finally had to go into pymix's setup.py and change the location for where it was looking for arrayobject.h:&lt;br /&gt;From:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;numpypath =  prefix + '/lib/python' +pyvs + '/site-packages/numpy/core/include/numpy'  # path to arrayobject.h&lt;/span&gt;&lt;br /&gt;To:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; numpypath =  '/usr/share/pyshared/numpy/core/include/numpy'  # path to arrayobject.h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point, 'python setup.py build' worked, but the install failed with this error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;byte-compiling /usr/local/lib/python2.6/dist-packages/AminoAcidPropertyPrior.py to AminoAcidPropertyPrior.pyc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/dist-packages/AminoAcidPropertyPrior.py', 170, 14, '            as = alpha.pop(0)\n'))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;turns out that 'as' is a reserved keyword in python 2.6, so you need to go in to that file and change it to something else, like:&lt;span style="font-family: courier new;"&gt;   nada = alpha.pop(0)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6416632138411234967?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6416632138411234967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6416632138411234967' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6416632138411234967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6416632138411234967'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2010/01/pymix-compilation-errors-on-ubuntu.html' title='pymix compilation errors on Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8899965246389570283</id><published>2009-12-15T07:40:00.000-08:00</published><updated>2009-12-15T07:52:42.352-08:00</updated><title type='text'>Bayesian Optimal Discovery Procedure (BODP) R code</title><content type='html'>The r code given as an additional file to the paper &lt;a href="http://www.biomedcentral.com/1471-2105/10/5"&gt;Bayesian optimal discovery procedure for simultaneous significance&lt;/a&gt; testing requires your data to be in matrix form. I spent a day trying to troubleshoot the code when all you need to do is the following:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open R&lt;/div&gt;&lt;div&gt;Copy and paste the &lt;a href="http://www.biomedcentral.com/content/supplementary/1471-2105-10-5-s1.txt"&gt;R code&lt;/a&gt; from Cao et al.&lt;/div&gt;&lt;div&gt;x&lt;-read.table("x.txt")  #your control state&lt;/div&gt;&lt;div&gt;y&lt;-read.table("y.txt")  #your test state&lt;/div&gt;&lt;div&gt;x&lt;-as.matrix(x)&lt;/div&gt;&lt;div&gt;y&lt;-as.matrix(y)&lt;/div&gt;&lt;div&gt;BODP(x,y,1000,10) #feel free to change 1000 and 10 to whatever you'd like&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8899965246389570283?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8899965246389570283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8899965246389570283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8899965246389570283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8899965246389570283'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/12/bayesian-optimal-discovery-procedure-r.html' title='Bayesian Optimal Discovery Procedure (BODP) R code'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-290754387107634795</id><published>2009-11-29T23:03:00.000-08:00</published><updated>2009-11-29T23:08:51.463-08:00</updated><title type='text'></title><content type='html'>&lt;a href="http://ubuntuforums.org/showthread.php?t=354704"&gt;A thread I started a while ago&lt;/a&gt; suggests a solution to getting hibernation and suspend working properly with nvidia cards on Inspiron 5160 in Ubuntu.  At least as of Karmic Koala (9.10), the solution one-line easier:&lt;br /&gt;&lt;br /&gt;In the device section of /etc/X11/xorg.conf add the line:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Option "NvAGP" "1"&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;To /etc/modprobe.d/blacklist.conf add the following:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;blacklist intel_agp&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;then reboot&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-290754387107634795?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/290754387107634795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=290754387107634795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/290754387107634795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/290754387107634795'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/11/thread-i-started-while-ago-suggests.html' title=''/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-573487376701745642</id><published>2009-11-29T22:50:00.000-08:00</published><updated>2009-11-29T22:53:39.333-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox browsing Karmic Koala 9.10 Ubuntu'/><title type='text'>slow browsing in firefox in Ubuntu 9.10 Karmic Koala</title><content type='html'>type in &lt;b&gt;about:config&lt;/b&gt; into the browser bar&lt;br /&gt;&lt;br /&gt;change the value of the key &lt;b&gt;"network.dns.disableIPv6"&lt;/b&gt; from &lt;b&gt;'false'&lt;/b&gt; to &lt;b&gt;'true'&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;drastically increased browsing speed for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-573487376701745642?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/573487376701745642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=573487376701745642' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/573487376701745642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/573487376701745642'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/11/slow-browsing-in-firefox-in-ubuntu-910.html' title='slow browsing in firefox in Ubuntu 9.10 Karmic Koala'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-9048102426970302429</id><published>2009-11-14T23:11:00.000-08:00</published><updated>2009-11-14T23:35:13.591-08:00</updated><title type='text'>a little Perl spice for ruby</title><content type='html'>&lt;a href="http://blog.jrock.us/articles/RSpec%20vs.%20Test::More.pod"&gt;An insightful blog post&lt;/a&gt; got me envying some of the brevity of Perl, so I implemented a couple useful idioms from Test::More in Ruby (which is pretty trivial since it allows opening up a class).&lt;br /&gt;&lt;br /&gt;We'd like to have a really terse vocabulary when describing the most common test cases:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;## equality&lt;br /&gt;num = 8&lt;br /&gt;num.should.equal 8  # bacon&lt;br /&gt;num.must_equal 8    # minitest::spec&lt;br /&gt;num.should == 8     # rspec&lt;br /&gt;num.is 8            # clearly superior,  similar to Test::More "is a, b"&lt;br /&gt;&lt;br /&gt;## true/false&lt;br /&gt;(num == 8).should.be.true # bacon&lt;br /&gt;(num == 8).ok             # superior, like Test::more "ok (something)"&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, for Bacon at least, this is all that needs to be done (put in your &lt;i&gt;spec_helper.rb&lt;/i&gt; file)&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;class Object&lt;br /&gt;  def is(arg)&lt;br /&gt;    should.equal(arg)&lt;br /&gt;  end&lt;br /&gt;  def ok&lt;br /&gt;    should.equal true&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The argument against this would go, "well, it's better to be more verbose and understood".  The counter-argument something like, "this still makes sense and is way easier to write, so I can write more spec's which == better code".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-9048102426970302429?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/9048102426970302429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=9048102426970302429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/9048102426970302429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/9048102426970302429'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/11/little-perl-spice-for-ruby.html' title='a little Perl spice for ruby'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5109015469743409118</id><published>2009-10-12T21:11:00.001-07:00</published><updated>2009-10-12T21:14:33.272-07:00</updated><title type='text'>wxruby: wxWidgets for ruby on Ubuntu</title><content type='html'>A nice link on &lt;a href="http://ruby.about.com/od/gui/qt/wxrubyinstall.htm"&gt;how to get the basic wxruby (wxWidgets for ruby) going on Ubuntu/debian.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some examples in the examples folder require some more libraries.   For instance, the opengl example requires  libopengl-ruby (and maybe freeglut3 libglut [??]) and one of the drawing examples requires librmagick-ruby.&lt;br /&gt;&lt;br /&gt;So this should be enough to get you going with most of the examples:&lt;code&gt;&lt;pre&gt;sudo apt-get install libwxbase2.8-{0,dev} libwxgtk2.8-{0,dev} librmagick-ruby libopengl-ruby&lt;br /&gt;sudo gem install wxruby&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5109015469743409118?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5109015469743409118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5109015469743409118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5109015469743409118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5109015469743409118'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/10/wxruby-wxwidgets-for-ruby-on-ubuntu.html' title='wxruby: wxWidgets for ruby on Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6414465379665871312</id><published>2009-10-10T11:45:00.000-07:00</published><updated>2009-10-10T12:03:37.842-07:00</updated><title type='text'>how to safely delete things in Ubuntu/Linux</title><content type='html'>I accidentally performed a `rm -rf` on a very big and important directory.  I was able to recover close to half of the files using &lt;a href="http://extundelete.sourceforge.net/"&gt;extundelete&lt;/a&gt;, but it still left me with a sour taste in my mouth.  Now that there is a solid freedesktop specification for how to Trash things, it seems high time to remedy this situation.&lt;br /&gt;&lt;br /&gt;In my ~/.bashrc file:&lt;br /&gt;&lt;pre&gt;if [ ! `which gvfs-trash 2&gt;/dev/null` ]&lt;br /&gt;then&lt;br /&gt; alias dl='mv -t ~/.Trash/' # for older systems&lt;br /&gt;else&lt;br /&gt; alias dl='gvfs-trash'&lt;br /&gt;fi&lt;/pre&gt;So, now we can simply &lt;span style="font-style: italic;"&gt;dl&lt;/span&gt; files and they go to a safe place.  Still, I find myself using &lt;span style="font-style: italic;"&gt;rm&lt;/span&gt;, so this little alias will help cure my addiction, by reminding me that I should be using &lt;span style="font-style: italic;"&gt;dl&lt;/span&gt; instead of &lt;span style="font-style: italic;"&gt;rm&lt;/span&gt;.  I can still use the &lt;span style="font-style: italic;"&gt;rm&lt;/span&gt; command by putting it in single quotes (that's how to get past any alias) as in:  &lt;span style="font-family:courier new;"&gt;'rm' -rf some_directory&lt;/span&gt;.&lt;br /&gt;&lt;pre&gt;alias rm="echo \"use dl or 'rm'\""&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6414465379665871312?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6414465379665871312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6414465379665871312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6414465379665871312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6414465379665871312'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/10/how-to-safely-delete-things-in.html' title='how to safely delete things in Ubuntu/Linux'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5034342602010744550</id><published>2009-10-07T22:41:00.000-07:00</published><updated>2009-10-12T21:26:39.524-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VirtualBox Windows share Ubuntu Debian Linux Multiple Users'/><title type='text'>How to share a VirtualBox virtual machine with multiple users on Linux/Ubuntu</title><content type='html'>Have you ever wanted to share your virtual machine with other users?  Doing so will save a lot of space (since you only need one virtual machine) and keep you more in line with the EULA of the distribution you are running virtual (assuming that's Windows or Mac).&lt;br /&gt;&lt;br /&gt;There are many tutorials online (&lt;a href="http://www.ubuntugeek.com/how-to-install-virtualbox-220-in-ubuntu-904-jaunty.html"&gt;for example&lt;/a&gt;) that will help you to install VirtualBox on your linux machine.  A couple things to note:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;You probably want to use the package from the &lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;VirtualBox download site&lt;/a&gt; (and not the open source one that you can get with apt-get) since it has many of the features that are important for a good virtual machine (like USB support and OpenGL acceleration etc).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make sure a &lt;span style="font-weight: bold;"&gt;vboxusers&lt;/span&gt; group was created and that everyone who would want to use the virtual machine is part of that group.&lt;/li&gt;&lt;/ol&gt;Prerequisite: right now the only way I can get this to work is if everyone wanting to share the virtual machine has sudo privileges.  I'd be interested if anyone can suggest a way to do this without them.  OK, we're ready to start:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make a shared directory for your virtual machines:&lt;pre&gt;sudo mkdir /var/local/VirtualBox&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Create a soft link from the home directory of each user sharing:&lt;pre&gt;ln -s /var/local/VirtualBox $HOME/.VirtualBox&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Now create a custom application launcher for your panel:&lt;pre&gt;sh -c "gksudo 'chown -R $USER:$USER /var/local/VirtualBox'; VirtualBox"&lt;/pre&gt;(that command [or similar] could be wrapped up in a .bashrc function, a script placed in your $HOME/bin directory or whatever).&lt;/li&gt;&lt;/ol&gt;Also, remember when you buy your next computer to think about getting one with virtualization capabilities (for instance, &lt;a href="http://ark.intel.com/ProductCollection.aspx?familyID=26547"&gt;an intel chart of core 2 duo desktop processors which support virtualization&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5034342602010744550?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5034342602010744550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5034342602010744550' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5034342602010744550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5034342602010744550'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/10/how-to-share-virtualbox-virtual-machine.html' title='How to share a VirtualBox virtual machine with multiple users on Linux/Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6501003225603358497</id><published>2009-09-20T12:48:00.000-07:00</published><updated>2009-09-20T12:58:08.484-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coloring pages coloringpages gimp image'/><title type='text'>Make coloring pages from any picture for free</title><content type='html'>Download and install &lt;a href="http://www.gimp.org/"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;GIMP&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;     &lt;a href="http://www.gimp.org/windows/"&gt;windows&lt;/a&gt;&lt;a href="http://www.gimp.org/windows/"&gt; download&lt;/a&gt; or ubuntu (&lt;span style="font-style: italic;"&gt;sudo apt-get install gimp&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;In GIMP,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Filters -&gt; Artistic -&gt; Photocopy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A dialog box will allow you to adjust the sharpness and amount of black and white you want to see with a preview.&lt;br /&gt;&lt;br /&gt;That's it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6501003225603358497?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6501003225603358497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6501003225603358497' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6501003225603358497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6501003225603358497'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/09/make-coloring-pages-from-any-picture.html' title='Make coloring pages from any picture for free'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2568951541308528987</id><published>2009-08-03T20:26:00.000-07:00</published><updated>2010-05-30T22:59:43.307-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux ubuntu timidity swami midi lame audio'/><title type='text'>starting with timidity and soundfonts on Ubuntu Linux</title><content type='html'>On the command line:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;sudo aptitude install timidity&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I like to have a folder with my timidity configuration files and soundfonts in my home directory:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;/home/&amp;lt;user&amp;gt;/timidity&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Inside that folder I'll have my "master" configuration called "timidity.cfg" and a layout something like this (I'm actually omitting a lot here):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;timidity&lt;br /&gt;|-- Piano.cfg&lt;br /&gt;|-- ensemble.cfg&lt;br /&gt;|-- harpsichord.cfg&lt;br /&gt;|-- organ.cfg&lt;br /&gt;|-- patches&lt;br /&gt;|   |-- eawpats12_full&lt;br /&gt;|   |   |-- acbass.pat&lt;br /&gt;|   |   |-- [...]&lt;br /&gt;|-- soundfonts&lt;br /&gt;|   |-- Ensemble&lt;br /&gt;|   |   |-- Zemljak_Overture.sf2&lt;br /&gt;|   |   |-- choir&lt;br /&gt;|   |   |   |-- 052_Florestan_Ahh_Choir.sf2&lt;br /&gt;|   |   |   |-- Boychoir.sf2&lt;br /&gt;|   |   |   `-- boychoir.txt&lt;br /&gt;|   |-- Organ&lt;br /&gt;|   |   |-- GothicOrgan.sf2&lt;br /&gt;|   |   |-- jeux14.sf2&lt;br /&gt;|   |   `-- jeux2.sf2&lt;br /&gt;|   |-- Piano&lt;br /&gt;|   |   |-- ClavinovaGrandPiano2.sf2&lt;br /&gt;|   |   |-- RolandPowerGrand.sf2&lt;br /&gt;|   |   |-- harpsichord&lt;br /&gt;|   |   |   |-- Blanchet-440_ver.1.0.sf2&lt;br /&gt;|   |   |   |-- Campbells_Harpischord_tuned_1.sf2&lt;br /&gt;|   |   |   `-- Petit_Italien.sf2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, we can edit the "global" configuration file to point to our timidity configuration file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;sudo gedit /etc/timidity/timidity.cfg&lt;br /&gt;---&lt;br /&gt;# Instrument configuration file for timidity&lt;br /&gt;# $Id: timidity.cfg,v 1.7 2005/09/03 19:26:03 hmh Exp $&lt;br /&gt;&lt;br /&gt;# [... omitting some for brevity ...]&lt;br /&gt;# [ NOTE: With a recent CPU you can leave everything commented in this file no problem ]&lt;br /&gt;&lt;br /&gt;# Include a configuration for the selected patchset or soundfont&lt;br /&gt;# By default, try to use the instrument patches from freepats:&lt;br /&gt;&lt;br /&gt;source /etc/timidity/freepats.cfg&lt;br /&gt;&lt;br /&gt;## added by JTP ##&lt;br /&gt;source /home/john/timidity/timidity.cfg&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That file basically turns on freepats and then points to your home configuration.  Timidity lets you "cascade" sounds, so activating freepats will ensure that you have some kind of sound for most of the banks accessed by your midi files.  Any patches/soundfonts you later specify will override those previously specified.&lt;br /&gt;&lt;br /&gt;Here's my timidity.cfg file:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;dir /home/john/timidity&lt;br /&gt;# (NOTE: I just comment out the config files I'm not using)&lt;br /&gt;#source jeux14.cfg&lt;br /&gt;#source organ.cfg&lt;br /&gt;#source merlin.cfg&lt;br /&gt;#source Piano.cfg&lt;br /&gt;&lt;br /&gt;source harpsichord.cfg&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The dir command just "activates" a given directory so that I can then call the configuration files in it by their basename as shown.  With this configuration, I can set up lots of preconfigured sounds that I can easily turn on and off in my "master" configuration file.&lt;br /&gt;&lt;br /&gt;OK, so now, lets get a soundfont and use it to play some music:&lt;br /&gt;&lt;br /&gt;The Blanchet is my favorite harpsichord soundfont at the moment (Download the sf2 file &lt;a href="http://sonimusicae.free.fr/blanchet1-en.html"&gt;Download the sf2 file&lt;/a&gt;).  Turns out most sf2 files are compressed with sfark, so you need to &lt;a href="http://melodymachine.com/sfark.htm"&gt;download software to decompress it&lt;/a&gt;.  After you decompress the soundfont, you'll want to look at the soundfont.  Linux has a soundfont editor called "swami" that lets you see what's in a soundfont:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# only in Ubuntu 9.04 or earlier !!&lt;br /&gt;sudo aptitude install swami&lt;br /&gt;# you can fire it up with the soundfont on the command line if you want (or without)&lt;br /&gt;swami timidity/soundfonts/Piano/harpsichord/Blanchet-440_ver.1.0.sf2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;At least for Karmic and Lucid (9.10) you will need to follow instructions &lt;a href="http://ubuntuforums.org/showthread.php?t=1493264"&gt;here&lt;/a&gt; to install swami.  Some guy is working to get GTK2.0 integration at which point we'll probably see the package surface again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_j5Oah6iCmCU/Sne1GhiNGAI/AAAAAAAAAQI/FEvkXbns-es/s1600-h/Screenshot.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 164px; height: 200px;" src="http://1.bp.blogspot.com/_j5Oah6iCmCU/Sne1GhiNGAI/AAAAAAAAAQI/FEvkXbns-es/s200/Screenshot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5365956604720912386" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We are interested in the little numbers in the Melodic section: (001-001 ... 001-004).  The code is this: &amp;lt;bank&amp;gt;-&amp;lt;instrument&amp;gt;.  That means that &lt;b&gt;for this soundfont&lt;/b&gt; the 4 "sounds" are in bank 1 and are deposited as instrument 1-4.  OK, so now we know the layout of the sound font.  Now, when we play a midi file, we can map these to the appropriate instruments to get the sounds we want.  So, how do we do that?  We do it in timidity configuration files.  My "harpsichord.cfg" file that is referenced by my timidity.cfg file looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;dir /home/john/timidity/soundfonts/Piano/harpsichord&lt;br /&gt;&lt;br /&gt;bank 0&lt;br /&gt;&lt;br /&gt;6 %font Blanchet-440_ver.1.0.sf2 1 1&lt;br /&gt;7 %font Blanchet-440_ver.1.0.sf2 1 2&lt;br /&gt;8 %font Blanchet-440_ver.1.0.sf2 1 3&lt;br /&gt;9 %font Blanchet-440_ver.1.0.sf2 1 4&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Again, the "dir" command "activates" the directory that contains my Blanchet-400_ver.1.0.sf2 soundfont file so I can access it in my file by its base filename.  The bank 0 is now specifying which instrument sounds we are going to provide for midi files that access bank 0 (which is most of them since bank 0 is the main bank).  &lt;br /&gt;&lt;br /&gt;&amp;lt;midi_instrument&amp;gt; %font &amp;lt;soundfont.sf2&amp;gt; &amp;lt;soundfont_bank&amp;gt; &amp;lt;soundfont_instrument&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;midi_instrument&lt;/b&gt;: the program change found in the midi file.  The &lt;a href="http://en.wikipedia.org/wiki/General_MIDI"&gt;General Midi&lt;/a&gt; (GM) typical mapping (note: timidity starts numbering at '0', so you need to subtract '1' from each of these to specify them in timidity).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;%font&lt;/b&gt;: means this is a soundfont (patches don't require it), then &lt;bank&gt; &lt;instrument&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;soundfont_bank&lt;/b&gt;: the bank the instrument is found &lt;i&gt;in your soundfont&lt;/i&gt;&lt;br /&gt;&lt;b&gt;soundfont_instrument&lt;/b&gt;: the instrument as found &lt;i&gt;in your soundfont&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;So, here I've mapped the first harpsichord manual (bank 1, instrument 1) to instrument 6 ("harpsichord" in GM), the second harpsichord manual (bank 1, instrument 2) to instrument 7 ("clavinet"), the lute harpsichord sound (bank 1, instrument 3) to instrument 9 ("Celesta") and the sound with both harpsichords (bank 1, instrument 4) to instrument 10 ("Glockenspiel").  Now, a midi file that has a "program change" (instrument) specifying a harpsichord will access my first harpsichord manual and so on.&lt;br /&gt;&lt;br /&gt;If a midi file is just one instrument, just match up the soundfont sound with the instrument specified in the midi file.  If you have different midi tracks, you can go in and change the midi track to match up with those in your timidity file.  This can be done in rosegarden (sudo aptitude install rosegarden) or many other midi editors (I write my own ruby programs based on &lt;a href="http://midilib.rubyforge.org/"&gt;midilib&lt;/a&gt; to modify instruments, volumes, pan, in my midi files but these (pan and volume) can also be specified in your timidity file (as long as each midi track accesses a different instrument).  For example:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;19 %font FluidR3GM.SF2 0 19 amp=140 pan=0 &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we can fire up timidity on our midi file (&lt;a href="http://www.jsbach.net/midi/midi_goldbergvariations.html"&gt;here are some good ones&lt;/a&gt;).  These each have different numbers of tracks, but each track is for "harpsichord" (which we've pointed to the first soundfont of the Blanchet file in harpsichord.cfg file):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;timidity &amp;lt;your_midi&amp;gt;.mid&lt;br /&gt;# or what I often will use:&lt;br /&gt;timidity --verbose  &amp;lt;your_midi&amp;gt;.mid -EFreverb=3,40 -A150&lt;br /&gt;# once you have it sounding like you want, you can record to a .wav file:&lt;br /&gt;timidity &amp;lt;your_midi&amp;gt;.mid -Ow&lt;br /&gt;# then you can convert to an mp3 with lame (install with: 'sudo aptitude install lame')&lt;br /&gt;lame --preset medium &amp;lt;your_midi&amp;gt;.wav &amp;lt;your_midi&amp;gt;.mp3&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let me know if you have any questions/troubles and I'll try to update this post to answer them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2568951541308528987?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2568951541308528987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2568951541308528987' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2568951541308528987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2568951541308528987'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/08/starting-with-timidity-and-soundfonts.html' title='starting with timidity and soundfonts on Ubuntu Linux'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_j5Oah6iCmCU/Sne1GhiNGAI/AAAAAAAAAQI/FEvkXbns-es/s72-c/Screenshot.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3081649327795208713</id><published>2009-07-17T13:38:00.000-07:00</published><updated>2009-07-17T14:03:44.115-07:00</updated><title type='text'>How to version control your projects with bazaar</title><content type='html'>So you have a project named 'supercool' that happens to sit in a directory named (what else) 'supercool'.  Assuming you have bazaar installed on your client computer and the server, this is how you start a project under a centralized "lock-step" model.  IMHO, this model works best for solo projects if you have a server available to you:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;cd supercool # make sure you are at the top level directory of your project&lt;br /&gt;bzr init  # starts up version control in this directory (an independent branch right now)&lt;br /&gt;bzr add   # will recursively add files in your project&lt;br /&gt;bzr ci -m 'initial commit'  # makes a commit to your branch&lt;br /&gt;# the next step assumes you have already made the directory /home/&lt;user&gt;/bzr on your server&lt;br /&gt;# this step will create a centralized repository on your remote&lt;br /&gt;bzr push sftp://&amp;lt;user&amp;gt;@myserver.domain.org/home/&amp;lt;user&amp;gt;/bzr/supercool&lt;br /&gt;# now, we need to 'bind' our independent branch to the remote branch&lt;br /&gt;# which transforms it into "centralized mode"&lt;br /&gt;bzr bind sftp://&amp;lt;user&amp;gt;@myserver.domain.org/home/&amp;lt;user&amp;gt;/bzr/supercool&lt;br /&gt;&lt;br /&gt;# to check out a fresh copy on a different computer&lt;br /&gt;bzr co sftp://&amp;lt;user&amp;gt;@myserver.domain.org/home/&amp;lt;user&amp;gt;/bzr/supercool&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, now you can work on files in your project and have them versioned.  Your daily work-flow will look like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# assuming you are in your project directory...&lt;br /&gt;bzr up  # update your repo with any changes in the centralized repo&lt;br /&gt;## do some work...&lt;br /&gt;bzr add &amp;lt;file1&amp;gt; &amp;lt;file2&amp;gt;  # add any new files, etc.&lt;br /&gt;bzr ci -m 'adding new files, changed some other ones'&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;That's it! The bazaar documentation is great, particularly the &lt;a href="http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html"&gt;user guide&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3081649327795208713?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3081649327795208713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3081649327795208713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3081649327795208713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3081649327795208713'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/07/how-to-version-control-your-projects.html' title='How to version control your projects with bazaar'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8816351911416437676</id><published>2009-06-26T10:40:00.000-07:00</published><updated>2009-06-26T11:14:51.514-07:00</updated><title type='text'>Adding Music to a Blogger Blog using Playlist.com</title><content type='html'>There are basically two ways you can add a playlist.com music player to your blog on blogger blogs.  The first that I tried was to use one of blogger's prepared gadgets.  I found that these did not look very good.  Instead, there is a better way.&lt;br /&gt;&lt;br /&gt;1) Visit playlist.com and go to "Post My Playlist."  Choose "Get the code for any other social network, blog or your own personal website &gt;&gt;".  It is currently the last choice, choice "E".  Follow their directions to get the code.  Select and copy it.&lt;br /&gt;&lt;br /&gt;2) Go to your blog and sign in.  Go to "Customize", "Layout", "Page Elements", "Add a Gadget", "HTML/Javascript".  Paste the code into the main field and you're set.&lt;br /&gt;&lt;br /&gt;3) Sizing the player: View the blog and see how it looks.  If you don't like the dimensions, you can change the element dimensions by going back and editing the html of the element.  The height and width show up in several places in the code, so you'll want to change them all.  For my blog, I currently have it set to 300px wide and 208px tall.    I have copied the code from my blog, removing the "&lt;" and "&gt;" characters so that it wouldn't actually insert the player into this post. You can see that the easiest approach is really to do a ctrl+f to find all the numbers.  Just be careful that they are really dimensions and not part of another number or for something else (for an example of a number you shouldn't change, see the blue 208).&lt;br /&gt;&lt;br /&gt;div style="text-align: left; margin-left: auto; visibility:visible; margin-right: auto; width:&lt;span style="color: rgb(255, 0, 0);"&gt;300&lt;/span&gt;px;" object width="&lt;span style="color: rgb(255, 0, 0);"&gt;300&lt;/span&gt;" height="&lt;span style="color: rgb(255, 0, 0);"&gt;208&lt;/span&gt;"  param value="http://www.profileplaylist.net/mc/mp3player_new.swf" name="movie"/ param value="never" name="allowscriptaccess"/ param value="transparent" name="wmode"/ param value="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_shuffle.xml&amp;amp;mywidth=290&amp;amp;myheight=&lt;span style="color: rgb(255, 0, 0);"&gt;208&lt;/span&gt;&amp;amp;playlist_url=http%3A%2F%2Fwww.indimusic.us%2Floadplaylist.php%3Fplaylist%3D42390100%26t%3D1245&lt;span style="color: rgb(51, 102, 255);"&gt;208&lt;/span&gt;454&amp;amp;wid=os" name="flashvars"/ embed border="0" allowscriptaccess="never" flashvars="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_shuffle.xml&amp;amp;mywidth=&lt;span style="color: rgb(255, 0, 0);"&gt;300&lt;/span&gt;&amp;amp;myheight=&lt;span style="color: rgb(255, 0, 0);"&gt;208&lt;/span&gt;&amp;amp;playlist_url=http://www.indimusic.us/loadplaylist.php?playlist=42390100&amp;amp;t=1245208454&amp;amp;wid=os" type="application/x-shockwave-flash" height="&lt;span style="color: rgb(255, 0, 0);"&gt;208&lt;/span&gt;" src="http://www.profileplaylist.net/mc/mp3player_new.swf" style="width:&lt;span style="color: rgb(255, 0, 0);"&gt;300&lt;/span&gt;px; visibility:visible; height:&lt;span style="color: rgb(255, 0, 0);"&gt;208&lt;/span&gt;px;" width="&lt;span style="color: rgb(255, 0, 0);"&gt;300&lt;/span&gt;" wmode="transparent" name="mp3player"/ /embed/object  br/  a  /a  /div&lt;br /&gt;&lt;br /&gt;To know what will look best in your blog, you might take some time to read through the html for your blog to find your sidebar width.  If it is a percentage then you may just have to guess at the width until you get it how you want it.  If it is set to a number of pixels (like 250px) then you can just change the width to 250px.  That should usually give a good fit.  If not, try a different width.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8816351911416437676?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8816351911416437676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8816351911416437676' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8816351911416437676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8816351911416437676'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/06/adding-music-to-blogger-blog-using.html' title='Adding Music to a Blogger Blog using Playlist.com'/><author><name>DRP</name><uri>http://www.blogger.com/profile/17694150200064033101</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_dAYMN9rxI_8/SjKJeWeEtfI/AAAAAAAAAww/CLJHI46B3Qc/S220/dsc00595.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1453080548168893161</id><published>2009-06-24T14:03:00.000-07:00</published><updated>2009-06-24T14:26:55.729-07:00</updated><title type='text'>Weather-util alias for linux</title><content type='html'>With administrator rights open weatherrc (should be in etc/)&lt;br /&gt;&lt;br /&gt;The file should have a bunch of entries that look similar to this. I am showing how I created an alias for DFW.&lt;br /&gt;&lt;br /&gt;[DFW]                                                                   #Alias name&lt;br /&gt;City = Dallas Ft Worth                  #&lt;a href="http://tinyurl.com/28pxfg"&gt;http://tinyurl.com/28pxfg&lt;/a&gt; (Find your city)&lt;br /&gt;ID = KDFW                                                     #ID code, see note below on how to find it&lt;br /&gt;St = TX                                     #Enter your state's abbreviation&lt;br /&gt;&lt;br /&gt;It is easiest to find your ID code by going to &lt;a href="http://weather.noaa.gov/"&gt;http://weather.noaa.gov/&lt;/a&gt; and finding your Current Weather Conditions location. When you have found it look for the four letter identification, that is your ID.&lt;br /&gt;&lt;br /&gt;Create your own aliases by adding to the weatherrc file.&lt;br /&gt;&lt;br /&gt;Save the file and go to the terminal and type: weather DFW&lt;br /&gt;If you want more information, tell it to be verbose: weather DFW -v&lt;br /&gt;If you want the forecast: weather DFW -f&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1453080548168893161?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1453080548168893161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1453080548168893161' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1453080548168893161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1453080548168893161'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/06/weather-util-alias-for-linux.html' title='Weather-util alias for linux'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-7775799804333544689</id><published>2009-05-21T18:45:00.000-07:00</published><updated>2009-05-21T21:12:20.583-07:00</updated><title type='text'>Multiple ANOVA tests in R by a grouping factor</title><content type='html'>If you have ever needed to run multiple ANOVA's  according to or by a certain grouping factor here is your guide:&lt;br /&gt;&lt;br /&gt;To do Type III sums of squares you'll need the car package. To split up your data by a grouping factor you'll need the doBy package.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;install.packages("car")&lt;br /&gt;install.packages("doBy")&lt;br /&gt;library(car)&lt;br /&gt;library(doBy)&lt;/pre&gt;&lt;br /&gt;Begin with a dataframe that has your factors, response, and grouping factor as columns (Y = response, A = factor A, B = factor B, Group = grouping factor)&lt;br /&gt;&lt;br /&gt;If you have never read in data before into R, try something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;data&lt;- read.table("/home/user/Desktop/data.txt")&lt;/pre&gt;&lt;br /&gt;I prefer to simply use text files that are delimited by space or tab.&lt;br /&gt;&lt;br /&gt;Next name your columns:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;names(data)&lt;-c("Y","A","B","Group")&lt;/pre&gt;&lt;br /&gt;Now you need to split your data up according to your grouping factor.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;data_split&lt;-splitBy(~Group,data=data)&lt;/pre&gt;&lt;br /&gt;Lastly, run this loop:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;i &lt;-1 while(i &lt;=length(data_split)){    &lt;br /&gt; print (Anova(lm(Y~A+B+A*B, data_split[[i]]),type="III")[4,4])   &lt;br /&gt; i&lt;- i +1&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;R output can be accessed in row and column fashion [r,c]. I have this particular code give me only the p-value from the interaction of factors A and B. By changing [4,4] to other numbers you can access whatever part of the ANOVA table you want. Hope this helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-7775799804333544689?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/7775799804333544689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=7775799804333544689' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7775799804333544689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7775799804333544689'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/05/multiple-anova-tests-in-r-by-grouping.html' title='Multiple ANOVA tests in R by a grouping factor'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-889222340501993752</id><published>2009-05-08T23:02:00.001-07:00</published><updated>2009-05-21T21:15:15.234-07:00</updated><title type='text'>two-column default for wmii-ruby (sort of like xmonad)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_j5Oah6iCmCU/SgUsKuQ-E4I/AAAAAAAAANo/uJi5MHJbYXY/s1600-h/wmii-ruby-screenshot-split.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 125px;" src="http://4.bp.blogspot.com/_j5Oah6iCmCU/SgUsKuQ-E4I/AAAAAAAAANo/uJi5MHJbYXY/s200/wmii-ruby-screenshot-split.jpg" alt="" id="BLOGGER_PHOTO_ID_5333717896419742594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;How to default to 2 columns in wmii-ruby?&lt;/h2&gt;&lt;br /&gt;Add this to your wmiirc-config.rb file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;on_createclient do |cid|&lt;br /&gt;  tag = read("/client/#{cid}/tags")&lt;br /&gt;  # does the last line start with a "1", then only one column&lt;br /&gt;  if read("/tag/#{tag}/index").split("\n").last.match(/^1\s+/)&lt;br /&gt;    write("/tag/sel/ctl", "send sel right")&lt;br /&gt;  end&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;Basically, if you have one column of applications and you open another client, this will shove your client to the right, making a 2nd column.  This should work on the wmii 3.5-3.6 series.&lt;br /&gt;&lt;br /&gt;This (not going automatically into 2 columns) has bothered me a lot in the past and when I was trying out xmonad I found that they do this in the default layout.  [It would be fun to implement the rest of the basic xmonad layouts in wmii-ruby...]&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;What is wmii-ruby? (in case you're asking)&lt;/h2&gt;&lt;br /&gt;I've been playing around again with &lt;a href="http://eigenclass.org/hiki/wmii+ruby"&gt;wmii-ruby&lt;/a&gt;.  &lt;a href="http://wmii.suckless.org/"&gt;wmii&lt;/a&gt; is a minimalist window manager for X11 (i.e., graphics on *nix-ish OS's) that is very scriptable and wmii-ruby is (you guessed it) wmii scripted in ruby.  Best features:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;tiling window manager (use all your screen space)&lt;/li&gt;&lt;li&gt;uses very flexible tagging system to keep things organized.&lt;/li&gt;&lt;li&gt;very scriptable (see above example)&lt;/li&gt;&lt;li&gt;can use a mouse but don't really need to&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;It really is aimed more at hacker-types than the general public, but it is quite educational figuring out how to do many of the things you take for granted with a more feature rich desktop like gnome or KDE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-889222340501993752?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/889222340501993752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=889222340501993752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/889222340501993752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/889222340501993752'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/05/two-column-default-for-wmii-ruby-sort.html' title='two-column default for wmii-ruby (sort of like xmonad)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_j5Oah6iCmCU/SgUsKuQ-E4I/AAAAAAAAANo/uJi5MHJbYXY/s72-c/wmii-ruby-screenshot-split.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2480919523343848919</id><published>2009-04-30T22:00:00.000-07:00</published><updated>2009-05-15T23:21:08.933-07:00</updated><title type='text'>Battle for Wesnoth: Kid-Friendly</title><content type='html'>&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_j5Oah6iCmCU/SfqUbybumII/AAAAAAAAANQ/f5Ko_gEgK-M/s1600-h/banner_image.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 294px;" src="http://2.bp.blogspot.com/_j5Oah6iCmCU/SfqUbybumII/AAAAAAAAANQ/f5Ko_gEgK-M/s320/banner_image.png" alt="" id="BLOGGER_PHOTO_ID_5330736314061854850" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;i&gt;artwork from Battle for Wesnoth, modified by JTP&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;Introduction&lt;/h2&gt;&lt;a href="http://sudoit.blogspot.com/2009/04/clean-battle-for-wesnoth-replacing.html#kid_friendly"&gt;Skip intro&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.wesnoth.org/"&gt;The Battle for Wesnoth&lt;/a&gt;--consistently ranked at the top of open-source games--is a really extraordinary strategy game that also happens to be free.  On the surface it doesn't seem that special: it doesn't feature any stunning graphics and it is turn-based, so it is much more contemplative than action-packed.  Why is it so great?  Well, you really need to play it a while to understand, but the main things are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Very interesting strategy component&lt;/span&gt; - sort of feels like playing a higher-level Risk game or a slower turn-based Rise of Nations.  To win you have to deal effectively with day/night, terrain, attack/defense, recruitment, character development, health etc.  There are enough components to keep things interesting but not so many to be overwhelming.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Engaging storylines&lt;/span&gt; - compelling single (and even some multi-user) campaigns.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Character development&lt;/span&gt; - Characters can be developed somewhat (i.e, raise levels) which provides some familiarity (and hence attachment) to them but this is limited to only a few levels which prevents this aspect from overshadowing the game's strategy component.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Good AI&lt;/span&gt; - the computer doesn't really make dumb moves, you either have to outsmart or overpower the enemy to win.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Visually beautiful&lt;/span&gt; - I mentioned that the graphics are 2D, but even though they are simple, they are quite engaging.  Much of the artwork is really great.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Good music&lt;/span&gt; - in a classical-esque tradition.&lt;br /&gt;&lt;/li&gt;&lt;li style="font-style: italic;"&gt;Free.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Extendable&lt;/span&gt; - it isn't very difficult to create your own game or campaign.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 id="kid_friendly"&gt;Kid-friendly graphics&lt;/h2&gt;&lt;br /&gt;I have a lot of young boys who happen to really like this game.  For a game set in a fantasy world completely realized with community contributed artwork, Wesnoth is remarkably kid-friendly.  While there is nothing approaching pornography in it, there are a handful of portraits and units that are not attired as modestly as could be hoped.  Most of the ones I've tidied up really didn't need it much, but since I was at it...&lt;br /&gt;&lt;br /&gt;The beauty of open-source is that the software (in this case the images) can be modified to suit one's own tastes.  I took liberty to touch up a few pictures, trimmed some others and wrote a script that will replace them in one click.  The replacement artwork is rough around the edges, but it gets the job done (see my conglomerate image above).&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How to run wesnoth-kid-friendly&lt;/h2&gt;&lt;br /&gt;This assumes you are on Windows (instructions are included in the &lt;a href="http://bom-wesnoth.googlecode.com/files/wesnoth-kid-friendly-0.0.1.zip"&gt;zip file&lt;/a&gt; for other OS's):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install Battle for Wesnoth - ideally in the default location so my script can find it.&lt;/li&gt;&lt;li&gt;Install the &lt;a href="http://www.ruby-lang.org/en/downloads/"&gt;one-click ruby installer&lt;/a&gt;.  (go the section &lt;span style="font-style: italic;"&gt;"Ruby on Windows"&lt;/span&gt; and click on the &lt;span style="font-style: italic;"&gt;"Ruby One-Click Installer link"&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Download &lt;a href="http://bom-wesnoth.googlecode.com/files/wesnoth-kid-friendly-0.0.1.zip"&gt;my zip file&lt;/a&gt;.  (this contains kid-friendly up artwork and a script to copy them into place).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Unzip it.&lt;/li&gt;&lt;li&gt;Click on &lt;span style="font-weight: bold;"&gt;wesnoth-kid-friendly.rb   &lt;/span&gt;(NOTE: this writes over the old images.  Of course, you can always reinstall it if you don't like what I've done)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;By default, I scan typical linux and windows directories for a Battle for Wesnoth directory.  If the script isn't finding your installation, you can run the program on the commandline with the path to the Wesnoth directory given as the only argument.  Or email me with the path of your directory and I'll add it to the script.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2480919523343848919?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2480919523343848919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2480919523343848919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2480919523343848919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2480919523343848919'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/clean-battle-for-wesnoth-replacing.html' title='Battle for Wesnoth: Kid-Friendly'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_j5Oah6iCmCU/SfqUbybumII/AAAAAAAAANQ/f5Ko_gEgK-M/s72-c/banner_image.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6346903172240326403</id><published>2009-04-28T14:13:00.001-07:00</published><updated>2009-05-21T21:17:11.325-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='KDE'/><category scheme='http://www.blogger.com/atom/ns#' term='xbindkeys'/><category scheme='http://www.blogger.com/atom/ns#' term='autostart'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='keyboardshortcuts'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='jaunty jackelope'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Keyboard Shortcuts in Gnome, KDE, wmii, or whatever</title><content type='html'>Ubuntu Jaunty Jackelope put keyboard shortcuts in their proper place (disabling those in metacity and putting them in 'Keyboard Shortcuts').  However, when opening a gnome terminal from this shortcut, you have to explicitly tell it to start in your home directory or it will start in '/'&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;System-&gt;Preferences-&gt;KeyboardShortcuts  then [+Add]&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;gnome-terminal --geometry 80x52 --working-directory $HOME&lt;/pre&gt;&lt;br /&gt;I like to set up my keyboard shortcuts with a script since I like to use them on whatever computer I'm on.  I did this before with gconftool2 and that worked fine, but now a person has to set them in a different location in a different way... which got me thinking that it would be nice to set keyboard shortcuts in a cross-desktop (KDE, Gnome, wmii, whatever) kind of way.&lt;br /&gt;&lt;br /&gt;Solution: &lt;b&gt;xbindkeys&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo apt-get install xbindkeys&lt;/pre&gt;&lt;br /&gt;Make a file called '.xbindkeysrc' in your home directory with something like this in it:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;"gvim"&lt;br /&gt;  control+alt + g&lt;br /&gt;"nautilus"&lt;br /&gt;  control+alt + n&lt;br /&gt;"firefox -new-window http://gmail.com"&lt;br /&gt;  control+alt + e&lt;br /&gt;"nautilus"&lt;br /&gt;  control+alt + h&lt;br /&gt;"firefox"&lt;br /&gt;  control+alt + f&lt;br /&gt;"gnome-terminal --geometry 80x40"&lt;br /&gt;  control+alt + t&lt;br /&gt;"rhythmbox"&lt;br /&gt;  control+alt + m&lt;/pre&gt;&lt;br /&gt;now you can turn on the shortcuts with the simple command 'xbindkeys', but we'd really like for them to be turned on once when we login.  Turns out cross-desktop startup is not very uniform but I think the proper way to do this (cross-desktop) is to do this:&lt;br /&gt;&lt;br /&gt;Make sure you have a directory called '.config/autostart'.  Then add a file to it called 'xbindkeys.desktop' with content along these lines:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;[Desktop Entry]&lt;br /&gt;Type=Application&lt;br /&gt;Name=XBindKeys&lt;br /&gt;Exec=xbindkeys&lt;br /&gt;Icon=system-run&lt;br /&gt;Comment=&lt;br /&gt;Name[en_US]=XBindKeys&lt;br /&gt;Comment[en_US]=&lt;br /&gt;X-GNOME-Autostart-enabled=true&lt;/pre&gt;&lt;br /&gt;This is what happens in Gnome when you add an entry in System-&gt;Preferences-&gt;StartupApplications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6346903172240326403?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6346903172240326403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6346903172240326403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6346903172240326403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6346903172240326403'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/keyboard-shortcuts-in-gnome-kde-wmii-or.html' title='Keyboard Shortcuts in Gnome, KDE, wmii, or whatever'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5435768212988005230</id><published>2009-04-14T23:26:00.000-07:00</published><updated>2009-05-21T21:21:15.104-07:00</updated><title type='text'>Installing Storey's edge microarray software on Ubuntu</title><content type='html'>It takes a few steps to install this (Intrepid Ibex, Ubuntu 8.10), but here's how I got it working (we'll see if there are any bugs):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.genomine.org/edge/"&gt;edge website&lt;/a&gt;&lt;/br&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install R&lt;/li&gt;&lt;br /&gt;&lt;pre&gt;sudo aptitude install r-base&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Download and unpack the source file:&lt;/li&gt;&lt;br /&gt;&lt;a href="http://www.genomine.org/edge/linux/"&gt;linux src page&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Install &lt;a href="http://cran.r-project.org/web/packages/impute/index.html"&gt;impute&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;Download the above link and install with something like this:&lt;br /&gt;&lt;pre&gt;sudo R CMD INSTALL packages/impute_1.0-5.tar.gz&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;prepare the compiling environment&lt;/li&gt;&lt;br /&gt;&lt;pre&gt;sudo aptitude install g++-4.2 gfortran-4.2 tetex-base&lt;br /&gt;# (also might need tetex-extras ...)&lt;br /&gt;sudo rm /usr/bin/g++  # just removes the soft link&lt;br /&gt;sudo ln -s /usr/bin/g++4.2 /usr/bin/g++&lt;br /&gt;sudo rm /bin/sh  # just a link to /bin/dash&lt;br /&gt;sudo ln -s /bin/bash /bin/sh&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Compile the sucker&lt;/li&gt;&lt;br /&gt;&lt;pre&gt;cd src ; make ; make install&lt;/pre&gt;&lt;br /&gt;The make install command just copies the .so files up a directory&lt;br /&gt;&lt;li&gt;Run the software&lt;/li&gt;&lt;br /&gt;&lt;pre&gt;R&lt;/pre&gt;&lt;br /&gt;Then from within R started at the base of the package:&lt;br /&gt;&lt;pre&gt;source("edge.r")&lt;br /&gt;edge()&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Restore the original environment&lt;/li&gt;&lt;br /&gt;&lt;pre&gt;sudo rm /usr/bin/g++&lt;br /&gt;sudo ln -s /usr/bin/g++4.3 /usr/bin/g++&lt;br /&gt;sudo rm /bin/sh&lt;br /&gt;sudo ln -s /bin/dash /bin/sh&lt;/pre&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5435768212988005230?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5435768212988005230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5435768212988005230' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5435768212988005230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5435768212988005230'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/installing-storeys-edge-microarray.html' title='Installing Storey&apos;s edge microarray software on Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5867878301660517578</id><published>2009-04-14T20:12:00.000-07:00</published><updated>2009-04-14T20:28:37.743-07:00</updated><title type='text'>Parametric and non-parametric t-testing</title><content type='html'>If your data are distributed normally, the t-test can help you determine if the means of your two samples are greater than or less than each other (one-tailed) or just plain different from each other (two-tailed). These examples are for paired samples, to make them not paired just delete the "paired=TRUE" statement altogether, default is unpaired.&lt;br /&gt;&lt;br /&gt;We'll use the same data throughout:&lt;br /&gt;x &lt;- c(1.83,  0.50,  1.62,  2.48, 1.68, 1.88, 1.55, 3.06, 1.30)&lt;br /&gt;y &lt;- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)&lt;br /&gt;&lt;br /&gt;When using your own data you just need them in vectors (as shown).&lt;br /&gt;&lt;br /&gt;One-tailed&lt;br /&gt;t.test(x,y,paired=TRUE,alternative="greater")&lt;br /&gt;t.test(x,y,paired=TRUE,alternative="less")&lt;br /&gt;&lt;br /&gt;Two-tailed&lt;br /&gt;t.test(x,y,paired=TRUE)&lt;br /&gt;&lt;br /&gt;What if your data are not normal? The non-parametric Wilcoxon test will do the trick. The Wilcoxon rank-sum test is for independent samples (unpaired). The Wilcoxon signed rank test is for paired samples.&lt;br /&gt;&lt;br /&gt;wilcox.test(x, y, paired = TRUE)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5867878301660517578?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5867878301660517578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5867878301660517578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5867878301660517578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5867878301660517578'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/parametric-and-non-parametric-t-testing.html' title='Parametric and non-parametric t-testing'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5890950941436890165</id><published>2009-04-14T20:04:00.001-07:00</published><updated>2009-04-14T20:12:47.691-07:00</updated><title type='text'>Who is R?</title><content type='html'>After several years of using R to do various tasks from simple t-tests to much larger data sets I think I finally understand who R is.&lt;br /&gt;&lt;br /&gt;R is like the computers of yesteryear, it does what you tell it, and only what you tell it, period. If you want more than the minimal amount of output, you have to ask for it. But it also has a bit of an attitude, for example, instead of outputting the type 3 sums of squares in ANOVA like virtually every other statistical package, it outputs the type 1 sums of squares by default. Why you might ask? The reason is because they want you to first think about what type of sums of squares you want, so by default they give you the one that isn't the most commonly used one. Hence R has a steep learning curve, which after several years I am still trying to surmount.&lt;br /&gt;&lt;br /&gt;Enough talk, time for some code in the next post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5890950941436890165?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5890950941436890165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5890950941436890165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5890950941436890165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5890950941436890165'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/who-is-r.html' title='Who is R?'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4530681820973078532</id><published>2009-04-11T00:13:00.000-07:00</published><updated>2009-04-11T00:27:09.627-07:00</updated><title type='text'>Instant switching: compiz (gtk), emerald, metacity</title><content type='html'>In various places these are incorrectly listed.  At least as of Intrepid Ibex, here's how to switch between window managers... still trying to figure this out...&lt;br /&gt;&lt;pre&gt;metacity --replace&lt;br /&gt;emerald --replace&lt;br /&gt;compiz-decorator --replace&lt;br /&gt;compiz  # to start things up for compiz&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Oh, but when I try it out I'm getting some problems.  In theory ... Just put each of these lines in a custom application launcher on your panel (and maybe put those in a single drawer)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4530681820973078532?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4530681820973078532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4530681820973078532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4530681820973078532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4530681820973078532'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/04/instant-switching-compiz-gtk-emerald.html' title='Instant switching: compiz (gtk), emerald, metacity'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1114253272810923553</id><published>2009-03-26T20:31:00.000-07:00</published><updated>2009-05-21T21:23:39.422-07:00</updated><title type='text'>ocaml batteries on Ubuntu</title><content type='html'>OCaml is a functional programming language.  I'm trying to learn it right now, but it clearly has a steep learning curve, especially if you aren't familiar with functional programming languages.  It does seem impressive in many ways, but we'll see, eh?&lt;br /&gt;&lt;br /&gt;Anyway, the standard library seems a little sparse, so I am trying to install 'batteries'.  Turns out it wants some dependencies to build and they aren't entirely straightforward.  Here's how to get it building:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo aptitude install libcamomile-ocaml-dev libzip-ocaml-dev libtype-conv-camlp4-dev&lt;br /&gt;libsexplib-ocaml-dev libbin-prot-camlp4-dev libocamlnet-ocaml-dev&lt;/pre&gt;&lt;br /&gt;(do we need libmagic-ocaml-dev ??)&lt;br /&gt;This is super weird, you have to configure the program as super user because it wants to make a directory for batteries in /usr/local.  Anyway, here's the install&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo ./configure&lt;br /&gt;sudo make all opt install install-doc&lt;/pre&gt;&lt;br /&gt;And it does take forever to make the documentation (maybe 5 minutes to install on my computer).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1114253272810923553?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1114253272810923553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1114253272810923553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1114253272810923553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1114253272810923553'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/03/ocaml-batteries-on-ubuntu.html' title='ocaml batteries on Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8455243674477571098</id><published>2009-03-06T22:55:00.000-08:00</published><updated>2011-02-09T11:10:27.984-08:00</updated><title type='text'>how to set up your own git repository with only a server, ssh, and git</title><content type='html'>This assumes you have ssh access to a server somewhere which you want to use as a sort of centralized repository and that server and your local machine have git on them.  Don't tell anyone I used centralized and git in the same sentence, but centralized makes a lot of sense to me for lots of things, especially my own projects.&lt;br /&gt;&lt;br /&gt;I'll do it the long way first and then with a tiny bit of bash scripting:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# ssh into your server&lt;br /&gt;ssh jtprince@yourserver.domain.edu&lt;br /&gt;# on remote machine:&lt;br /&gt;mkdir git&lt;br /&gt;mkdir git/project1.git &amp;amp;&amp;amp; cd git/project1.git&lt;br /&gt;git --bare init&lt;br /&gt;exit&lt;br /&gt;&lt;br /&gt;# on local machine&lt;br /&gt;mkdir project1 &amp;amp;&amp;amp; cd project1  # if you don't already have a project&lt;br /&gt;# make a commit (you need at least one commit)&lt;br /&gt;git init&lt;br /&gt;echo "some text" &gt; file.txt&lt;br /&gt;git add .&lt;br /&gt;git commit -m 'init commit'&lt;br /&gt;&lt;br /&gt;# now we will push it to the server&lt;br /&gt;git push ssh://jtprince@yourserver.domain.edu/home/jtprince/git/project1.git master&lt;br /&gt;&lt;br /&gt;# we still need to link our git folder with the server&lt;br /&gt;git remote add origin ssh://jtprince@yourserver.domain.edu/home/jtprince/git/project1.git&lt;br /&gt;git config branch.master.remote origin&lt;br /&gt;git config branch.master.merge refs/heads/master&lt;/pre&gt;&lt;br /&gt;Now for the BASH scripting I promised.  This is basically the same thing but maybe a little easier to copy and paste once you set up your variables:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;SERVER='jtprince@yourserver.domain.edu'&lt;br /&gt;PROJ="project2"&lt;br /&gt;PROJ_URL="ssh://$SERVER/home/jtprince/git/${PROJ}.git"&lt;br /&gt;&lt;br /&gt;# set up the remote git repo in one command:&lt;br /&gt;ssh $SERVER "mkdir git/${PROJ}.git; cd git/${PROJ}.git; git --bare init"&lt;br /&gt;&lt;br /&gt;# (inside your project directory... with files/dirs already present):&lt;br /&gt;git init ; git add . ; git commit -m 'init commit'; git push $PROJ_URL master ; git remote add origin $PROJ_URL ; git config branch.master.remote origin ; git config branch.master.merge refs/heads/master&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And my rant...&lt;br /&gt;&lt;br /&gt;At least in the ruby and linux developer community, Git seems to be quite hip right now.  I personally think bazaar wipes git all over the floor, but due to server circumstances beyond my control I need to version control my files with git.&lt;br /&gt;&lt;br /&gt;While the above operation is CLEARLY and SUCCINCTLY documented in the main bazaar docs, I've had to piece this together myself for git.  Now, I suppose if I had actually read and digested the volumes of arcane documentation, switches, and nuances of git, I wouldn't be griping right now.  That said, projects like 'eg' can make it easier and I'm sure the things people want to do with a vcs will become documented soon enough in git... the beauties of open source.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8455243674477571098?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8455243674477571098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8455243674477571098' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8455243674477571098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8455243674477571098'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/03/how-to-set-up-your-own-git-repository.html' title='how to set up your own git repository with only a server, ssh, and git'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3547397797675961455</id><published>2009-02-17T13:12:00.001-08:00</published><updated>2009-02-17T13:13:47.345-08:00</updated><title type='text'>Gnome Do Dominates</title><content type='html'>I am always trying to do things faster, and as we all know, using the keyboard is often faster than the mouse. Gnome Do, which you can install from synaptic is intuitive and lets you really fly. Try it out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3547397797675961455?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3547397797675961455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3547397797675961455' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3547397797675961455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3547397797675961455'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/02/gnome-do-dominates.html' title='Gnome Do Dominates'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-315437414715558962</id><published>2009-02-13T23:22:00.000-08:00</published><updated>2009-02-13T23:25:19.363-08:00</updated><title type='text'>Can't mount external hard drive</title><content type='html'>Some people have suggested "forcing" your external hard drive to mount. This is a bad idea as you can lose your data. Simply plug your external hard drive into a Windows system and then safely remove the external hard drive; if you just unplug it without safely removing it, Ubuntu won't let you mount it without forcing it to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-315437414715558962?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/315437414715558962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=315437414715558962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/315437414715558962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/315437414715558962'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/02/cant-mount-external-hard-drive.html' title='Can&apos;t mount external hard drive'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-7863155530351465508</id><published>2009-01-13T14:16:00.000-08:00</published><updated>2009-01-13T14:37:44.997-08:00</updated><title type='text'>Aggregate in R</title><content type='html'>For data that needs to be collapsed, the aggregate() function works great. For example:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ZpQa6LiwXis/SW0XjKvHNhI/AAAAAAAABZs/y-CRlexUhAY/s1600-h/pastedpic_01132009_163528.png"&gt;&lt;img style="cursor: pointer; width: 229px; height: 142px;" src="http://3.bp.blogspot.com/_ZpQa6LiwXis/SW0XjKvHNhI/AAAAAAAABZs/y-CRlexUhAY/s320/pastedpic_01132009_163528.png" alt="" id="BLOGGER_PHOTO_ID_5290911030175020562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you need to collapse these so you only have one row per GLEAN, and have the Female and Male columns be the average of the collapsed rows, aggregate() can do this in one line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;collapsed_data&lt;-aggregate(x=original_data, by=file_with_GLEAN_names_only, FUN=mean)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I used this to find the average expression levels of genes from a table that had the expression levels of each exon. Since some genes had one exon while others had many exons, aggregate was perfect for this situation. It did take a few minutes to compute, but I had over 57,000 rows and 8 columns, so that's understandable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-7863155530351465508?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/7863155530351465508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=7863155530351465508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7863155530351465508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7863155530351465508'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/01/aggregate-in-r.html' title='Aggregate in R'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ZpQa6LiwXis/SW0XjKvHNhI/AAAAAAAABZs/y-CRlexUhAY/s72-c/pastedpic_01132009_163528.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8704504589335235106</id><published>2009-01-13T08:34:00.000-08:00</published><updated>2009-01-13T09:10:11.560-08:00</updated><title type='text'>Virtualization with Virtual Box in Ubuntu</title><content type='html'>I copied some material from these links in doing this (there are one or two errors in them that I correct here):&lt;br /&gt;http://www.ubuntu-unleashed.com/2008/04/howto-install-virtualbox-in-hardy-heron.html&lt;br /&gt;http://www.linuxhaxor.net/2008/05/05/creating-seamless-virtual-machine-with-virtualbox-16/&lt;br /&gt;&lt;ol&gt;&lt;li&gt;make sure you have the 'build-essential' package installed:&lt;br /&gt;sudo apt-get install build-essential&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;Download&lt;/a&gt; your version of virtual box (probably i386 unless you have a 64 bit processor) and install it&lt;br /&gt;&lt;br /&gt;After download, right click the package and install with the GDeb package manager&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Add your user to the vboxusers group:&lt;br /&gt;sudo adduser $USER vboxusers&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Follow the &lt;b&gt;Setup VirtualBox USB Support&lt;/b&gt; section &lt;a href="http://www.ubuntu-unleashed.com/2008/04/howto-install-virtualbox-in-hardy-heron.html"&gt;here&lt;/a&gt; for USB support&lt;br /&gt;I did both of the things recommended.  Note that the last step should read:&lt;br /&gt;&lt;code&gt;sudo /etc/init.d/mountkernfs.sh start&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Install Guest Addons and turn on seamless mode&lt;br/&gt;after firing up the virtual OS, go to the 'Devices' window on the top and 'Install Guest Additions'&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Set up shared directories following &lt;a href="http://www.lifehacker.com.au/tips/2008/03/15/run_windows_apps_seamlessly_inside_linux-2.html"&gt;this&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8704504589335235106?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8704504589335235106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8704504589335235106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8704504589335235106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8704504589335235106'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/01/virtualization-with-virtual-box-in.html' title='Virtualization with Virtual Box in Ubuntu'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8611895030752620537</id><published>2009-01-07T13:21:00.000-08:00</published><updated>2009-05-21T21:26:20.346-07:00</updated><title type='text'>autotest with specs in a normal ruby library</title><content type='html'>Put this in a '.autotest' file in your project's base directory:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# -*- ruby -*-&lt;br /&gt;&lt;br /&gt;# in .autotest file:&lt;br /&gt;&lt;br /&gt;Autotest.add_hook :initialize do |at|&lt;br /&gt;  at.clear_mappings&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Autotest.add_hook :initialize do |at|&lt;br /&gt;  at.add_mapping(%r%^lib/(.*)\.&lt;wbr&gt;rb$%) { |_, m|&lt;br /&gt;    ["spec/#{m[1]}_spec.rb"]&lt;br /&gt;    ## for both specs and tests:&lt;br /&gt;    #["spec/#{m[1]}_spec.rb","&lt;wbr&gt;test/#{m[1]}_test.rb"]&lt;br /&gt;  }&lt;br /&gt;end&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8611895030752620537?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8611895030752620537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8611895030752620537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8611895030752620537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8611895030752620537'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2009/01/autotest-with-specs-in-normal-ruby.html' title='autotest with specs in a normal ruby library'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4555111859137282946</id><published>2008-12-26T11:04:00.000-08:00</published><updated>2008-12-26T11:19:23.479-08:00</updated><title type='text'>Smaller playlist.com music player for blog</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ZpQa6LiwXis/SVUuMHgTSVI/AAAAAAAABTI/HbJQl4OZUuY/s1600-h/playlist.png"&gt;&lt;img style="cursor: pointer; width: 234px; height: 320px;" src="http://3.bp.blogspot.com/_ZpQa6LiwXis/SVUuMHgTSVI/AAAAAAAABTI/HbJQl4OZUuY/s320/playlist.png" alt="" id="BLOGGER_PHOTO_ID_5284180523496982866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Playlist.com is a popular source for getting free music on your blog. My problem was I didn't want it to be at the bottom of the blog, but on the sidebar. The code they give you makes a music player that is much too wide for a sidebar. Here is how you can edit the code to fit whatever width you want.&lt;br /&gt;&lt;br /&gt;Your code should resemble the code below. Simply change the bold numbers from your code to smaller, or larger numbers, depending on the size you want (I only included the beginning of the code, where you need to make changes). For my sidebar I used 285 to replace 450 and then 275 to replace all the 435's.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;div style="text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:&lt;span style="font-weight: bold;"&gt;450&lt;/span&gt;px;"embed style="width: &lt;span style="font-weight: bold;"&gt;435&lt;/span&gt;px; visibility: visible; height: 270px;" allowscriptaccess="never" src="http://www.greatprofilemusic.com/mc/mp3player-othersite.swf?config=http://www.greatprofilemusic.com/mc/config/config_black.xml&amp;amp;mywidth=&lt;span style="font-weight: bold;"&gt;435&lt;/span&gt;&amp;amp;myheight=270&amp;amp;playlist_url=http://www.greatprofilemusic.com/loadplaylist.php?playlist=55939558" menu="false" quality="high" name="mp3player" width="&lt;span style="font-weight: bold;"&gt;435&lt;/span&gt;" height="270"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4555111859137282946?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4555111859137282946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4555111859137282946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4555111859137282946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4555111859137282946'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/12/smaller-playlistcom-music-player-for.html' title='Smaller playlist.com music player for blog'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ZpQa6LiwXis/SVUuMHgTSVI/AAAAAAAABTI/HbJQl4OZUuY/s72-c/playlist.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3215880329342384878</id><published>2008-11-30T19:56:00.001-08:00</published><updated>2011-10-10T22:13:30.620-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='howto set 1440 Timex sports watch instructions'/><title type='text'>Set Timex 1440 Sports watch</title><content type='html'>Couldn't find this anywhere on the web (the instruction manual for this watch does not match the watch).  After many, many attempts I finally figured it out:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Press and hold the mode button for a few seconds, then, press the mode button again!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The&lt;span style="font-weight: bold;"&gt; 'set' &lt;/span&gt;button then changes the value while the &lt;span style="font-weight: bold;"&gt;'start/stop'&lt;/span&gt; button will advance to the next thing to set.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Set the Timex 1440 Sports Watch (wr50m) Magnetism watch&lt;/h3&gt;hold down the "mode" button for 2 seconds. When the digits on the watch face start to blink, then press the "mode" button again. To change the hours, press the "adjust button". [instructions thanks to a comment below]&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;To turn the alarm off:&lt;/h3&gt;Press and hold "set."&lt;br /&gt;At the same time press (and hold?) "start/stop."&lt;br/&gt;You will see the alarm bell icon go away.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Also, see &lt;a href="http://wiki.answers.com/Q/How_do_you_set_time_on_a_timex_1440_sports_watch"&gt;wiki.answers post&lt;/a&gt; for more details.&lt;/b&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3215880329342384878?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3215880329342384878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3215880329342384878' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3215880329342384878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3215880329342384878'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/11/set-timex-1440-sports-watch.html' title='Set Timex 1440 Sports watch'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2434872162541165726</id><published>2008-10-23T17:04:00.000-07:00</published><updated>2008-10-23T17:19:15.237-07:00</updated><title type='text'>Clean surfing on YouTube</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_j5Oah6iCmCU/SQETx0deQ0I/AAAAAAAAAJQ/6t7DSkZwE4E/s1600-h/Install_YouTube_Customization.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 182px;" src="http://1.bp.blogspot.com/_j5Oah6iCmCU/SQETx0deQ0I/AAAAAAAAAJQ/6t7DSkZwE4E/s320/Install_YouTube_Customization.png" alt="" id="BLOGGER_PHOTO_ID_5260507586362229570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;YouTube is a great service.  Unfortunately, it seems like dodgy promo videos (at least dodgy  thumbnail images) are the norm for the site.  Here's how to disable them (I'm assuming you are using Firefox):&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;install the addon &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/748"&gt;GreaseMonkey&lt;/a&gt;&lt;/li&gt;&lt;li&gt;install the &lt;a href="http://userscripts.org/scripts/show/33254"&gt;YouTube customization script &lt;/a&gt;&lt;/li&gt;&lt;li&gt;on a video page, customize:&lt;/li&gt;&lt;/ol&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_j5Oah6iCmCU/SQEUAT32HJI/AAAAAAAAAJY/CiFth-TAo_0/s1600-h/xf69ed.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 272px;" src="http://3.bp.blogspot.com/_j5Oah6iCmCU/SQEUAT32HJI/AAAAAAAAAJY/CiFth-TAo_0/s400/xf69ed.png" alt="" id="BLOGGER_PHOTO_ID_5260507835312512146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, all videos will have blocked Promotional Videos!  Hooray!  (Note: you can click on the little monkey in the bottom right hand of your browser to disable GreaseMonkey at any time)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2434872162541165726?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2434872162541165726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2434872162541165726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2434872162541165726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2434872162541165726'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/10/clean-surfing-on-youtube.html' title='Clean surfing on YouTube'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_j5Oah6iCmCU/SQETx0deQ0I/AAAAAAAAAJQ/6t7DSkZwE4E/s72-c/Install_YouTube_Customization.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8004944906069123852</id><published>2008-07-31T17:24:00.000-07:00</published><updated>2008-07-31T17:26:24.948-07:00</updated><title type='text'>Installing emerald with Ubuntu 8.04</title><content type='html'>http://hacktivision.com/index.php/2008/06/07/how-to-enhance-ubuntu-8-04-hardy-heron-e?blog=2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8004944906069123852?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8004944906069123852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8004944906069123852' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8004944906069123852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8004944906069123852'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/07/installing-emerald-with-ubuntu-804.html' title='Installing emerald with Ubuntu 8.04'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-4668077697774193632</id><published>2008-05-17T13:13:00.000-07:00</published><updated>2008-05-17T13:17:42.928-07:00</updated><title type='text'>Export plots in R</title><content type='html'>In R exporting plots is easy:&lt;br /&gt;&lt;br /&gt;jpeg("/home/Desktop/nameplot_here.jpg") #name the file and where to export it&lt;br /&gt;&lt;br /&gt;hist(data) #this makes a histogram of your data&lt;br /&gt;&lt;br /&gt;dev.off() #actually do the exporting&lt;br /&gt;&lt;br /&gt;To do png or pdf just substitute it for jpeg.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-4668077697774193632?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/4668077697774193632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=4668077697774193632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4668077697774193632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/4668077697774193632'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/05/export-plots-in-r.html' title='Export plots in R'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-5185084312859302148</id><published>2008-04-10T17:58:00.000-07:00</published><updated>2008-04-10T17:59:05.666-07:00</updated><title type='text'></title><content type='html'>&lt;script type="text/javascript" src="http://www.ubuntu.com/files/countdown/display.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-5185084312859302148?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/5185084312859302148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=5185084312859302148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5185084312859302148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/5185084312859302148'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/04/blog-post.html' title=''/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-6085387132482025064</id><published>2008-03-24T22:22:00.000-07:00</published><updated>2008-03-24T22:24:00.980-07:00</updated><title type='text'>Cool applications for Linux</title><content type='html'>http://linuxondesktop.blogspot.com/2007/07/35-cool-applications-to-install-on.html&lt;br /&gt;&lt;br /&gt;Great website, I highly recommend it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-6085387132482025064?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/6085387132482025064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=6085387132482025064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6085387132482025064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/6085387132482025064'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/03/cool-applications-for-linux.html' title='Cool applications for Linux'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1802939049934422665</id><published>2008-02-22T18:34:00.000-08:00</published><updated>2008-02-22T18:50:16.774-08:00</updated><title type='text'>HP scanjet 4370 on Gutsy Gibbon (Ubuntu 7.10)</title><content type='html'>Here's how I got our scanner working on Gutsy.&lt;br /&gt;&lt;br /&gt;Install sane:&lt;br /&gt;&lt;pre&gt;sudo aptitude install sane sane-utils&lt;/pre&gt;Then find out where your scanner resides:&lt;br /&gt;&lt;pre&gt;sane-find-scanner&lt;/pre&gt;You're interested in the series of usb ports that your usb is connected to:&lt;br /&gt;&lt;pre&gt;found USB scanner (vendor=0x03f0 [hewlett packard],&lt;br /&gt;product=0x4105 [hp scanjet], chip=rts8822L-01H?) at libusb:007:006&lt;/pre&gt;In my case, the scanner is plugged into usb port 007 and subport 006 (I have no idea if that's the proper way to talk about it, but you'll see that it will work to think like that)&lt;br /&gt;Then, you need the driver for your scanner, so go to the sane &lt;a href="http://www.sane-project.org/sane-supported-devices.html"&gt;supported devices page&lt;/a&gt; and find your scanner.  You access the driver by clicking under the 'Backend' link.&lt;br /&gt;At least in theory, this driver is supposed to be in the sane-backends distribution.  I'm not sure where to get it (already come with sane?).  Anyway, my device wasn't really recognized when firing up 'xsane' until I downloaded and installed the driver.&lt;br /&gt;Now, we have to set the permissions such that we can access our scanner.  Notice that we use the the usb port information gleaned about to accomplish this:&lt;br /&gt;&lt;pre&gt;sudo chmod a+rw /proc/bus/usb/007/006&lt;/pre&gt;A person is supposed to be able to automate that process, but I haven't figured it out yet.  In any case, we can now fire up sane with the command 'xsane' or install 'gimp2.0-quiteinsane' to access from within gimp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1802939049934422665?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1802939049934422665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1802939049934422665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1802939049934422665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1802939049934422665'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/02/hp-scanjet-4370-on-gutsy-gibbon-ubuntu.html' title='HP scanjet 4370 on Gutsy Gibbon (Ubuntu 7.10)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-706657874964186006</id><published>2008-02-16T12:45:00.000-08:00</published><updated>2008-02-16T12:53:41.013-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu gutsy nvidia'/><title type='text'>Using LCD Projectors or monitors with Ubuntu Gutsy Gibbon and Nvidia</title><content type='html'>Under Edgy and Feisty, you could just restart your machine, hit your [CRT/LCD] (Fn+F8 on my machine) while it was loading and it would automatically do this for you.&lt;p&gt;Under Gutsy, this will work (may be easier/better ways to do this):&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;run command 'nvidia-settings' and go to 'X Server Display Configuration'&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you are all plugged in, there should be two grey boxes displayed, one labeled 'LGP' (your LCD screen) and another (mine's labeled 'LG').&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Change the resolution of your current display to match what you will be using (most projectors are 1024x768)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now, click on the LG box. (The way to control which display you are dealing with are clicking and moving those boxes)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You should see a box with a Configuration: Disabled and button [Configure]; click the Configure button.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How Should this display device be configured?  Click 'TwinView'&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Resolution 'Auto'&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Position 'Clones'&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Then hit 'Apply'&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;That's it!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you want to run this configuration with no setup, then click on the 'Save to X Configuration File' and copy it over your /etc/X11/xorg.conf file whenever you need it (make sure you backup your original xorg.conf file!)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To undo it, click on the Configure button for LG, and click 'Disabled'. Then, change the resolution for your current screen and hit the 'Apply' button.&lt;/p&gt;&lt;p&gt;NOTE: this does not want to work under wmii-ruby because it does not want to respond to the change in resolution from gnome-display-properties.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-706657874964186006?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/706657874964186006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=706657874964186006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/706657874964186006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/706657874964186006'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/02/using-lcd-projectors-or-monitors-with.html' title='Using LCD Projectors or monitors with Ubuntu Gutsy Gibbon and Nvidia'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-208266743744462111</id><published>2008-02-15T10:46:00.000-08:00</published><updated>2008-02-15T11:03:32.253-08:00</updated><title type='text'>Gutsy Gibbon broken matplotlib, pylab</title><content type='html'>Usually, Ubuntu's package management system gets everything right.  However, on Gutsy Gibbon when you install the very handy &lt;a href="http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fmatplotlib.sourceforge.net%2F&amp;amp;ei=WN61R5_OKYmIpwT-urGnDQ&amp;amp;usg=AFQjCNEVDv5D-4uucCEditylniIjlThC0g&amp;amp;sig2=KGsVt58Y3s2-yOSjnzAY4g"&gt;matplotlib&lt;/a&gt; it gives you a broken installation.  Basically, you'll get some error messages like this:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; import pylab&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;  File "&lt;stdin&gt;", line 1, in ?&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/pylab.py", line 1, in ?&lt;br /&gt;    from matplotlib.pylab import *&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 199, in ?&lt;br /&gt;    import cm&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/matplotlib/cm.py", line 5, in ?&lt;br /&gt;    import colors&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/matplotlib/colors.py", line 38, in ?&lt;br /&gt;    from numerix import array, arange, take, put, Float, Int, putmask, \&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/matplotlib/numerix/__init__.py", line 82, in ?&lt;br /&gt;    import numpy&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 43, in ?&lt;br /&gt;    import linalg&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/numpy/linalg/__init__.py", line 4, in ?&lt;br /&gt;    from linalg import *&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", line 25, in ?&lt;br /&gt;    from numpy.linalg import lapack_lite&lt;br /&gt;ImportError: /usr/lib/atlas/liblapack.so.3: undefined symbol: ATL_chemv&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, I think they are trying to allow  you to use whatever linear algebra backend you want.  A fix (maybe there are better ones) is to install lapack3: &lt;pre&gt; sudo aptitude install lapack3&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-208266743744462111?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/208266743744462111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=208266743744462111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/208266743744462111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/208266743744462111'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/02/gutsy-gibbon-broken-matplotlib-pylab.html' title='Gutsy Gibbon broken matplotlib, pylab'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-863528057092595929</id><published>2008-02-14T09:41:00.000-08:00</published><updated>2008-02-14T09:45:18.942-08:00</updated><title type='text'>CSS for ruby syntax highlighting</title><content type='html'>Add this to your css to get ruby code colored nicely.&lt;br /&gt;&lt;br /&gt;from &lt;a href="http://redcorundum.blogspot.com/2006/07/syntax-coloring.html"&gt;http://redcorundum.blogspot.com/2006/07/syntax-coloring.html&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;pre.code {&lt;br /&gt;  padding: 1ex 1ex 1ex 1ex;&lt;br /&gt;  border: 4px groove #CC0000;&lt;br /&gt;  overflow-x: auto;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;pre.code span.attribute { color: #009900; }&lt;br /&gt;pre.code span.char { color: #F00; }&lt;br /&gt;pre.code span.class { color: #A020F0; font-weight: bold; }&lt;br /&gt;pre.code span.comment { color: #0000FF; }&lt;br /&gt;pre.code span.constant { color: #008B8B; }&lt;br /&gt;pre.code span.escape { color: #6A5ACD; }&lt;br /&gt;pre.code span.expr { color: #2222CC; }&lt;br /&gt;pre.code span.global { color: #11AA44; }&lt;br /&gt;pre.code span.ident { color: #000000; }&lt;br /&gt;pre.code span.keyword { color: #A52A2A; font-weight: bold; }&lt;br /&gt;pre.code span.method { color: #008B8B; }&lt;br /&gt;pre.code span.module { color: #A020F0; font-weight: bold; }&lt;br /&gt;pre.code span.number { color: #DD00DD; }&lt;br /&gt;pre.code span.punct { color: #6A5ACD; }&lt;br /&gt;pre.code span.regex { color: #DD00DD; }&lt;br /&gt;pre.code span.string { color: #DD00DD; }&lt;br /&gt;pre.code span.symbol { color: #008B8B; }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-863528057092595929?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/863528057092595929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=863528057092595929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/863528057092595929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/863528057092595929'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/02/css-for-ruby-syntax-highlighting.html' title='CSS for ruby syntax highlighting'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1325371906985623039</id><published>2008-01-31T14:23:00.000-08:00</published><updated>2008-01-31T14:30:46.134-08:00</updated><title type='text'>Install Ubuntu as a file in windows with one-click</title><content type='html'>If you want to try out linux (Ubuntu), this is BY FAR the easiest method.  Just download this installer.  The next time you reboot you can choose Windows or Linux:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wubi-installer.org/index.php"&gt;http://wubi-installer.org/index.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically, a file (6GB by default) is allocated inside of windows and a boot loader is installed.  On reboot, you can choose windows or linux.  When you are done, you can uninstall it and it goes away.  Or, there are ways to migrate that file into a fresh partition if you want.&lt;br /&gt;&lt;br /&gt;Very smooth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1325371906985623039?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1325371906985623039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1325371906985623039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1325371906985623039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1325371906985623039'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/install-ubuntu-as-file-in-windows-with.html' title='Install Ubuntu as a file in windows with one-click'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-734962978400302571</id><published>2008-01-28T13:05:00.001-08:00</published><updated>2008-01-28T13:07:31.020-08:00</updated><title type='text'>R help in a browser</title><content type='html'>Really annoying to try to look up docs in a window you are using.  Instead, try this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;help.start()  # this will start up documentation in a browser&lt;br /&gt;help(plot)    # shows documentation in browswer window now!&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-734962978400302571?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/734962978400302571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=734962978400302571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/734962978400302571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/734962978400302571'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/r-help-in-browser.html' title='R help in a browser'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-2710498444206681925</id><published>2008-01-28T07:45:00.000-08:00</published><updated>2009-02-06T16:11:59.899-08:00</updated><title type='text'>data.frame in R (the key object)</title><content type='html'>I've been wading through R trying to figure out how it all works.  It looks like the most important data structure is the data frame, and here I demo how to make a dataframe that a person can then play with.  Yes, you can import data from a spreadsheet, but a person should understand the underlying data structure.&lt;br /&gt;&lt;br /&gt;A data.frame is just a list of vectors or matrices where each has the same number of rows (think of the vectors as columns).  It really is just the same as data in a spreadsheet:&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;var1&lt;/th&gt;&lt;th&gt;var2&lt;/th&gt;&lt;th&gt;var3&lt;/th&gt;&lt;th&gt;fac1&lt;/th&gt;&lt;th&gt;fac2&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;hot&lt;/td&gt;&lt;td&gt;TX&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;cold&lt;/td&gt;&lt;td&gt;WI&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;cold&lt;/td&gt;&lt;td&gt;UT&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;In fact, when one reads in this type of info, one gets a data.frame back:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;df = read.csv("&lt;filename&gt;.csv", quote="")  # &lt;-reads an unquoted csv file with headers&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, assuming we have some data like the above, now lets make it in R:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;&gt; var1 &lt;- c(1,0,3)    #  '&lt;-' is the assignment operator (like a directional '=')&lt;br /&gt;                      #  'c()' is the concatenate operator (makes lists of things)&lt;br /&gt;&gt; var2 &lt;- c(3,2,8)&lt;br /&gt;&gt; var3 &lt;- array( c(4,3,2), c(3) )  # here's how you make a more mathematical vector&lt;br /&gt;&lt;br /&gt;&gt; fac1 &lt;- c("hot", "cold", "cold")&lt;br /&gt;&gt; fac2 &lt;- c("TX","WI","UT")&lt;br /&gt;&lt;br /&gt;# alright, lets add all this stuff together into a dataframe:&lt;br /&gt;&lt;br /&gt;&gt; df &lt;- data.frame(var1,var2,var3,fac1,fac2, row.names=NULL, check.rows=TRUE)&lt;br /&gt;&lt;br /&gt;# creates this:&lt;br /&gt;  var1 var2 var3 fac1 fac2&lt;br /&gt;1    1    3    4  hot   TX&lt;br /&gt;2    0    2    3 cold   WI&lt;br /&gt;3    3    8    2 cold   UT&lt;br /&gt;&lt;br /&gt;# want to see the names of the columns in the dataset:&lt;br /&gt;&gt; names(df)&lt;br /&gt;[1] "var1" "var2" "var3" "fac1" "fac2"&lt;br /&gt;&lt;br /&gt;# change the names:&lt;br /&gt;&gt; names(df) &lt;- c("height", "weight", "nose.length", "temp", "state")&lt;br /&gt;&gt; df&lt;br /&gt;  height weight nose.length temp state&lt;br /&gt;1      1      3           4  hot    TX&lt;br /&gt;2      0      2           3 cold    WI&lt;br /&gt;3      3      8           2 cold    UT&lt;br /&gt;&lt;br /&gt;# so, now we have a data.frame, the preferred data structure in R.  Let the magic begin:&lt;br /&gt;&lt;br /&gt;&gt; plot(df)  &lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_j5Oah6iCmCU/R54A7FX0L3I/AAAAAAAAAB0/kgmJs0VsEY4/s1600-h/coplot.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_j5Oah6iCmCU/R54A7FX0L3I/AAAAAAAAAB0/kgmJs0VsEY4/s400/coplot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5160563238067515250" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-2710498444206681925?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/2710498444206681925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=2710498444206681925' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2710498444206681925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/2710498444206681925'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/dataframe-in-r-key-object.html' title='data.frame in R (the key object)'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_j5Oah6iCmCU/R54A7FX0L3I/AAAAAAAAAB0/kgmJs0VsEY4/s72-c/coplot.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3025171813302660719</id><published>2008-01-25T09:28:00.000-08:00</published><updated>2008-01-25T09:50:26.649-08:00</updated><title type='text'>Installing and basic plotting in R</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ZpQa6LiwXis/R5ogRGRkn6I/AAAAAAAAAh0/8gxmazttzag/s1600-h/plot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ZpQa6LiwXis/R5ogRGRkn6I/AAAAAAAAAh0/8gxmazttzag/s320/plot.png" alt="" id="BLOGGER_PHOTO_ID_5159471801220505506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Windows users:&lt;br /&gt;http://cran.r-project.org/bin/windows/base/&lt;br /&gt;Download &lt;a href="http://cran.r-project.org/bin/windows/base/R-2.6.1-win32.exe"&gt;R-2.6.1-win32.exe&lt;/a&gt; and install it like any program.&lt;br /&gt;Start it like any other program from the start menu&lt;br /&gt;&lt;br /&gt;Linux users:&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;s&lt;/span&gt;udo apt-get install r-base&lt;br /&gt;Just type R in the terminal&lt;br /&gt;&lt;br /&gt;Read in a file&lt;br /&gt;Go into excel or even a text editor and create a simple data set like this:&lt;br /&gt;1,3&lt;br /&gt;2,5&lt;br /&gt;2,6&lt;br /&gt;3,8&lt;br /&gt;4,4&lt;br /&gt;6,3&lt;br /&gt;7,9&lt;br /&gt;Where the second column is after the comma.&lt;br /&gt;Save your file as a .csv&lt;br /&gt;Look up where you saved it and insert that as the location in the following code:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;data&lt;-read.table("/home/eldon/Desktop/data.csv",sep=",")&lt;/span&gt; #this reads in your data and assigns it to the data frame "data"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;plot(data)&lt;/span&gt; #this gives you a simple plot of your data&lt;br /&gt;If you want to learn more about simple plotting just enter:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;help(plot)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3025171813302660719?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3025171813302660719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3025171813302660719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3025171813302660719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3025171813302660719'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/installing-and-basic-plotting-in-r.html' title='Installing and basic plotting in R'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ZpQa6LiwXis/R5ogRGRkn6I/AAAAAAAAAh0/8gxmazttzag/s72-c/plot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-8924640673088646224</id><published>2008-01-24T13:22:00.000-08:00</published><updated>2008-01-24T13:24:58.675-08:00</updated><title type='text'>Scientists for Better PCR</title><content type='html'>http://bio-rad.cnpg.com/lsca/videos/ScientistsForBetterPCR/&lt;br /&gt;&lt;br /&gt;Good for a laugh&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-8924640673088646224?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/8924640673088646224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=8924640673088646224' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8924640673088646224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/8924640673088646224'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/scientists-for-better-pcr.html' title='Scientists for Better PCR'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1710634231657930128</id><published>2008-01-23T22:47:00.000-08:00</published><updated>2008-01-23T22:56:04.675-08:00</updated><title type='text'>What about R?</title><content type='html'>Isn't R important enough to put into the subtitle?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1710634231657930128?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1710634231657930128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1710634231657930128' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1710634231657930128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1710634231657930128'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/what-about-r.html' title='What about R?'/><author><name>EGP</name><uri>http://www.blogger.com/profile/10276929334706945468</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_ZpQa6LiwXis/ShboCMXPyqI/AAAAAAAABik/XzeFeTQ_2CY/S220/baseballgloveedit.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-7031884158787871841</id><published>2008-01-23T21:55:00.000-08:00</published><updated>2010-06-22T16:57:15.917-07:00</updated><title type='text'>R from ruby</title><content type='html'>rsruby lets you run supposedly any function in R from ruby.&lt;br /&gt;&lt;br /&gt;Elaborating on the &lt;a href="http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang"&gt;sci-ruby page&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;sudo apt-get install r-base ruby1.9.1-full ruby1.9.1-dev&lt;br /&gt;sudo ln -s /usr/lib/R/lib/libR.so /usr/lib/libR.so&lt;br /&gt;sudo ln -s /usr/share/R/include/R.h /usr/include/R.h&lt;br /&gt;gem install rsruby -- --with-R-dir=/usr/share/R&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I thought this was necessary, but don't so much any more:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# add a line to your .bashrc file to point to R:&lt;br /&gt;echo "export R_HOME=/usr/lib/R" &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;source ~/.bashrc   # read the bashrc file to get the variable&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-7031884158787871841?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/7031884158787871841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=7031884158787871841' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7031884158787871841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/7031884158787871841'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/r-from-ruby.html' title='R from ruby'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-1342676454339862093</id><published>2008-01-23T21:46:00.001-08:00</published><updated>2008-01-23T22:17:30.542-08:00</updated><title type='text'>the lightsaber: our weapon of choice</title><content type='html'>&lt;a href="http://www.tecnosquad.com/wp-content/uploads/2007/09/lightsaber.jpg"&gt;http://www.tecnosquad.com/wp-content/uploads/2007/09/lightsaber.jpg&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-1342676454339862093?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/1342676454339862093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=1342676454339862093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1342676454339862093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/1342676454339862093'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/lightsabers-are-cool.html' title='the lightsaber: our weapon of choice'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9170434694647900866.post-3368601225074397102</id><published>2008-01-23T20:20:00.001-08:00</published><updated>2008-01-23T20:23:21.595-08:00</updated><title type='text'>sudo make me a sandwich</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imgs.xkcd.com/comics/sandwich.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://imgs.xkcd.com/comics/sandwich.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://imgs.xkcd.com/comics/sandwich.png"&gt;http://imgs.xkcd.com/comics/sandwich.png&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;If you don't know what this is about, stick around and you might.  eventually.  after an explanation.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9170434694647900866-3368601225074397102?l=sudoit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudoit.blogspot.com/feeds/3368601225074397102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9170434694647900866&amp;postID=3368601225074397102' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3368601225074397102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9170434694647900866/posts/default/3368601225074397102'/><link rel='alternate' type='text/html' href='http://sudoit.blogspot.com/2008/01/sudo-make-me-sandwich.html' title='sudo make me a sandwich'/><author><name>JTP</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
