<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>tom alison dot com</title>
 <link href="http://tomalison.com/atom.xml" rel="self" type="application/atom+xml"/>
 <link href="http://tomalison.com/" rel="alternate" type="text/html"/>
 <id>http://tomalison.com/atom.xml</id>
 <updated>2010-05-19T14:27:24-04:00</updated>
 <author>
   <name>Tom Alison</name>
   <email>tom@blog.tomalison.com</email>
 </author>
 
 
 <entry>
   <title>Helvetireader in Mozilla Prism</title>
   <summary>How to setup the Helvetireader userscript for Google Reader in Mozilla Prism.</summary>
   <link href="http://tomalison.com/2010/05/19/helv/"/>
   <updated>2010-05-19T00:00:00-04:00</updated>
   <id>id:/2010/05/19/helv</id>
   <content type="html">&lt;p&gt;I switch back and forth between &lt;a href=&quot;http://www.netvibes.com&quot;&gt;Netvibes&lt;/a&gt; and &lt;a href=&quot;http://reader.google.com&quot;&gt;Google Reader&lt;/a&gt; for reading RSS feeds. The Netvibes box layout is great for scanning lots of new items, but Google Reader lets you power through content more quickly.&lt;/p&gt;

&lt;p&gt;Today I noticed a co-worker using Google Reader with the &lt;a href=&quot;http://helvetireader.com/&quot; title=&quot;Helvetireader&quot;&gt;Helvetireader&lt;/a&gt; &lt;a href=&quot;http://userscripts.org/&quot;&gt;userscript&lt;/a&gt;. Helvetireader applies a clean theme to Google Reader with an emphasis on readability.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/helvetireader.png&quot;&gt;&lt;img src=&quot;/images/thumbs/helvetireader.png&quot; title=&quot;Click for a larger version&quot; alt=&quot;Helvetireader screenshot&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because Google Reader is a browser-based application, using Helvetireader requires installing the appropriate extension for your browser.&lt;/p&gt;

&lt;p&gt;I'm not a big fan of installing too many extensions, particularly just to accommodate a site-specific enhancement like Helvetireader provides. This is where creating a site-specific browser (&lt;a href=&quot;http://en.wikipedia.org/wiki/Site-specific_browser&quot;&gt;SSB&lt;/a&gt;) becomes advantageous. An SSB turns a single web site into a self-contained application. This provides finer-grained control over the experience of a site like Google Reader without interfering with general purpose browsing functionality.&lt;/p&gt;

&lt;p&gt;I'm currently on Linux, so &lt;a href=&quot;http://prism.mozillalabs.com/&quot; title=&quot;Mozilla Prism&quot;&gt;Mozilla Prism&lt;/a&gt; is my best choice of SSB provider. On OS X, &lt;a href=&quot;http://fluidapp.com/&quot;&gt;Fluid&lt;/a&gt; accomplishes the same goal and provides more features.&lt;/p&gt;

&lt;p&gt;Before downloading Prism directly from the Mozilla side, I ran a quick check to see if there was already a pre-packaged version of it available for Ubuntu.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-cache search prism
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Not only was there a &lt;code&gt;prism&lt;/code&gt; package, but there was also a pre-packaged build of Google Reader for Prism. Nice!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install prism-google-reader
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I initially thought that Prism supported userscripts like Helvetireader natively, but it turns out you still need the Greasemonkey add-on. There's a Greasemonkey add-on built specifically for Prism &lt;a href=&quot;http://github.com/teramako/Greasemonkey-For-Prism/&quot;&gt;available on Github&lt;/a&gt;. Building it is simple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone http://github.com/teramako/greasemonkey-for-prism.git
cd greasemonkey-for-prism
sh build.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;From within Prism go to Tools &gt; Add-ons &gt; Install... and choose the XPI file created in the &lt;code&gt;greasemonkey-for-prism&lt;/code&gt; directory above. Then restart the Google Reader Prism app.&lt;/p&gt;

&lt;p&gt;In the settings menu, you can now install any userscript. Go to &lt;em&gt;Settings &gt; Greasemonkey &gt; Download User Script...&lt;/em&gt; and enter the URL for the Helvetireader script (currently &lt;a href=&quot;http://helvetireader.com/helvetireader2.user.js&quot;&gt;http://helvetireader.com/helvetireader2.user.js&lt;/a&gt;). Now you should see Google Reader with the Helvetireader theme.&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://helvetireader.com/&quot; title=&quot;Helvetireader&quot;&gt;Helvetireader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://prism.mozillalabs.com/&quot; title=&quot;Mozilla Prism&quot;&gt;Mozilla Prism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/teramako/Greasemonkey-For-Prism/&quot; title=&quot;Greasemonkey for Prism&quot;&gt;Greasemonkey for Prism&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Command-line WebDAV</title>
   <summary>Reference notes for setting up command-line WebDAV mounts on Ubuntu and OS X.</summary>
   <link href="http://tomalison.com/reference/2010/04/03/webdav/"/>
   <updated>2010-04-03T00:00:00-04:00</updated>
   <id>id:/reference/2010/04/03/webdav</id>
   <content type="html">&lt;p&gt;These are some reference notes I put together for mounting WebDAV
volumes via the command-line.&lt;/p&gt;

&lt;p&gt;About six months ago I switched from Wordpress to
&lt;a href=&quot;http://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt; to maintain this
blog. Consequently, I saved a couple of bucks by cancelling my
full-featured web hosting service and switching to the simple file
publishing offered by my &lt;a href=&quot;http://fastmail.fm&quot;&gt;Fastmail.fm&lt;/a&gt; account.&lt;/p&gt;

&lt;p&gt;Fastmail doesn't offer ssh access, so files must be transferred by FTP
or WebDAV. I wanted fully scripted deploys for my Jekyll site, and
started off using FTP with the &lt;a href=&quot;http://www.ncftpd.com/ncftp/&quot;&gt;NcFTP&lt;/a&gt;
client.&lt;/p&gt;

&lt;p&gt;The problem with FTP was that my entire site was uploaded every time,
even if most of it was unchanged. This wasn't that big of a deal
because I don't have too many files, but it bothered me knowing that a
better solution was available if I could just mount my Fastmail
directory via WebDAV and then rsync everything over.&lt;/p&gt;

&lt;p&gt;One thing worth noting is that rsync normally looks at both the
modification time and the size of each file in the set to determine
whether or not it needs to be copied to the destination
directory. Because Jekyll always regenerates every file, the
modification times are always updated. This causes rsync to copy your
entire site over to the destination and subverts one of the best
features of rsync - the speedup you get from only syncing diffs.&lt;/p&gt;

&lt;p&gt;The way to get around this is to use the &lt;code&gt;--size-only&lt;/code&gt; flag. This
causes rsync to ignore timestamps. Most of the time this shouldn't be
a problem, unless you make minor edits to a file that doesn't cause a
change in file size.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rsync -rvz --size-only --delete &quot;~/mysite_src/&quot; &quot;/mnt/webdav/mysite_dest&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;See &lt;code&gt;man rsync&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I use Ubuntu and OS X. There's a different solution for each. Here are
my notes.&lt;/p&gt;

&lt;h4&gt;Ubuntu&lt;/h4&gt;

&lt;p&gt;Install davfs2:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install davfs2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To mount as a non-root user:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; Must run &lt;code&gt;dpkg-reconfigure davfs2&lt;/code&gt; according to
/usr/share/doc/davfs2/README.Debian to get around &quot;/sbin/mount.davfs:
program is not setuid root&quot; issue when trying to mount as non-root
user.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; Add &lt;code&gt;ignore_home kernoops&lt;/code&gt; to /etc/davfs2/davfs2.conf to get
around the &quot;/sbin/mount.davfs: / is the home directory of user
kernoops&quot; &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/davfs2/+bug/459998&quot;&gt;error&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Add an entry in fstab:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://example.org/dav   /media/dav   davfs   noauto,user   0   0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add your user to the davfs group:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo adduser &amp;lt;user&amp;gt; davfs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure WebDAV connection credentials are in ~/.davfs2/secrets with
restrictive permissions (&lt;code&gt;chmod 600&lt;/code&gt;):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/media/dav   webdav-username   password
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Perform mount/unmount:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mount /media/dav
umount /media/dav
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;References: &lt;code&gt;man mount.davfs2&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Mac OS X&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;mount_webdav&lt;/code&gt; exists but is unreliable. Could not get
&lt;a href=&quot;http://www.macosxhints.com/article.php?story=20020207214002198&amp;amp;query=mount_webdav&quot;&gt;workarounds&lt;/a&gt;
to work for password-protected WebDAV resource.&lt;/p&gt;

&lt;p&gt;The best thing to do is first mount the WebDAV volume manually. In the
Finder, hit Command+K to connect to the server. When prompted for
credentials, allow them to be saved in the keychain.&lt;/p&gt;

&lt;p&gt;Then, launch Automator and create a workflow that simply consists of
the action &quot;Connect to Servers&quot;. Save the workflow to disk.&lt;/p&gt;

&lt;p&gt;The Automator workflow can be
&lt;a href=&quot;http://www.macosxhints.com/article.php?story=20060805092715125&quot;&gt;run from the command-line&lt;/a&gt;
via:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;automator -i &quot;https://webdav.example.com&quot; &amp;lt;workflow&amp;gt; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The -i parameter specifies input to the workflow. See &lt;code&gt;man automator&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;My &lt;code&gt;automator&lt;/code&gt; command-line utility printed a bunch of warnings about
certain additions that couldn't be loaded. That's why the output is
directed to &lt;code&gt;/dev/null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; The workflow is itself a folder. The folder can be given as
the argument to automator. Within the main workflow folder, there is a
subfolder called &lt;code&gt;Contents&lt;/code&gt; with a file called &lt;code&gt;document.wflow&lt;/code&gt;. This
file can be passed directly to the &lt;code&gt;automator&lt;/code&gt; command-line program,
and the containing folders can be ditched.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Eclipse and Ubuntu Karmic</title>
   <summary>Ubuntu 9.10 offers a packaged version of Eclipse. Unfortunately, getting plugins to work is not straightforward.</summary>
   <link href="http://tomalison.com/2009/11/20/eclipse-ubuntu/"/>
   <updated>2009-11-20T00:00:00-05:00</updated>
   <id>id:/2009/11/20/eclipse-ubuntu</id>
   <content type="html">&lt;p&gt;Today, for the first time in a while, I wanted to work with some Java
code. I've always used &lt;a href=&quot;http://eclipse.org&quot;&gt;Eclipse&lt;/a&gt; for Java
programming, so I headed to their web site to download the latest
version.&lt;/p&gt;

&lt;p&gt;I don't keep up with the Eclipse project anymore. I'm sure they're
doing lots of great stuff, but every time I visit their site - about
once every six months - I'm more and more confused by the menu of
download choices. It used to be that you just downloaded Eclipse. Not
anymore.&lt;/p&gt;

&lt;p&gt;Having just done a clean install of Ubuntu 9.10, I decided on a whim
to see if it a packaged version of Eclipse built just for Java
programming. Sure enough they did:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install eclipse-jdt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Perfect. Everything installed correctly and a nice little 'Eclipse'
choice appeared under Applications &gt; Programming.&lt;/p&gt;

&lt;p&gt;Eclipse launched and things were copacetic...until I tried to install
plugins. Oddly, when I chose &quot;Install new software...&quot;, there were no
pre-configured repositories. In a normal installation you'd see the
default Eclipse update site, which offers a dizzying array of
add-ons. But here there were no platform capabilities to add.&lt;/p&gt;

&lt;p&gt;I didn't fret too much - after all, I just wanted a simple Eclipse
installation optimized for Java programming. I did, however, also want
to add the &lt;a href=&quot;http://subclipse.tigris.org/&quot;&gt;Subversion&lt;/a&gt; and
&lt;a href=&quot;http://m2eclipse.sonatype.org/&quot;&gt;Maven&lt;/a&gt; plugins.&lt;/p&gt;

&lt;p&gt;I added their respective update sites to the my Eclipse preferences
and tried installing both plugins. No luck. Each plugin reported
unsatisfied dependencies related to 'org.eclipse.gef' or
'org.eclipse.zest'.&lt;/p&gt;

&lt;p&gt;I knew those dependencies would be fulfilled by the current Eclipse
platform update site. I just couldn't figure out what the URL was. I
found the GEF update site, which seemed like a sure bet, but it failed
to resolve anything.&lt;/p&gt;

&lt;p&gt;Things did not become clear until I stumbled across this comment in an
&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/482244&quot;&gt;Ubuntu bug report&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;org.eclipse.emf is not installed by default; try adding
  http://download.eclipse.org/releases/galileo to your update sites
  and try again.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Ah...finally - the canonical Eclipse platform update URL. After
following those simple instructions, my plugins were able to resolve
their dependencies correctly and everything worked great.&lt;/p&gt;

&lt;p&gt;The logical question, posed by a commenter in the bug report, is:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;...shouldn't this galileo repository configured by default after
  installing the eclipse packages?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Seems reasonable. The answer:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Yes; that repository should be configured by default - most of our
  plug-in install related problems are actually related to it. If we
  knew how to make the build do it, then we would.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;While I respect any developer honest enough to say &quot;I don't know how
to do it&quot;, the answer is unsatisfying. Offering a packaged version of
Eclipse without the core platform update site is pretty close to
offering a broken software package.&lt;/p&gt;

&lt;p&gt;I'm sure someone will figure out a solution and fix the problem. My
wild-ass guess is it involves generating
&lt;a href=&quot;http://wiki.eclipse.org/Equinox/p2/Engine/Touchpoint_Instructions&quot;&gt;TouchPoint Instructions&lt;/a&gt;
to add the respositories correctly.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Command-line Document Conversion</title>
   <summary>How to convert documents to PDF and other formats from the command line.</summary>
   <link href="http://tomalison.com/2009/09/21/converting-documents/"/>
   <updated>2009-09-21T00:00:00-04:00</updated>
   <id>id:/2009/09/21/converting-documents</id>
   <content type="html">&lt;p&gt;If you're simply looking for a way to convert a one-off document, upload it to &lt;a href=&quot;http://docs.google.com&quot;&gt;Google
Docs&lt;/a&gt; or &lt;a href=&quot;http://scribd.com&quot;&gt;Scribd&lt;/a&gt; and let
them take care of the conversion for you. Be mindful of your privacy
settings so you don't accidentally share your document with the whole
world.&lt;/p&gt;

&lt;p&gt;For command-line conversion of documents, here's how to get going on
Ubuntu:&lt;/p&gt;

&lt;h4&gt;Install OpenOffice (headless)&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;http://www.openoffice.org&quot;&gt;OpenOffice&lt;/a&gt; provides the core conversion facilities. They do a
pretty respectable job at conversion of most document types, including
spreadsheets and presentations.&lt;/p&gt;

&lt;p&gt;You need to actually run an instance of OpenOffice in order to send it
the request to convert the document. Installing the headless version
means you can run in on a server without a windowing system, which you
need to be able to do if you want to run a massive document conversion
farm on &lt;a href=&quot;http://aws.amazon.com/ec2/&quot;&gt;EC2&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-get install openoffice.org-headless
apt-get install openoffice.org-java-common
apt-get install openoffice.org-writer
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Simple conversion with CUPS-PDF&lt;/h4&gt;

&lt;p&gt;One simple way to do this is to use
&lt;a href=&quot;http://www.cups-pdf.de/&quot;&gt;CUPS-PDF&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-get install cups-pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use OpenOffice to print the doc to a PDF file using CUPS-PDF. Note
that the output path can be found in /etc/cups/cups-pdf.conf (I'm
using cups-pdf v 2.5.0)&lt;/p&gt;

&lt;p&gt;Here's a script to do the conversion and open the output PDF in
evince.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://gist.github.com/190404&quot; title=&quot;source of to_pdf1.sh&quot;&gt;&lt;strong&gt;to_pdf1.sh&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Prints a file to PDF using OpenOffice and&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# CUPS-PDF. Opens output file with evince doc&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# viewer.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;##&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;CUPS_HOME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;$HOME/PDF&amp;quot;&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;basename &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;prefix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;%.[^.]*&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;outfile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;${CUPS_HOME}/${prefix}.pdf&amp;quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;Printing &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;prefix&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;.pdf

soffice -norestore &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    -nofirststartwizard &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    -nologo &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    -headless &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    -pt PDF &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;Sleeping 10 seconds

sleep 10

&lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;Opening &lt;span class=&quot;nv&quot;&gt;$outfile&lt;/span&gt;

evince &lt;span class=&quot;s2&quot;&gt;&amp;quot;$outfile&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Note that in the &lt;code&gt;-pt PDF&lt;/code&gt; option, &quot;PDF&quot; is the printer device
name of the CUPS-PDF printer device. It may differ on your
platform. Check /etc/cups/printers.&lt;/p&gt;

&lt;h4&gt;Better conversion with unoconv&lt;/h4&gt;

&lt;p&gt;The printing method works okay, but it doesn't detect the orientation
of your document, so you may notice presentations are rendering in
portrait mode instead of landscape mode in the output PDF.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dag.wieers.com/home-made/unoconv/&quot; title=&quot;unoconv&quot;&gt;unoconv&lt;/a&gt; is a Python utility that talks to an OpenOffice process
via an &lt;a href=&quot;http://udk.openoffice.org/&quot;&gt;Uno bridge&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-get install unoconv
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Because unoconv requires an OpenOffice instance, it's best to have a
process running before doing a lot of document conversion. unoconv can
start one for you:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;unoconv --listener &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Verify the process started:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ps -ef | grep soffice
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Look for something like this (line breaks inserted for legibility):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;soffice.bin -nologo -nodefault 
-accept=socket,host=localhost,port=2002;urp;StarOffice.ComponentContext
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you can bust out a script like this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://gist.github.com/190552&quot; title=&quot;source of to_pdf2.sh&quot;&gt;&lt;strong&gt;to_pdf2.sh&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Converts a document to a PDF file using&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# unoconv and opens it with the evince viewer.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;##&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;basename &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;dirname &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;prefix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;%.[^.]*&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;outfile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;${prefix}.pdf&amp;quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;Generating &lt;span class=&quot;nv&quot;&gt;$outfile&lt;/span&gt;

unoconv -f pdf &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;Opening &lt;span class=&quot;nv&quot;&gt;$outfile&lt;/span&gt;

evince &lt;span class=&quot;s2&quot;&gt;&amp;quot;${dir}/$outfile&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This option is much nicer.&lt;/p&gt;

&lt;p&gt;Java folks should check out the &lt;a href=&quot;http://www.artofsolving.com/opensource/jodconverter&quot; title=&quot;Java based document converter&quot;&gt;JODConverter&lt;/a&gt; project, which
provides similar functionality.&lt;/p&gt;

&lt;h4&gt;Taking it further&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Document thumbnails&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Want to grab a thumbnail of the first page of your converted PDF?
First install Imagemagick:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-cache install imagemagick
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;convert example.pdf[0] -thumbnail 120x120! -gravity center thumbnail.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will generate a fixed 120x120 thumbnail in JPG format of the
first page of your PDF. Note the array-like syntax:
&lt;em&gt;example.pdf[0]&lt;/em&gt;. This constrains the thumbnail generation to the
first page. If omitted, a thumbnail of every page is generated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indexing document content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Want to add document search? Run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;unoconv -f txt sample.doc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This generates a text version of the document that you can index with
Lucene or the indexer of your choice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read documents in the browser&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can generate an HTML version of your document to display on the
web:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;unoconv -f html sample.doc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For presentations and some other document formats, separate HTML files
are generated for each page. A little messy...&lt;/p&gt;

&lt;p&gt;You could get fancy like Scribd and render the document using Flash.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;apt-get install swftools
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Check out &lt;a href=&quot;http://www.quiss.org/swftools/pdf2swf_usage.html&quot; title=&quot;PDF to SWF converter&quot;&gt;pdf2swf&lt;/a&gt;. Put in a little work to build navigation controls
for your document and you've got yourself a pretty nice viewer.&lt;/p&gt;

&lt;h4&gt;Further Reading&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&amp;amp;t=18651&quot;&gt;Printing with CUPS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dag.wieers.com/home-made/unoconv/&quot; title=&quot;unoconv&quot;&gt;unoconv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.artofsolving.com/opensource/jodconverter&quot; title=&quot;Java based document converter&quot;&gt;JODConverter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://gist.github.com/190404&quot; title=&quot;source of to_pdf1.sh&quot;&gt;to_pdf1.sh source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://gist.github.com/190552&quot; title=&quot;source of to_pdf2.sh&quot;&gt;to_pdf2.sh source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.quiss.org/swftools/pdf2swf_usage.html&quot; title=&quot;PDF to SWF converter&quot;&gt;pdf2swf Usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.swftools.org&quot;&gt;swftools home&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Moving the Location of Your Flip Videos</title>
   <summary>How to move your Flip videos to a different folder or drive and still get the FlipShare software to find them.</summary>
   <link href="http://tomalison.com/190/moving-flip-videos/"/>
   <updated>2009-06-13T00:00:00-04:00</updated>
   <id>id:/190/moving-flip-videos</id>
   <content type="html">&lt;p&gt;&lt;em&gt;Update, June 21 2009:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The latest update of the FlipShare software (version 4.5) supports
moving your library natively. &lt;a
href=&quot;http://www.theflip.com/softwareupdate&quot;&gt;Get the latest
software&lt;/a&gt;, then go to &quot;Edit &amp;gt; Preferences &amp;gt; Library&quot;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/flipshare-native-move.png&quot;&gt;&lt;img src=&quot;/images/flipshare-native-move-300x219.png&quot; alt=&quot;Moving folder in FlipShare&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Older method, pre-FlipShare 4.5:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My friend gave my wife and I a &lt;a
href=&quot;http://www.amazon.com/gp/product/B001HSOFI2?ie=UTF8&amp;amp;amp;tag=tomalisondotc-20&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&amp;amp;amp;creativeASIN=B001HSOFI2&quot;&gt;Flip
Mino HD video camcorder&lt;/a&gt; as a gift when we had our first child. So
far it's been quite wonderful. It's simple to use and we share lots of
videos with our family that live far away.&lt;/p&gt;

&lt;p&gt;Today I was going through a backlog of videos stored on the Flip
camcorder and saving them to my computer. The problem was my hard
drive was running low on space.&lt;/p&gt;

&lt;p&gt;I figured I could just change a preference in the FlipShare software
to point it to a different hard drive where I had lots of space, but
no such luck. It turns out that FlipShare is hard-coded to place your
videos in a particular directory. I suppose this is to reduce the
likelihood of accidentally losing of your videos. But it also raises
the question of what to do with your Flip videos when your hard drive
starts to run out of space.&lt;/p&gt;

&lt;p&gt;It turns out it is possible to move your Flip videos to a new
drive. It's not simple, but here's how I did it.&lt;/p&gt;

&lt;p&gt;Note that I'm using FlipShare version 4.1.2 on Windows Vista. You can
&lt;a href=&quot;http://www.theflip.com/softwareupdate&quot;&gt;upgrade Flipshare
here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This requires a bit of hacking. If it doesn't work for you there's a
chance of data loss. Before doing any of this I recommend you backup
your Videos folder, especially the &quot;FlipShare Data&quot; subdirectory.&lt;/p&gt;

&lt;h4&gt;Moving your default &quot;Videos&quot; folder&lt;/h4&gt;

&lt;p&gt;FlipShare is hard-coded to store all of your videos in the default
&quot;Videos&quot; folder in Windows Vista. You can change the location of this
folder.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Close FlipShare if it's open.&lt;/li&gt;
&lt;li&gt;Right-click on your &quot;Videos&quot; folder in Windows (my original path was
&quot;C:\Users\Tom\Videos&quot;)&lt;/li&gt;
&lt;li&gt;Click &quot;Properties&quot;&lt;/li&gt;
&lt;li&gt;Click the &quot;Location&quot; tab&lt;/li&gt;
&lt;li&gt;Enter the full path of the new location (my new location was &quot;K:\Videos&quot;)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Vista will create the folder in the new location if it doesn't
exist. It will also ask you if you want to copy all the subdirectories
of the &quot;Videos&quot; folder to the new location. &lt;em&gt;You do&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;There's a more detailed description of &lt;a
href=&quot;http://www.mydigitallife.info/2007/11/25/move-or-change-vista-documents-pictures-music-videos-games-and-other-personal-folders-location/&quot;&gt;how
to change default folder paths in Vista here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I figured I was all done at this point. I'd launch the FlipShare
software, it would see the new path to the &quot;Videos&quot; folder, and I'd be
all set.&lt;/p&gt;

&lt;p&gt;But it didn't work out that way. The folders I had previously within
the FlipShare application showed up, and the video counts were
correct. But none of the thumbnails showed and I got strange error
messages when I tried to click on any of the videos.&lt;/p&gt;

&lt;p&gt;As it turns out, FlipShare uses an internal database to store the
paths to your videos. Even though it could now save videos to the new
location on my K: drive, it couldn't find any of my previous videos
because it's internal database was still pointing to the old
&quot;C:\Users\Tom\Videos&quot; location instead of the new &quot;K:\Videos&quot;
location.&lt;/p&gt;

&lt;p&gt;The good news is that FlipShare uses the &lt;a
href=&quot;http://www.sqlite.org/&quot;&gt;open-source SQLite database&lt;/a&gt; to store
all of it's data. That means it can be read (and updated), using a
SQLite database editor.&lt;/p&gt;

&lt;p&gt;I'm not that familiar with SQLite tools, but a quick Google search
yielded SQLite Admin. SQLite Admin is an Adobe Air app that makes it
easy to view and modify a SQLite database. &lt;a
href=&quot;http://www.softpedia.com/get/Internet/Servers/Database-Utils/SQLite-Admin.shtml&quot;&gt;Download
it here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Updating Your FlipShare Database&lt;/h4&gt;

&lt;p&gt;The FlipShare database is located in your &quot;Videos&quot; folder, in the
&quot;FlipShare Data&quot; subdirectory. In my case the new path to the database
file was &quot;K:\Videos\FlipShare Data\flipshare.db&quot;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;At this point I highly recommend backing up flipshare.db&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Close FlipShare if it's open&lt;/li&gt;
&lt;li&gt;Open SQLite Admin and open your &quot;flipshare.db&quot; database.&lt;/li&gt;
&lt;li&gt;In SQLite Admin, press the &quot;Open Query&quot; button.&lt;/li&gt;
&lt;li&gt;Enter the following query as a test to make sure things work the way you expect&lt;/li&gt;
&lt;/ol&gt;


&lt;pre&gt;
    &lt;code&gt;select replace (uri, &quot;[old Videos path]&quot;, 
        &quot;[new Videos path]&quot;) from MediaElementSource&lt;/code&gt;
&lt;/pre&gt;


&lt;p&gt;Replace the items in brackets with the values appropriate to your
system. After you've typed in the query, hit &quot;Execute Query&quot; to run
it.&lt;/p&gt;

&lt;p&gt;In my case the actual query was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select replace (uri, &quot;C:\Users\Tom\Videos&quot;,
    &quot;K:\Videos&quot;) from MediaElementSource
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You'll see output similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/flipshare-elements-query.png&quot;&gt;&lt;img src=&quot;/images/flipshare-elements-query-300x206.png&quot; alt=&quot;FlipShare Elements Query&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the paths in your results. Make sure that the paths
that are shown are the actual paths to files in your new location. You
can open up a Windows Explorer window to verify.&lt;/p&gt;

&lt;p&gt;Nothing has been modified yet. The query above was just a
sanity-check. To modify the paths, enter the following query (with
your data substituted for the brackets) and hit &quot;Execute Query&quot;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update MediaElementSource
    set uri=replace (uri, &quot;[old Videos path]&quot;, &quot;[new Videos path]&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In my case, the actual query was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update MediaElementSource
    set uri=replace (uri, &quot;C:\Users\Tom\Videos&quot;, &quot;K:\Videos&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You'll now see something like this in your SQLite Admin tool:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/flipshare-elements-update.png&quot;&gt;&lt;img src=&quot;/images/flipshare-elements-update-300x206.png&quot; alt=&quot;FlipShare Elements Update&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're almost there but not done yet. FlipShare also stores the paths
of your video thumbnails it it's database. If you don't update the
thumbnail paths to point to the new location, FlipShare will simply
crash when you try to open it.&lt;/p&gt;

&lt;p&gt;To update the video thumbnail paths we're going to proceed similar to
above. First enter this query and hit &quot;Execute Query&quot; to preview the
results of the update:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select replace(PreviewImagePath,
    &quot;[old Videos path]&quot;, &quot;[new Videos path]&quot;) from MediaElement
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In my case, the actual query was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select replace(PreviewImagePath,
    &quot;C:\Users\Tom\Videos&quot;, &quot;K:\Videos&quot;) from MediaElement
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here's what it looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/flipshare-preview-query1.png&quot;&gt;&lt;img src=&quot;/images/flipshare-preview-query1-300x198.png&quot; alt=&quot;FlipShare Preview Query&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again, check to make sure that the paths shown point to actual
locations in Windows.&lt;/p&gt;

&lt;p&gt;To go ahead and make the changes, enter this query and hit &quot;Execute
Query&quot;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update MediaElement set PreviewImagePath =
    replace(PreviewImagePath, &quot;[old Videos path]&quot;, &quot;[new Videos path]&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My query was:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update MediaElement set PreviewImagePath =
    replace(PreviewImagePath, &quot;C:\Users\Tom\Videos&quot;, &quot;K:\Videos&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here's what it looks like in SQLite Admin:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/flipshare-preivew-update.png&quot;&gt;&lt;img src=&quot;/images/flipshare-preivew-update-300x199.png&quot; alt=&quot;FlipShare Prview Update&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now close SQLite Admin. Open up FlipShare. All of your videos and
thumbnails should be intact, now referenced in their new
locations. New videos that you copy over from your Flip camcorder will
also be placed in the new location.&lt;/p&gt;

&lt;p&gt;Enjoy and keep making videos!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Pastebins</title>
   <summary>Pastebins are sites specialized for posting formatted code. A look at a few of the more popular ones.</summary>
   <link href="http://tomalison.com/167/pastebins/"/>
   <updated>2009-06-01T00:00:00-04:00</updated>
   <id>id:/167/pastebins</id>
   <content type="html">&lt;p&gt;I came across my first pastebin while following the &lt;a
href=&quot;http://www.nabble.com/SpamAssassin---Users-f195.html&quot;&gt;SpamAssassin
mailing list&lt;/a&gt;. Users of the SpamAssassin mailing list face an
interesting problem. They frequently need to share examples of spam
with one another in order to help debug SpamAssassin. But the
SpamAssassin mailing list is hosted on the same servers that run all
of Apache's mailing lists. Hence the SpamAssassin mailing list is
filtered by SpamAssassin itself.&lt;/p&gt;

&lt;p&gt;The consequences of this are logical, though ironic. If you want to
share the contents of a spam message with the SpamAssassin mailing
list, it will most likely get blocked by SpamAssassin. Doh!&lt;/p&gt;

&lt;p&gt;So what recourse does someone investigating a spam message have?
Answer: post the spam message to a web site, and send the link to the
posted message content to the mailing list.&lt;/p&gt;

&lt;p&gt;This is where a pastebin comes in. A pastebin is a web site that
allows you to publish a snippet of code, a server log, a spam message,
or any arbitrary piece of text. You can then share the link with
people so they can review it.&lt;/p&gt;

&lt;p&gt;The utility of a pastebin extends far beyond my SpamAssassin
example. They are frequently used by developers on IRC
channels. Pasting a 60 line code snippet into a chat window and
telling someone &quot;Hey look at line 32 for me&quot; does not work. Lines wrap
in weird ways, monospace fonts are not guaranteed, and line numbers
are not preserved.&lt;/p&gt;

&lt;p&gt;Similarly, if you want help with an HTML or Javascript issue, you'll
have a hard time pasting your code snippet directly into a web
site. Most sites, for security reasons, will strip some or all of the
HTML tags, and will almost certainly not let you paste Javascript that
might execute when it's rendered on the web page.&lt;/p&gt;

&lt;p&gt;Here's a list of a few of the pastebins out there and what they can
do:&lt;/p&gt;

&lt;h4&gt;&lt;a href=&quot;http://pastebin.com&quot;&gt;pastebin.com&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;This is one of the older pastebins and was the first one that I was
introduced to via the SpamAssassin mailing lists. It allows you to do
several cool things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose a syntax highlighting mode for your paste. You can also use a
shortcut to automatically select a syntax highlighting mode. If you
know you're going to paste some ruby code, go to &lt;a
href=&quot;http://ruby.pastebin.com&quot;&gt;ruby.pastebin.com&lt;/a&gt; and the ruby
syntax highlighting option will be set for you by default.&lt;/li&gt;
&lt;li&gt;Create a pastebin just for your community. For example, if you run a
software company called &quot;Flying Squirrel&quot;, setup
flyingsquirrel.pastebin.com for all your pastes. Note that these
subdomains are not password protected so they can be viewed by
anyone who guesses the URL.&lt;/li&gt;
&lt;li&gt;Highlight certain lines in your paste by prefixing them with '@@'.&lt;/li&gt;
&lt;li&gt;Choose the retention time for your paste: 1 day, 1 month, or
forever.&lt;/li&gt;
&lt;li&gt;Work collaboratively. For example, you can create a follow-up to
someone's paste. Your follow-up will be linked to the original, and
you can generate a diff.&lt;/li&gt;
&lt;li&gt;Pastebin.com provides it's &lt;a title=&quot;Gzipped source code for
Pastebin.com&quot; href=&quot;http://pastebin.com/pastebin.tar.gz&quot;&gt;source
code&lt;/a&gt; under the GPL&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Here's an example of a paste in pastebin. This is a snippet of Python
code that generates awful poetry. It's derived from an exercise in &lt;a
href=&quot;http://www.amazon.com/gp/product/0137129297?ie=UTF8&amp;amp;amp;tag=tomalisondotc-20&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&amp;amp;amp;creativeASIN=0137129297&quot;&gt;Programming
in Python 3&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://pastebin.com/f71708aec&quot;&gt;http://pastebin.com/f71708aec&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a follow-up to this paste where I added a comment line and
highlighted it:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://pastebin.com/f4feb6a1c&quot;&gt;http://pastebin.com/f4feb6a1c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pastebin provides a diff between the two pastes here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://pastebin.com/pastebin.php?diff=f4feb6a1c&quot;&gt;http://pastebin.com/pastebin.php?diff=f4feb6a1c&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a href=&quot;http://gist.github.com&quot;&gt;gist.github.com&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Github now provides a pastebin. They are called gists. There are a few
nice options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-language syntax highlighting. You can also specify a filename
and the language will be auto-detected based on the naming
convention.&lt;/li&gt;
&lt;li&gt;Support for private gists.&lt;/li&gt;
&lt;li&gt;Quick access to the raw version of the code snippet in a browser, so
you can copy code without line numbers in it.&lt;/li&gt;
&lt;li&gt;Git integration so you can clone or fork the gist.&lt;/li&gt;
&lt;li&gt;Embed support (the embed times out so I'm not going to demonstrate
it here).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Here's a sample gist: &lt;a
href=&quot;http://gist.github.com/120863&quot;&gt;http://gist.github.com/120863&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a href=&quot;http://snipt.org&quot;&gt;snipt.org&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;snipt.org has a lot of the features of the previously mentioned
pastebins, including syntax highlighting, embedding, access to the raw
text, and private snipts. It also offers a few unique options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ability to choose a color theme (with great names like &quot;Glitter
Bomb&quot; and &quot;Black Pearl&quot;)&lt;/li&gt;
&lt;li&gt;Short urls, with one-click options to post to Twitter or save to
del.icio.us or Google Bookmarks.&lt;/li&gt;
&lt;li&gt;A rating system for public snipts.&lt;/li&gt;
&lt;li&gt;Customization options for the snipt viewer such as increasing and
decreasing the font size as well as changing the theme.&lt;/li&gt;
&lt;li&gt;An option to turn off line-numbering.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Here's my awful poetry python script with the &quot;Glitter Bomb&quot; theme:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://snipt.org/kqj&quot;&gt;http://snipt.org/kqj&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a href=&quot;http://alexgorbatchev.com/wiki/SyntaxHighlighter&quot;&gt;SyntaxHighlighter&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;This is not a pastebin, but offers syntax highlighting and line
numbering of code snippets that you include on sites that you
host. It's written in Javascript and offers support for &lt;a
href=&quot;http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes&quot;&gt;multiple
syntaxes&lt;/a&gt;. As of version 2.0 it also provides &lt;a
href=&quot;http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes&quot;&gt;theming
support&lt;/a&gt; via CSS.&lt;/p&gt;

&lt;p&gt;There are &lt;a
href=&quot;http://alexgorbatchev.com/wiki/SyntaxHighlighter:Integration&quot;&gt;SyntaxHighlighter
plugins&lt;/a&gt; for popular content management systems like Wordpress,
Drupal and MediaWiki. I came across an example SyntaxHighlighter in a
great post on &lt;a
href=&quot;http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/&quot;&gt;human-readable
sorted du output&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There's a lot more pastebins out there. See the &lt;a
href=&quot;http://en.wikipedia.org/wiki/Pastebin&quot;&gt;Wikipedia entry on
pastebins&lt;/a&gt; for more detail. If you're thinking of starting your
own, pay attention to the &quot;&lt;a
href=&quot;http://en.wikipedia.org/wiki/Pastebin#Abuse_and_spam&quot;&gt;Abuse and
spam&lt;/a&gt;&quot; section on the Wikipedia page.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Weekly Links : May 29</title>
   <summary>Found this week: 'fail' is the new schadenfreude, malwebowent trolls, avoiding burnout, enjoying the silence, the paradox of cancer in whales.</summary>
   <link href="http://tomalison.com/149/weekly-links-may-29-09/"/>
   <updated>2009-05-29T00:00:00-04:00</updated>
   <id>id:/149/weekly-links-may-29-09</id>
   <content type="html">&lt;p&gt;Found this week: &quot;fail&quot; is the new &lt;em&gt;schadenfreude&lt;/em&gt;, malwebowent
trolls, avoiding burnout, enjoying the silence, the paradox of cancer
in whales.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.slate.com/id/2202262/pagenum/all/&quot;&gt;Why is everyone saying &quot;fail&quot; all of a sudden?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;Christopher Beam, slate.com&lt;/cite&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Why has &lt;em&gt;fail &lt;/em&gt;become so popular? It may simply be that people
are thrilled to finally have a way to express their schadenfreude out
loud. &lt;em&gt;Schadenfreude&lt;/em&gt;, after all, is what you feel when someone
else executes a fail. But the &lt;em&gt;fail&lt;/em&gt; meme also changes our
experience of schadenfreude.&lt;em&gt; &lt;/em&gt;What was once a quiet
pleasure-taking is now a publicand competitive sport.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://www.nytimes.com/2008/08/03/magazine/03trolls-t.html?_r=2&amp;amp;amp;ref=technology&quot;&gt;The Trolls Among Us&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;Mattathias Schwartz, nytimes.com&lt;/cite&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Two female Yale Law School students have filed a suit against
pseudonymous users who posted violent fantasies about them on
AutoAdmit, a college-admissions message board. In China, anonymous
nationalists are posting death threats against pro-Tibet activists,
along with their names and home addresses. Technology, apparently,
does more than harness the wisdom of the crowd. It can intensify its
hatred as well.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://www.alistapart.com/articles/burnout/&quot;&gt;Burnout&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;Scott Boms, alistapart.com&lt;/cite&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Ultimately, burnout results from a lack of equilibrium. When you lose
your balance, physically, you fall over. Burnout is very similar,
except that once you’re down, it can be a real challenge to get back
up.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://andrewsullivan.theatlantic.com/the_daily_dish/2009/05/in-praise-of-silence.html&quot;&gt;In Praise of Silence&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;Lane Wallace, theatlantic.com&lt;/cite&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;But what concerns me as much or more about incessant connection
through Twitter, texting, Facebook, Crackberrys, and yes, even 24/7
instant news ... is that all those technologies enhance an already bad
inclination humans (and especially Americans) have. And that is: an
overweening desire to be distracted from being alone in silence ... or
having to come to terms with whatever we might find there, if we
slowed down enough to let it catch us.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://icb.oxfordjournals.org/cgi/content/full/icm062v1&quot;&gt;Why
don't all whales have cancer?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;John Nagy et al., oxfordjournals.com&lt;/cite&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Larger organisms have more potentially carcinogenic cells, tend to
live longer and require more ontogenic cell divisions. Therefore,
intuitively one might expect cancer incidence to scale with body
size. Evidence from mammals, however, suggests that the cancer risk
does not correlate with body size. This observation defines &quot;Peto's
paradox.&quot; Here, we propose a novel hypothesis to resolve Peto's
paradox. We suggest that malignant tumors are disadvantaged in larger
hosts.&quot;&lt;/p&gt;&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>Infant Growth Charts in WolframAlpha</title>
   <summary>WolframAlpha is suprisingly useful...at displaying infant growth charts.</summary>
   <link href="http://tomalison.com/137/infant-growth-wolframalpha/"/>
   <updated>2009-05-24T00:00:00-04:00</updated>
   <id>id:/137/infant-growth-wolframalpha</id>
   <content type="html">&lt;p&gt;A bit over a month ago I was searching for infant growth charts
because I was concerned my daughter wasn't gaining weight
sufficiently. At our previous check-up our pediatrician told us she
had dropped 1 standard deviation on the &lt;a
href=&quot;http://www.cdc.gov/growthcharts/&quot;&gt;standard growth curves&lt;/a&gt;
since the last visit.&lt;/p&gt;

&lt;p&gt;It was nothing to be overly concerned about. Weight gain rates
fluctuate in the early months of an infant's life. Nonetheless, as a
new father I was anxious to see how well she was doing a few weeks
later when my wife had her weighed at a local group for new mothers.&lt;/p&gt;

&lt;p&gt;I used Google to search for growth charts. It returned a bunch of
interactive tools, many of which did not work well or were difficult
to interpret. The PDF files on the CDC site were useful, but
excruciating to find.&lt;/p&gt;

&lt;p&gt;Flash-forward several weeks later. My daughter's weight is doing fine;
our pediatrician had already verified that at our subsequent
visit. But I was fooling around with &lt;a
href=&quot;http://www.wolframalpha.com&quot;&gt;WolframAlpha&lt;/a&gt;, trying to find
some interesting data beyond &lt;a
href=&quot;http://www.wolframalpha.com/input/?i=Tom&quot;&gt;what percentage of the
population is named &quot;Tom&quot;&lt;/a&gt;. On a whim I typed in &quot;&lt;a
href=&quot;http://www.wolframalpha.com/input/?i=infant+growth&quot;&gt;infant
growth&lt;/a&gt;&quot; and found exactly what I had been looking for a month
back: a concise and easy-to-interpret answer to the question of what
percentile my daughter was in based on her age and weight according to
the standard growth curve.&lt;/p&gt;

&lt;p&gt;WolframAlpha defaulted the data to the set appropriate for a 12-month
old, but it was easy to change via a simple input box at the top of
the page. And while the small version of the growth plots were a bit
tricky to read, the distribution charts where nice and clear. The best
part was the accompanying data tables that showed the median weight,
as well as the range one and two standard deviations out.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/wa_growth.gif&quot;&gt;Infant Growth Distribution&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WolframAlpha has received a lot of flak for not being useful outside
of a small realm of users. A lot of that is justified - for now. When
used with the expectation of a conventional search engine, you're much
more likely to find irrelevant or no results than anything useful. But
if you want to ask a somewhat arcane, data-driven question - like &lt;a
href=&quot;http://www.wolframalpha.com/input/?i=seconds+since+august+15+1978&quot;&gt;how
many seconds old you are&lt;/a&gt; - WolframAlpha does produce results.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Books Worth Reading</title>
   <summary>'Managing Humans' by Rands and 'Rainbows End' by Vernor Vinge.</summary>
   <link href="http://tomalison.com/88/books-worth-reading/"/>
   <updated>2009-05-01T00:00:00-04:00</updated>
   <id>id:/88/books-worth-reading</id>
   <content type="html">&lt;p&gt;&lt;a
href=&quot;http://www.amazon.com/gp/product/159059844X?ie=UTF8&amp;amp;amp;tag=tomalisondotc-20&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&amp;amp;amp;creativeASIN=159059844X&quot;&gt;Managing
Humans: Biting and Humorous Tales of a Software Engineering
Manager&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The management section of software bookshelves typically has a bunch
of books explaining various methodologies like Agile and XP. They're
typically written by consultants and tend to be a little heavy on
process and dogma.&lt;/p&gt;

&lt;p&gt;&quot;Managing Humans&quot; is the total opposite. It's a humorous collection of
anecdotes about the people and personalities that inhabit the software
development world in both start-ups and larger corporations. And you
don't need to be a manager to enjoy it. For some samples, check out
some articles from the &lt;a href=&quot;http://www.randsinrepose.com&quot;&gt;author's
blog&lt;/a&gt;; &lt;a
href=&quot;http://www.randsinrepose.com/archives/2006/04/20/10.html&quot;&gt;1.0&lt;/a&gt;
and &lt;a
href=&quot;http://www.randsinrepose.com/archives/2007/11/11/the_nerd_handbook.html&quot;&gt;The
Nerd Handbook&lt;/a&gt; are both fun reads.&lt;/p&gt;

&lt;p&gt;&lt;a
href=&quot;http://www.amazon.com/gp/product/0812536363?ie=UTF8&amp;amp;amp;tag=tomalisondotc-20&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&amp;amp;amp;creativeASIN=0812536363&quot;&gt;Rainbows
End&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm not an erudite science fiction reader, but this &lt;a
href=&quot;http://www.thehugoawards.org/?page_id=127&quot;&gt;2007 Hugo Award&lt;/a&gt;
winner is excellent. It's author, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Vernor_Vinge&quot;&gt;Vernor Vinge&lt;/a&gt;,
helped define the notion of the &lt;a
href=&quot;http://www.hplusmagazine.com/articles/ai/singularity-101-vernor-vinge&quot;&gt;Singularity&lt;/a&gt;
and Rainbows End provides an entertaining look at what &lt;a
title=&quot;Kurzweil Documentary&quot;
href=&quot;http://singularityhub.com/2009/04/29/transcendent-man-wows-at-tribeca-film-festival-premier/&quot;&gt;that
slippery concept&lt;/a&gt; might look like twenty years from now.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Weekly Links : Apr 15</title>
   <summary>Some links of interest to startup junkies, developers, and introverts.</summary>
   <link href="http://tomalison.com/81/links-worth-reading-april15/"/>
   <updated>2009-04-15T00:00:00-04:00</updated>
   <id>id:/81/links-worth-reading-april15</id>
   <content type="html">&lt;p&gt;I'm tired of reading startup gossip, news about Twitter, and news
about companies that are building stuff on top of Twitter. So I had to
stop.&lt;/p&gt;

&lt;p&gt;I recently set my home page to &lt;a
href=&quot;http://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt;, which unearthed
some great content (new and old) and surprised me with refreshing &lt;a
href=&quot;http://ycombinator.com/newswelcome.html&quot;&gt;community
guidelines&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here are a couple of links recently featured on HN. These days I think
a lot about the challenges of startups, strategy shifts, and revenue
generation. Most of these links touch on those topics.&lt;/p&gt;

&lt;p&gt;&lt;a
href=&quot;http://startuplessonslearned.blogspot.com/2009/04/validated-learning-about-customers.html&quot;&gt;Validated
learning about customers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nice post on measuring success via what you learn about your customers
in each iteration. Also read Eric's post about &lt;a
href=&quot;http://startuplessonslearned.blogspot.com/2009/03/cash-is-not-king.html&quot;&gt;running
out of iterations&lt;/a&gt;. Assume you'll get a lot of things wrong before
you discover &lt;a
href=&quot;http://www.techcrunch.com/2009/03/19/flip-video-wrong-wrong-wrong-and-then-so-so-right/&quot;&gt;what's
right&lt;/a&gt;. Optimize your funding and spending to maximize your ability
to adapt and make major strategy shifts.&lt;/p&gt;

&lt;p&gt;&lt;a
href=&quot;http://www.joelonsoftware.com/articles/DevelopmentAbstraction.html&quot;&gt;The
Development Abstraction Layer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An insightful article by Joel Spolsky about why great developers often
start unsuccessful companies.&lt;/p&gt;

&lt;p&gt;&lt;a
href=&quot;http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-13-solving-the-problem.rc.html&quot;&gt;Solve
&lt;em&gt;the&lt;/em&gt; problem, not just a problem&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's easy to take a technology and build a bunch of stuff that might
be cool...someday. These guys did the opposite and focused only on
what they needed to solve their problem. They found a neat use of git
in the process.&lt;/p&gt;

&lt;p&gt;&lt;a
href=&quot;http://chuckwestbrook.com/getting-attention-is-a-stupid-business-plan/&quot;&gt;Getting
Attention Is a Stupid Business Plan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you view the number of people following your business on Twitter as
an important metric of success, then read this article. Multiple
times.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.theatlantic.com/doc/200303/rauch&quot;&gt;Caring for your
Introvert&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This has nothing to do with startups, but as an introvert I enjoyed
this a lot. Nicely distinguishes introversion from shyness and
misanthropy:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Leave an extrovert alone for two minutes and he will reach for his
cell phone. In contrast, after an hour or two of being socially 'on,'
we introverts need to turn off and recharge.&quot;&lt;/p&gt;&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>Enticing User Engagement via Achievement Indicators</title>
   <summary>A few sites that appeal to your ego in return for your engagement.</summary>
   <link href="http://tomalison.com/66/enticing-user-engagement-via-achievement-indicators/"/>
   <updated>2008-12-10T00:00:00-05:00</updated>
   <id>id:/66/enticing-user-engagement-via-achievement-indicators</id>
   <content type="html">&lt;p&gt;One of the best ways to make your site &quot;sticky&quot; is to encourage users
to use multiple features.&lt;/p&gt;

&lt;p&gt;Encouraging users to engage with more features increases the amount of
data they share with you. The more data they share with you, the more
you succeed in creating a &quot;&lt;a
href=&quot;http://en.wikipedia.org/wiki/Switching_costs&quot;&gt;switching
cost&lt;/a&gt;&quot; that serves as an impediment to abandoning your service for
one that may offer a similar set of features.&lt;/p&gt;

&lt;p&gt;The switching cost exists because in order to start using a site
offered by one of your competitors, your user now has to take the time
to set up their data on the new site, and often learn a new user
interface in the process. This is not something users are very likely
to do unless your competitor offers much more value.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.mint.com&quot;&gt;Mint&lt;/a&gt; and &lt;a
href=&quot;http://www.linkedin.com&quot;&gt;LinkedIn&lt;/a&gt; both do a good job of
enticing you to share more data with them. Mint asks &quot;How Minty are
you?&quot; and answers that question with a personalized score - the
highest being 100% - based on how much data about your financial life
you share with them. They do this via a simple user interface shown
below.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/mint.png&quot;&gt;&lt;img src=&quot;/images/mint.png&quot; alt=&quot;Mint&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn provides a similar user interface that gives you a score
depicting how &quot;complete&quot; your profile is. They encourage you to add
more data about yourself and solicit recommendations from others in
order to achieve a higher measure of &quot;completeness&quot;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/linkedin.png&quot;&gt;&lt;img src=&quot;/images/linkedin.png&quot; alt=&quot;Mint&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Both of these user interface devices are &quot;achievement indicators&quot; that
stimulate feature engagement by appealing to a user's ego. As a person
with a competitive, Type-A personality, I feel a sense of achievement
in seeing that progress bar climb toward 100%. It's not very rational,
but it is very real. In striving for this feeling of achievement, I
increase my commitment to the service by providing it with more
personal data.&lt;/p&gt;

&lt;p&gt;So do you want to get users to engage with more features on your site
and create a switching cost? Give them a user interface that appeals
to their ego by rewarding them with an incremental sense of
achievement for each piece of data they give you.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Five Holiday Gifts to Avoid In 2008</title>
   <summary>My anti-gift-giving guide for 2008.</summary>
   <link href="http://tomalison.com/54/five-holiday-gifts-to-avoid-i-2008/"/>
   <updated>2008-12-01T00:00:00-05:00</updated>
   <id>id:/54/five-holiday-gifts-to-avoid-i-2008</id>
   <content type="html">&lt;p&gt;There are a lot of gift guides out there to help you determine what to
buy this holiday season. The Ars Technica staff released their &lt;a
title=&quot;Ars Technica Holiday Gift Guide&quot;
href=&quot;http://arstechnica.com/guides/buyer/holiday-gift-guide-2008.ars&quot;&gt;holiday
gift guide&lt;/a&gt; last week, the New York Times offer their &lt;a
href=&quot;http://www.nytimes.com/ref/arts/2008holidaygiftguide.html&quot;&gt;Critics
Picks&lt;/a&gt; for the season, and Amazon.com will be &lt;a title=&quot;Amazon Gift
Guide&quot;
href=&quot;http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;amp;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fgift-central%3Fie%3DUTF8%26ref%255F%3Dtopnav%255Fstoretab%255Fcm%255Fgft&amp;amp;amp;tag=tomalisondotc-20&amp;amp;amp;linkCode=ur2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&quot;&gt;hawking
gifts of all types&lt;/a&gt; for the next three weeks.&lt;/p&gt;

&lt;p&gt;Suggestions abound about what to give. But what if you need some tips
on what gifts to avoid? Here are my top five holiday
gifts &lt;em&gt;not&lt;/em&gt; to give this year:&lt;/p&gt;

&lt;h4&gt;1) &quot;I Love Wall Street&quot; T-Shirt&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;/images/iluvwallst.jpg&quot;&gt;&lt;img src=&quot;/images/iluvwallst.jpg&quot; alt=&quot;I love Wall Street&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unless you're shopping for someone who likes &quot;ironic hipster&quot;
t-shirts, &lt;a
href=&quot;http://t-shirts.cafepress.com/item/i-love-wall-street-dark-tshirt/110919763&quot;&gt;this
one probably isn't a good idea&lt;/a&gt;. Your day-trading sister-in-law
might not have done so well this year, and even if she did wearing
this t-shirt in public might increase her chances of being physically
assaulted, particularly in a US auto manufacturing city like
Detroit. Put it on the shelf and hope the market does better next
year.&lt;/p&gt;

&lt;h4&gt;2) The ManGroomer Electric Back Hair Shaver&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;/images/mangroomer.jpg&quot;&gt;&lt;img src=&quot;/images/mangroomer.jpg&quot; alt=&quot;ManGroomer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Personal grooming kits, including ear and nose hair trimmers, have
become &lt;em&gt;de rigeur&lt;/em&gt; for the aging male who wants to keep things
neat and tidy. And they increasingly serve as fun stocking-stuffers
during the holidays.&lt;/p&gt;

&lt;p&gt;A &lt;a
href=&quot;http://www.bedbathandbeyond.com/product.asp?order_num=-1&amp;amp;amp;sku=14399593&amp;amp;amp;&quot;&gt;personal
back hair trimmer&lt;/a&gt;, however, might be a little harsh as a holiday
gift. While the utility of this item can not be questioned, its social
repercussions could be devastating.&lt;/p&gt;

&lt;p&gt;Surprising your gift recipient with his electric back hair trimmer in
front of family and friends may expose more about the extent of his
hirsuteness than anyone cared to know. And it will inevitably lead to
calls for a live, on-the-spot demonstration that puts your trimmer
recipient in a very awkward position.&lt;/p&gt;

&lt;p&gt;If a loved-one you know needs this, slip it under their pillow
discreetly and let them believe it was delivered by the back-hair
fairy instead of giving it to them in front of people enjoying egg nog
by the fire.&lt;br/&gt;
&lt;/p&gt;

&lt;h4&gt;3) A Cat Stroller&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;/images/catstroller.jpg&quot;&gt;&lt;img src=&quot;/images/catstroller.jpg&quot; alt=&quot;Cat Stroller&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't get me wrong, I love cats. I have two of my own and can share a
lot of weird stories about my adventures in feral cat rescue that stop
cocktail party conversations dead in their tracks.&lt;/p&gt;

&lt;p&gt;Let it be known that my affection for my cats does not imply I want to
parade them around town in a &lt;a
href=&quot;http://www.drsfostersmith.com/product/prod_display.cfm?c=3261+2053+16180&quot;&gt;cat
stroller&lt;/a&gt;. Aside from the cat going berzerk due to overstimulation,
&quot;crazy cat guy&quot; is a nickname that is incredibly difficult to shed.&lt;/p&gt;

&lt;h4&gt;4) A Snuggie Wearable Blanket&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;/images/snuggie.png&quot;&gt;&lt;img src=&quot;/images/snuggie.png&quot; alt=&quot;Snuggie&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nothing says &quot;I belong to a cult&quot; more than a &lt;a
href=&quot;https://www.getsnuggie.com/flare/next?tag=ED|SM|GO|GN|&quot;&gt;wearable
blanket&lt;/a&gt;. It's especially creepy when worn by multiple people in
the same room. Plus it comes with a free booklight, presumably so you
can read and re-read your favorite mantra over and over and over and
over and over...&lt;/p&gt;

&lt;p&gt;If you want to give someone a blanket, go old-school and knit them a
nice afghan like grandma used to do.&lt;/p&gt;

&lt;h4&gt;5) Motor oil themed shampoo&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;/images/oilshampoo.jpg&quot;&gt;&lt;img src=&quot;/images/oilshampoo.jpg&quot; alt=&quot;Motor oil shampoo&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to &lt;a href=&quot;http://www.roadking.com/&quot;&gt;RoadKing magazine&lt;/a&gt;,
this &lt;a
href=&quot;http://www.anythingsupermall.com/staticpages/index.php/Shampoo&quot;&gt;shampoo&lt;/a&gt;
comes in a &quot;one-quart motor oil jug&quot;, is &quot;maplewood and tobacco oil
scented and doubles as a body wash.&quot;&lt;/p&gt;

&lt;p&gt;Emphasizing the &quot;body wash&quot; aspect, anythingsupermall.com notes that
&quot;it can be used from the top of your head to the bottom of your
piston.&quot;&lt;/p&gt;

&lt;p&gt;I don't think I have anything else to say about that.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>iPhone Screen Grabs and Other Tricks</title>
   <summary>Stupid iPhone Tricks: taking a screenshot, controlling iTunes when your phone is locked, auto-scroll to top and more.</summary>
   <link href="http://tomalison.com/48/iphone-screen-grabs-and-other-tricks/"/>
   <updated>2008-11-25T00:00:00-05:00</updated>
   <id>id:/48/iphone-screen-grabs-and-other-tricks</id>
   <content type="html">&lt;p&gt;Here's 4 iPhone tricks that hardcore iPhone users probably know about
but they took me a little while to figure out:&lt;/p&gt;

&lt;h4&gt;Taking a Screen Grab of Your Current iPhone Screen&lt;/h4&gt;

&lt;p&gt;You may know how to take a screen grab (or &quot;screenshot&quot;) on your PC or
Mac, but did you know you can do it on your iPhone? I had no idea this
was possible until my friend Dave Cascino showed me at lunch one
day. Just simultaneously hit the round button at the bottom of the
iPhone and the small silver button at the top of the iPhone
simultaneously. You'll see the screen flash white for a second and
your screen grab will be available in the &quot;Photos&quot; section of your
phone.&lt;/p&gt;

&lt;p&gt;I wish I knew about this feature when creating instructions on how to
configure the iPhone to connect to Zenbe for our email users.&lt;/p&gt;

&lt;h4&gt;Controlling the iPod When Your Phone is Locked&lt;/h4&gt;

&lt;p&gt;Your iPhone probably locks itself after several minutes of not using
it and you need to use the &quot;slide to unlock&quot; feature to get to your
home screen. This is kind of annoying if you're listening to music and
want to pause or advance the track (and don't use headphones with iPod
controls built in).&lt;/p&gt;

&lt;p&gt;No problem. When the phone is locked, just double click the round
button at the bottom of the phone. A little menu will appear at the
top. It shows the current time, as well as controls for pausing,
playing, adjusting the volume, and moving forward or backward a
track. Here's a screen grab of what it looks like with an audiobook I
was just listening to (note I used the screen grab technique described
above to get this image):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/photo.jpg&quot; title=&quot;iPod controls When the phone is locked&quot;&gt;&lt;img src=&quot;/images/photo.jpg&quot; alt=&quot;iPod Controls When iPhone is Locked&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Jumping to the Top of the Screen in Safari&lt;/h4&gt;

&lt;p&gt;A lot of people know about this shortcut now, but I figured I'd throw
it in anyway. If you're browsing a long web page in Safari and are
close to the bottom of the screen, just tap on the menu bar (where the
time and battery indicator is displayed) and Safari will auto-scroll
back up to the top.&lt;/p&gt;

&lt;p&gt;Many other third-party applications that scroll now support this
feature so try it out.&lt;/p&gt;

&lt;h4&gt;Getting Back to Your Home Screen&lt;/h4&gt;

&lt;p&gt;If you're a hardcore iPhone user you may have several pages of
applications you've downloaded or bought. As of the 2.2 firmware
update, you can now click on the round button at the bottom of the
iPhone and you'll jump back to the very first page of applications.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The Jonestown Enigma</title>
   <summary>What happened at Jonestown is still confusing as hell 30 years later.</summary>
   <link href="http://tomalison.com/40/the-jonestown-enigma/"/>
   <updated>2008-11-22T00:00:00-05:00</updated>
   <id>id:/40/the-jonestown-enigma</id>
   <content type="html">&lt;p&gt;I picked up a PBS DVD about Jonestown and The People's Temple from the
library last week. I had no idea that November 18th marked the 30th
anniversary of the tragedy where over 900 people died. Though I knew
Jonestown was a notoriously significant event in the cultural history
of United States, I knew little of the details. It happened about 4
months after I was born.&lt;/p&gt;

&lt;p&gt;After watching the documentary I was surprised how little mention
there was of the 30th anniversary, although I later found some
articles on CNN's web site and by chance recorded a 2 hour television
special with Jonestown survivors interviewed Soledad O'Brien (which I
haven't watched yet).&lt;/p&gt;

&lt;p&gt;Most of the dead associated with Jonestown People's Temple members
lead by Jim Jones into what he termed &quot;revolutionary suicide.&quot; Other
deaths included journalists and California Congressmen Leo Ryan, who
were murdered after visiting the People's Temple compound in Guyana to
investigate and subsequently help a few defectors escape the
compound. Ironically, Congressman Ryan considered Jonestown &quot;a
beautiful place&quot; despite the fact that several members implored his
help to escape. This video footage of his visit underscores the enigma
of the entire situation.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Jonestown&quot;&gt;According to
Wikipedia&lt;/a&gt;, the &quot;events in Jonestown constituted the greatest
single losses of American civilian life in a non-natural disaster
until the events of September 11th.&quot;&lt;/p&gt;

&lt;p&gt;The deaths at Jonestown are commonly referred to as the &quot;Jonestown
Massacre&quot;, which I think is more appropriate than labeling it a mass
suicide, although the semantics are admittedly complex given the
opaqueness of the details. While most members &quot;voluntarily&quot; ingested
the cyanide-infused concoction that lead to their demise, they were
surrounded by armed security guards prior to doing so. Most
disturbingly, the PBS documentary replays audio of the initiation of
the mass deaths that features Jones hysterically encouraging the
adults to begin by poisoning their own children.&lt;/p&gt;

&lt;p&gt;The phrase &lt;a
href=&quot;http://en.wikipedia.org/wiki/Kool-Aid#.22Drinking_the_Kool-Aid.22&quot;&gt;&quot;Drinking
the Kool-Aid&quot;&lt;/a&gt; is derived from incidents at Jonestown in reference
to one of the ingredients of the poison concoction, though the
Kool-Aid brand itself was likely not involved. I used to find that
phrase somewhat amusing when it was used flippantly in business
meetings or other contexts, but now it's just disturbing.&lt;/p&gt;

&lt;p&gt;For anyone not familiar with the rise and fall of Jim Jones and the
People's Temple, I highly recommend checking out the DVD below. It's
highly fascinating and profoundly sad, but it's also a uniquely
compelling narrative in that it relies on former members of the
People's Temple and Jonestown survivors to tell the story of what
happened.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Buyer's Remorse? Maybe not...</title>
   <summary>Rationalizing buyer's remorse in a housing slump.</summary>
   <link href="http://tomalison.com/33/buyers-remorse-maybe-not/"/>
   <updated>2008-11-21T00:00:00-05:00</updated>
   <id>id:/33/buyers-remorse-maybe-not</id>
   <content type="html">&lt;blockquote&gt;&lt;p&gt;&quot;The gallows humor of this time was brought home to me by a reader who
told me he no longer felt badly about having stopped renting and
instead buying a home in 2006. Sure the house has lost value, he said,
but if he had not bought it, he would have left his money in the stock
market and be even worse off now.&quot;&lt;/p&gt;

&lt;p&gt;Floyd Norris in the &lt;a
href=&quot;http://www.nytimes.com/2008/11/21/business/economy/21norris.html?hp=&amp;amp;amp;adxnnl=1&amp;amp;amp;adxnnlx=1227269409-0FT9soDFsdw2CCgSW3FpVA&quot;&gt;New
York Times&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Last night I was reviewing a few of the decisions I've made over the
past two years in light of the latest bad economic news. Within that
time I bought a condo in the NYC metro area and left a job at a
successful hedge fund to co-found a start-up. My wife and I are also
about to have a baby, which puts me in a much more contemplative mood
than usual.&lt;/p&gt;

&lt;p&gt;Over two years ago I remember our mortgage broker saying to my wife
and I, &quot;Wow, you guys are being really conservative. You could qualify
for a much larger mortgage.&quot; I don't think he was trying to up-sell us
- we were already working with him on closing on the condo we had
chosen. He was surprised we didn't want to buy a bigger place, but
commended us on what I suppose he considered financial prudence. I was
shocked because I was looking at what I thought were pretty big
numbers on the papers he was preparing for us.&lt;/p&gt;

&lt;p&gt;At the time I was still working at the hedge fund and my wife had a
job as a Quality Assurance manager at a web site in New York. I didn't
have a good feeling about the housing market - in fact just a few
months earlier I had made some slightly profitable trades in the stock
market on the expectation that home builders were going see lower
earnings.&lt;/p&gt;

&lt;p&gt;But, a lot of our friends were buying homes and my wife and I were
fortunate to have profited a little from employee stock options we
converted and sold after leaving the company we used to work at
together. That money was sitting in the stock market. I remember my
accountant encouraged me to look at buying a home from the perspective
of re-allocating of some of our investments. Take some money out of
the stock market and put it into your own home. Your home is an asset,
it's value will likely increase, you'll build equity and diversify
your investments.&lt;/p&gt;

&lt;p&gt;My wife and I knew we would be in our home for at least 5 years,
hopefully enough time to ride out a likely dip in the housing
market. We calculated what our monthly payment would be given our
likely mortgage payment, taxes, and maintenance fees. We found a place
we liked, obtained a 30 year fixed-rate mortgage and wrote the biggest
checks of our lives at our closing.&lt;/p&gt;

&lt;p&gt;The monthly mortgage payment and related expenses ended up being about
twice what we were paying in monthly rent at our previous place. That
felt like a steep increase, but we still had a good cushion given our
monthly income. It's a good thing too. A few months later my wife quit
her job and took a steep pay cut to start her own local business. A
few months after that I quit my job and took a steep pay cut to
co-found a start-up.&lt;/p&gt;

&lt;p&gt;So last night I found myself thinking &quot;I wish we hadn't bought that
condo. We'd have so much more cash on hand to face what might be
coming down the road with the economy.&quot; But when I woke up this
morning and read the quote at the beginning of this blog post I
thought a little differently.&lt;/p&gt;

&lt;p&gt;The money that we invested in our home in 2006 had not been cash
stuffed between the springs of our mattress. It was in the stock
market. And since we moved that money out of the stock market and into
our home, the S&amp;amp;P has fallen 42%, the Nasdaq 44%, and the Dow
33%. My guess, based on recent home sales, is that the value of our
home has fallen about 8%.&lt;/p&gt;

&lt;p&gt;Given those numbers, taking money out of the stock market and putting
it into a home over the last two years was not a terrible move (unless
you need immediate liquidity in which case selling your home is a
little harder than selling your stocks). Though I anticipated the
housing bubble would eventually burst (as everyone had been predicting
for at least a year in 2006) and our home value might go down a
little, I certainly did not anticipate the enormity of the credit
crisis and the intense impact it would have on the stock market.&lt;/p&gt;

&lt;p&gt;As for changing careers, that didn't turn out so bad either. A few
weeks after my wife quit her job the company laid off two-thirds of
their employees. As for me, the hedge fund I worked at is still in
business and presumably doing well (assuming they are benefiting from
the current volatility).&lt;/p&gt;

&lt;p&gt;So financially I still can't say changing careers was a good choice,
but it wasn't a financially motivated decision. When you leave an
established company to do the start-up thing, it's about the
experience more than the compensation. And the experience has been
extremely good, regardless of what happens to the start-up.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>