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

<channel>
	<title>the Little Projects of Shawn M. Jones</title>
	<atom:link href="http://www.littleprojects.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.littleprojects.org/blog</link>
	<description>the life and times of a man in 21st Century America</description>
	<lastBuildDate>Sun, 18 Dec 2011 15:23:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Music Question:  Apple or Amazon?</title>
		<link>http://www.littleprojects.org/blog/2011/11/26/music-question-apple-or-amazon/</link>
		<comments>http://www.littleprojects.org/blog/2011/11/26/music-question-apple-or-amazon/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 17:58:44 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=288</guid>
		<description><![CDATA[I&#8217;m in. By in, I mean I have the MacBook Pro (it&#8217;s got Unix!), the iPad, the iPod, the iPhone, and the MacMini Server. For documents I still use Microsoft Office like the majority of the rest of the world, but for personal documents increasingly I&#8217;m using iWork because of some of nifty features, like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in.  By in, I mean I have the <a href="http://www.apple.com/macbookpro/">MacBook Pro</a> (it&#8217;s got Unix!), the <a href="http://www.apple.com/ipad/">iPad</a>, the <a href="http://www.apple.com/ipod/">iPod</a>, the <a href="http://www.apple.com/iphone/">iPhone</a>, and the <a href="http://www.apple.com/macmini/server/">MacMini Server</a>.  For documents I still use Microsoft Office like the majority of the rest of the world, but for personal documents increasingly I&#8217;m using iWork because of some of nifty features, like autosaving and <a href="http://www.apple.com/icloud/">iCloud</a>.</p>
<p>So, now I want to buy <a href="http://www.amazon.com/Greatest-Hits-So-Far-Explicit-Video/dp/B004BCNVOA">P!nk&#8217;s Greatest Hits&#8230;So Far!!!</a>.  Usually, I purchase my music at <a href="http://www.amazon.com/MP3-Music-Download/b/ref=sa_menu_mp3_str1?ie=UTF8&#038;node=163856011">Amazon&#8217;s MP3 store</a>, or, if I&#8217;m really feeling nostalgic, <a href="http://www.secondspin.com/">Second Spin</a>; but <a href="http://www.apple.com/icloud/">iCloud</a> presents me with a new opportunity:  the idea that if I just buy my music with iTunes I will have access to it wherever I am.</p>
<p>My first concern is space.  You see, I&#8217;ve ripped about half of my CDs so far and I&#8217;m taking up 22GB of space on my iPod with music.  As time goes on, I&#8217;ll probably reach 45GB in CD music alone.  I&#8217;m in no danger of hitting my upper limit today, or next year even.  My iOS devices (iPod, iPhone, iPad) all have 64 GB of space.  I don&#8217;t put music on the iPad, preferring to use that device for movies and books, so the space taken up by the different forms of media shouldn&#8217;t interfere with one another.</p>
<p>I don&#8217;t have a lot of music with <a href="http://www.apple.com/itunes/">iTunes</a>.  I bought one album because it was only available there.  If I continue to buy MP3s via Amazon, then I will continue to take up more and more space on my iOS devices.</p>
<p>I&#8217;m not sure where <a href="http://en.wikipedia.org/wiki/Moore's_law">Moore&#8217;s Law</a> will taper off in terms of more and more storage being available in these consumer devices.  I doubt this trend will continue for consumer devices because more and more people are moving their storage to the cloud.  My theory is that this will lead to fewer folks buying hard drives (whether they be magnetic or flash, it doesn&#8217;t matter), thus driving the demand down and the price back up again.  With the price up, <a href="http://www.apple.com/">Apple</a> (or <a href="http://www.amazon.com/">Amazon</a>, or <a href="http://www.samsung.com/">Samsung</a>, or whoever makes your portable music device) will not put as much storage into your portable device.  This means that I will hit an upper limit on how many MP3s I can put onto my iOS device in the future.  Apple wants me to use <a href="http://www.apple.com/icloud/">iCloud</a> instead, because they see this future coming.  More importantly, they are helping that future come.</p>
<p>So, the question is, do I continue to use <a href="http://www.amazon.com/MP3-Music-Download/b/ref=sa_menu_mp3_str1?ie=UTF8&#038;node=163856011">Amazon&#8217;s MP3 store</a> and manually move songs onto and off of my iOS device in the future, or do I just bite the bullet now and move to <a href="http://www.apple.com/itunes/">iTunes</a> altogether?  iTunes has the largest collection of music out there and I can always store a <i>few</i> MP3s for those artists and labels that I have to buy on Amazon.</p>
<p>Then there is an issue with preservation.  The music on iTunes is (as most of you know) not stored in the <a href="http://en.wikipedia.org/wiki/MP3">MP3 format</a>, but <a href="http://en.wikipedia.org/wiki/Advanced_Audio_Coding">AAC</a> (with various file extensions).  <a href="http://news.bbc.co.uk/2/hi/technology/7813527.stm">As of 2009, it is supposedly DRM free</a>.  I opened one of my iTunes songs in VLC player, and it played fine, without asking me for a password like the <i>DRM-full</i> songs do.  If this is the case, and AAC players are available in the future, then my concerns about preservation may be unfounded, as I will always be able to play the songs I&#8217;ve purchased.</p>
<p>iTunes is big, and with that many customers, I wouldn&#8217;t be surprised if AAC stayed around for a long time, so there should be no issue with finding an AAC player if iTunes goes away.</p>
<p>To recap:</p>
<table>
<tr>
<td></td>
<td><b>Amazon MP3 Store</b></td>
<td><b>Apple&#8217;s iTunes</b></td>
</tr>
<tr>
<td><b>storage space issues</b></td>
<td>will require more and more storage on my iOS devices</td>
<td>handled by iCloud</td>
</tr>
<tr>
<td><b>preservation capability</b></td>
<td>MP3s are playable on many, many devices</td>
<td>AACs are no longer encumbered by DRM and are playable by a lot of open source software, meaning conversions are possible</td>
</tr>
</table>
<p>So, there really is no reason I can&#8217;t just jump on the <a href="http://www.apple.com/itunes/">iTunes</a> bandwagon and enjoy the benefits of <a href="http://www.apple.com/icloud/">iCloud</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/11/26/music-question-apple-or-amazon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using launchd to run scheduled jobs</title>
		<link>http://www.littleprojects.org/blog/2011/08/29/using-launchd-to-run-scheduled-jobs/</link>
		<comments>http://www.littleprojects.org/blog/2011/08/29/using-launchd-to-run-scheduled-jobs/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 19:25:22 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[linux/unix]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=264</guid>
		<description><![CDATA[My new server&#8217;s predecessor ran Linux. I had a few scheduled jobs, like the ones that back up this blog, its database, and so on. On Linux the tool used for scheduling jobs is cron. Lo and behold, Apple has deprecated cron on their systems in lieu of an Apple-grown tool named launched. Launchd&#8217;s job [...]]]></description>
			<content:encoded><![CDATA[<p>My new server&#8217;s predecessor ran Linux.  I had a few scheduled jobs, like the ones that back up this blog, its database, and so on.  On Linux the tool used for scheduling jobs is cron.  Lo and behold, Apple has deprecated cron on their systems in lieu of an Apple-grown tool named launched.  Launchd&#8217;s job is to replace cron, init, the rc scripts, the file alteration monitor, and a whole host of other normal Unix utilities in favor of one huge behemoth process that starts at boot.  I&#8217;ve got mixed feelings about this concept, as it goes against the Unix philosophy of &#8220;doing one thing and doing it well&#8221;, but I chose OSX and have tried to learn their way of doing things.</p>
<p>I found several articles describing how one creates the plist files used by launchd.  These XML files contain the information on the process you wish to run, including when to run it, how to run it, and who is allowed to run it.  Here I will detail how I used it to merely run a scheduled job every night at midnight.</p>
<p>To start with, I have a simple script that backs up the database on the server:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="co0">#!/bin/sh</span>
&nbsp;
<span class="re2">BACKUPDIR</span>=<span class="re1">$HOME</span><span class="sy0">/</span>Backups<span class="sy0">/</span>lawrence.littleprojects.org<span class="sy0">/</span>db
<span class="re2">REMHOST</span>=lawrence.littleprojects.org
<span class="re2">OUTPUTFILE</span>=<span class="re1">$REMHOST</span>.sql
&nbsp;
<span class="co0"># if we don't have a backup directory, make it</span>
<span class="kw1">if</span> <span class="br0">&#91;</span> <span class="sy0">!</span> <span class="re5">-e</span> <span class="re1">$BACKUPDIR</span> <span class="br0">&#93;</span>; <span class="kw1">then</span>
  <span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="re1">$BACKUPDIR</span>
<span class="kw1">fi</span>
&nbsp;
<span class="kw3">cd</span> <span class="re1">$BACKUPDIR</span>
&nbsp;
<span class="co0"># run the remote database dump command</span>
<span class="kw2">ssh</span> <span class="re1">$REMHOST</span> <span class="st0">&quot;mysqldump --verbose --user=root --password='XXXXXXXXXXXX' --all-databases&quot;</span> <span class="sy0">&gt;</span> <span class="re1">$OUTPUTFILE</span>
&nbsp;
<span class="co0"># if the zipped output file already exists, move it before zipping the new one</span>
<span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re5">-f</span> <span class="re1">$OUTPUTFILE</span>.bz2 <span class="br0">&#93;</span>; <span class="kw1">then</span>
  <span class="kw2">mv</span> <span class="re1">$OUTPUTFILE</span>.bz2 old-<span class="re1">$OUTPUTFILE</span>.bz2
<span class="kw1">fi</span>
<span class="kw2">bzip2</span> <span class="re1">$OUTPUTFILE</span>
&nbsp;
<span class="kw2">chown</span> smj:staff <span class="re1">$OUTPUTFILE</span>.bz2</pre></div></div></div></div></div></div></div>


<p>This script is creatively entitled <code>backup-database</code>.  I want it to run every night so I have an exact copy of this website&#8217;s database in case the web server goes down and I have to reinstall everything.</p>
<p>Under cron, I would run <code>crontab -e</code> and then put the following line into the editor that is brought up:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="cron"><pre class="de1">0 * * * *    $HOME/bin/backup-database</pre></div></div></div></div></div></div></div>


<p>Apple made this simple step a lot more complicated than, in my opinion, it needed to be; but they gave me a tool that is a lot more powerful that mere cron.</p>
<p>To use launchd, I needed to make a file in the directory <code>/Library/LaunchDaemons</code> named <code>org.littleprojects.backup.lawrence.db.plist</code> that contains the following XML code:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc0">&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;</span>
<span class="sc3"><span class="re1">&lt;plist</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;dict<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;key<span class="re2">&gt;</span></span></span>Label<span class="sc3"><span class="re1">&lt;/key<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;string<span class="re2">&gt;</span></span></span>org.littleprojects.backup.lawrence.db<span class="sc3"><span class="re1">&lt;/string<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;key<span class="re2">&gt;</span></span></span>ProgramArguments<span class="sc3"><span class="re1">&lt;/key<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;array<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;string<span class="re2">&gt;</span></span></span>/Users/smj/bin/backup-database<span class="sc3"><span class="re1">&lt;/string<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/array<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;key<span class="re2">&gt;</span></span></span>StartCalendarInterval<span class="sc3"><span class="re1">&lt;/key<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;dict<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;key<span class="re2">&gt;</span></span></span>Hour<span class="sc3"><span class="re1">&lt;/key<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;integer<span class="re2">&gt;</span></span></span>0<span class="sc3"><span class="re1">&lt;/integer<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;key<span class="re2">&gt;</span></span></span>Minute<span class="sc3"><span class="re1">&lt;/key<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;integer<span class="re2">&gt;</span></span></span>0<span class="sc3"><span class="re1">&lt;/integer<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/dict<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/dict<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/plist<span class="re2">&gt;</span></span></span></pre></div></div></div></div></div></div></div>


<p>I&#8217;m a little annoyed at how Apple handled the whole key-value syntax, but I&#8217;ll let that be.  The file reads as follows:  create a job named <code>org.littleprojects.backup.lawrence.db</code> that will run the program <code>/Users/smj/bin/backup-database</code> at the 0th hour and 0th minute of ever day (midnight).  I&#8217;m not sure if this is any less difficult to read than the cron syntax, but it is more difficult to write to be sure.</p>
<p>Once I created the file, I then needed to load it into launchd, which could be done by running the following commands:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="kw2">sudo</span> launchctl load org.littleprojects.backup.lawrence.db.plist</pre></div></div></div></div></div></div></div>


<p>If you do this you, <strong>do not need to reboot</strong> as others claim.  <strong><i>This is Unix</i></strong> and reboots should only be necessary for major operating system changes.  Rebooting in order to create a scheduled job is not only ridiculous, but time-wasting and leads to error-prone behavior like making many untested scheduled jobs at once in order to save on reboots.  <strong>I always try to find a way around reboots to avoid error-prone behaviors!</strong></p>
<p>So, I did the same thing for other scripts I wanted to run at certain times.  I understand why apple decided to use launchd, I just wish they would have made it easier to configure.  <a href="http://itunes.apple.com/us/app/lingon/id411211026?mt=12&#038;ls=1">Lingon</a> exists in the app store for the express purpose of helping you create these plist XML files, but it will not load them for you and instead recommends you reboot after each edit, which I noted my distaste for above.</p>
<p>In the future I will be exploring how to best use launchd for other purposes, like restarting services, and scheduling scripts to run when other system events occur.  </p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://macdevcenter.com/pub/a/mac/2005/11/15/terminal5.html?page=5">http://macdevcenter.com/pub/a/mac/2005/11/15/terminal5.html?page=5</a></li>
<li><a href="http://www.activecollab.com/forums/topic/4342/">http://www.activecollab.com/forums/topic/4342/</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.conf.5.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.conf.5.html</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/launchctl.1.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/launchctl.1.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/08/29/using-launchd-to-run-scheduled-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomly crashing Mac Mini Server running Lion [Solution]</title>
		<link>http://www.littleprojects.org/blog/2011/08/18/randomly-crashing-mac-mini-server-running-lion-solution/</link>
		<comments>http://www.littleprojects.org/blog/2011/08/18/randomly-crashing-mac-mini-server-running-lion-solution/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 00:08:24 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=253</guid>
		<description><![CDATA[I&#8217;d been looking for a home server solution that offered me more disk space, but that ran cool and quieter than my server-closet behemoth. I wanted the server to also be able to execute scripts and scheduled jobs. I researched several options, including the Dell Zino, but none seemed to capture my attention like the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d been looking for a home server solution that offered me more disk space, but that ran cool and quieter than my server-closet behemoth.  I wanted the server to also be able to execute scripts and scheduled jobs.  I researched several options, including the Dell Zino, but none seemed to capture my attention like the Mac Mini Server.</p>
<p>The day it arrived, I set it up and spent hours pouring over Apple&#8217;s documentation.  I got file sharing, SSH, WebDAV, and other services set up easily, but realized that I had to download <a href="http://support.apple.com/kb/DL1419">Server Admin Tools</a> separately in order to get access to DHCP and DNS.  Some admins speculate that this is a separate download to prevent would be admins from accidentally turning on DHCP in a network that already had it.  Screen sharing worked flawlessly.  I had it using my 46&#8243; television as a monitor, so watching online video and iTunes was awesome!</p>
<p>The next day I went back to my new toy, and&#8230;  it had locked up.  I was not pleased.  Murmuring curses and threats of sending the server back didn&#8217;t bring the server back from its limbo. <strong>This was UNIX!  UNIX was not supposed to do this!</strong>  I felt betrayed by a company I&#8217;ve been growing in support for.  Why did they do this to me?</p>
<p>I think I&#8217;ve solved the problem.  Nothing useful was in the logs, but I came across a forum post where someone had suggested that there were bugs [<a href="http://arstechnica.com/apple/news/2011/08/buggy-nvidia-drivers-giving-2010-macbook-pro-owners-lion-upgrade-headaches.ars">1</a>][<a href="http://reviews.cnet.com/8301-13727_7-20083947-263/some-lion-users-plagued-by-black-screen-bug/">2</a>] in Lion&#8217;s display drivers that caused some Macs to lock up when returning from sleep.</p>
<p>I went into System Preferences, then chose Energy Saver.  I slid the slider next to Display Sleep all the way to the right, choosing Never.  I have not had a lockup since.</p>
<p>I can&#8217;t recommend this for everyone, because they don&#8217;t have a display that is either off, or using another input, like my TV, but it might work in a pinch if you don&#8217;t mind manually turning your display off.  Also, I&#8217;m a little surprised that it&#8217;s affecting my brand new Mac Mini Server, because the articles I&#8217;ve found refer to older Macs.</p>
<p><strong>Update:</strong>  This may have been fixed by the <a href="http://support.apple.com/kb/HT4764">10.7.1 patch</a>.  I haven&#8217;t tested it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/08/18/randomly-crashing-mac-mini-server-running-lion-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review: Safari 2 Go (for iPad)</title>
		<link>http://www.littleprojects.org/blog/2011/05/15/review-safari-2-go-for-ipad/</link>
		<comments>http://www.littleprojects.org/blog/2011/05/15/review-safari-2-go-for-ipad/#comments</comments>
		<pubDate>Sun, 15 May 2011 12:24:06 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=248</guid>
		<description><![CDATA[A friend excitedly told me about Safari 2 Go (S2G) for iPad.  It wasn't as great as I'd hoped.]]></description>
			<content:encoded><![CDATA[<p>A friend excitedly told me about Safari 2 Go (S2G) for iPad.  Having an interest in the technical books Safari offers, I chose to try and download a book right then and there, on 3G.  S2G refuses to let you log in at all, unless you have wifi.</p>
<p>Later, on my wifi network, I started the download of a book.  It took 10 minutes.  I&#8217;ve noticed that books in the Amazon Kindle app and iBooks generally take about 5 minutes to download, over 3G.  I was quite disappointed with the Safari download speed.</p>
<p>Also, the first attempt was unsuccessful, for the iPad&#8217;s desire to sleep during inactivity had forced me to &#8220;babysit&#8221; the iPad, occasionally touching it to ensure that S2G didn&#8217;t terminate the download.  Other iPad apps are able to override this inactivity setting so they can finish their downloads without issue, even finishing the download while the user is running other apps (you know, that whole multitasking thing that&#8217;s sweeping the nation).</p>
<p>Once I did get the book to download, the resulting product wasn&#8217;t fully available.</p>
<p>Some of the pages in the resulting book vanish when you try to read them.  They&#8217;re quite the tease.  It might be related to a watermark that vanishes after a picture is loaded.  If you do a quick print screen you might be able to capture the missing page.  <img src='http://www.littleprojects.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>All in all, it&#8217;s not a pleasant experience.</p>
<p>The Safari web site works fine, but I was looking forward to the offline storage for when I didn&#8217;t have or want to use an internet connection.</p>
<p>At the moment S2G sucks.  What the hell were they thinking releasing it like this?</p>
<p>Update (2011/06/08):  The updates haven&#8217;t helped, crashing often and appearing to fix none of these issues.  In fact, the latest version doesn&#8217;t even load, presenting the user with a black screen and no functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/05/15/review-safari-2-go-for-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rebirth of a web site</title>
		<link>http://www.littleprojects.org/blog/2011/02/21/rebirth-of-a-web-site/</link>
		<comments>http://www.littleprojects.org/blog/2011/02/21/rebirth-of-a-web-site/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 04:21:48 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[web site]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=233</guid>
		<description><![CDATA[I just spent time giving birth to an Old Dominion University Computer Science web site at http://www.cs.odu.edu/~sjone.  It&#8217;s just one page now, with some course information, and some links back to this site.  I know, not very interesting.  Under the covers, though, is a testbed for the Semantic Web.  So far, I&#8217;ve got Dublin Core [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent time giving birth to an Old Dominion University Computer Science web site at <a title="Old Dominion University - Shawn M. Jones" href="http://www.cs.odu.edu/~sjone">http://www.cs.odu.edu/~sjone</a>.  It&#8217;s just one page now, with some course information, and some links back to this site.  I know, not very interesting.  Under the covers, though, is a testbed for the Semantic Web.  So far, I&#8217;ve got Dublin Core and Friend of a Friend (FOAF) implemented for that one page.  In the future, I intend to bring the lessons learned there over to this site.  Eventually, the two will begin to look more alike in both style and function.</p>
<p>Perhaps Web Science and Digital Libraries is really my thing.  I spend an awful lot of time blogging about my own web sites.</p>
<h3>Validation of the Creative Commons Markup</h3>
<p>I also discovered that the <a title="Creative Commons License" href="http://creativecommons.org/choose/">Creative Commons license</a> markup wouldn&#8217;t validate with the <a title="W3C Validation Service" href="http://validator.w3.org/">W3C validator</a>.   This was because my page was initially specified as XHTML, but the  Creative Commons license link contains additional RDF metadata used by  search engines and other software.  A blog post suggested just removing  the metadata, but I didn&#8217;t want to do that because I knew that metadata  had been placed there by Creative Commons for a reason.  That metadata  is part of the <a title="RDFa Primer" href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa</a> standard, which is a way of embedding metadata into <em>normal</em> HTML and XHMTL.</p>
<p>It turns out that once you put that Creative Commons markup into your  XHTML, it becomes XHTML + RDFa, which is a completely different  document type.  I felt good that I&#8217;d figured this out, and changed <a title="Old Dominion University - Shawn M. Jones" href="http://www.cs.odu.edu/%7Esjone">the page</a> to use this instead.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="html"><pre class="de1">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML+RDFa 1.0//EN&quot; &quot;http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd&quot;&gt;</pre></div></div></div></div></div></div></div>


<p>Now it <a title="W3C Validation of Old Dominion University - Shawn M. Jones" href="http://validator.w3.org/check?uri=http://www.cs.odu.edu/%7Esjone">validates fine</a> as XHTML + RDFa.</p>
<h3>Nifty floating image trick</h3>
<p>You may wonder how I got the image to stay on the left and in the same spot, even though the visitor can scroll the page.  It is based on the following CSS, shamelessly stolen from the W3C themselves.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="css"><pre class="de1">body <span class="br0">&#123;</span>
    <span class="kw1">background-image</span><span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span>http<span class="sy0">:</span>//www<span class="re1">.cs</span><span class="re1">.odu</span>.edu/~sjone/images/oducs-lpx.png<span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">background-repeat</span><span class="sy0">:</span> <span class="kw2">no-repeat</span><span class="sy0">;</span>
    <span class="kw1">background-position</span><span class="sy0">:</span> <span class="kw1">top</span> <span class="kw1">left</span><span class="sy0">;</span>
    <span class="kw1">background-attachment</span><span class="sy0">:</span> <span class="kw2">fixed</span><span class="sy0">;</span>
   <span class="coMULTI">/* more CSS here */</span>
<span class="br0">&#125;</span></pre></div></div></div></div></div></div></div>


<p>That&#8217;s it.  It&#8217;s quite elegant, and I spent more time making the image with <a title="Inkscape" href="http://inkscape.org/">Inkscape</a> than I did actually writing the CSS to tell it to stay put.</p>
<h3>Useful Links</h3>
<p>I discovered the following useful sources for bringing that site to life:</p>
<ul>
<li><a title="FOAF Vocabulary Specification" href="http://xmlns.com/foaf/spec/">FOAF Vocabulary Specification</a></li>
<li><a title="W3Schools CSS Tutorial" href="http://www.w3schools.com/css/default.asp">W3Schools CSS Tutorial</a></li>
<li><a title="Learn CSS Positioning in Ten Steps" href="http://www.barelyfitz.com/screencast/html-training/css/positioning/">Learn CSS Positioning in Ten Steps</a></li>
<li><a title="RDFa Primer" href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa Primer</a></li>
<li><a title="RDFa in XHTML: Syntax and Processing" href="http://www.w3.org/TR/rdfa-syntax/">RDFa in XHTML: Syntax and Processing</a></li>
<li><a title="The W3C CSS Validation Service" href="http://jigsaw.w3.org/css-validator/">The W3C CSS Validation Service</a></li>
<li><a title="W3Schools HTML 4.01/XHTML 1.0 Reference" href="http://www.w3schools.com/tags/default.asp">W3Schools HTML 4.01/XHTML 1.0 Reference</a></li>
<li><a title="The W3C Markup Validation Service" href="http://validator.w3.org/">The W3C Markup Validation Service</a></li>
<li><a title="Expressing Dublin Core in HTML/XHTML meta and link elements" href="http://www.dublincore.org/documents/dcq-html/">Expressing Dublin Core in HTML/XHTML meta and link elements</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/02/21/rebirth-of-a-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing RAM on a Macbook Pro</title>
		<link>http://www.littleprojects.org/blog/2011/02/03/testing-ram-on-a-macbook-pro/</link>
		<comments>http://www.littleprojects.org/blog/2011/02/03/testing-ram-on-a-macbook-pro/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 04:46:02 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=217</guid>
		<description><![CDATA[My Macbook Pro came with 4GB of RAM in 2 2GB modules.  In December, I ordered 8 GB (2 4GB modules) of RAM from Crucial so I could max out the RAM in the machine, as I intend to keep it for a while. Early in January I started to see applications crash.  VMWare Fusion [...]]]></description>
			<content:encoded><![CDATA[<p>My Macbook Pro came with 4GB of RAM in 2 2GB modules.  In December, I ordered 8 GB (2 4GB modules) of RAM from Crucial so I could max out the RAM in the machine, as I intend to keep it for a while.</p>
<p>Early in January I started to see applications crash.  VMWare Fusion became almost unusable.  I had never seen this behavior from my Mac before, so figured the new RAM had something to do with it, but wanted to verify my assumption before blindly blaming Crucial for bad RAM.  At that point I had to learn how to best test RAM on a Mac.</p>
<p>On a PC, I would have booted a CD running memtest86, but none of my Internet research indicated that was possible for the Mac.</p>
<p>Instead, I had to install <a title="Article on memtest, where to get it, and how to use it" href="http://www.command-tab.com/2008/01/11/how-to-test-ram-under-mac-os-x/">memtest</a> and boot the machine into single user mode in order to run memtest with the least amount of interference from running programs.  I wanted to document what I had done in a blog post so I could remember next time.</p>
<p><strong>Note:  This article involves configuring your Mac in a way that could make it difficult for you to boot it normally if you don&#8217;t know what you&#8217;re doing.  If you don&#8217;t feel comfortable following these instructions, take your Mac to a technician who not only feels comfortable fixing your computer, but is also competent to do so.</strong></p>
<p>To tell the Mac to boot into verbose 64-bit single user mode, go to Applications/Utilities/Terminal, and type:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="kw2">sudo</span> nvram boot-args=<span class="st0">&quot;-s arch=x86_64 -v&quot;</span></pre></div></div></div></div></div></div></div>


<p>You may be asked for the password you type to make changes to the system, type the password and hit enter.</p>
<p>Reboot your Mac.</p>
<p>Your Mac will boot to a prompt.  You may be surprised at all of the text that goes by.   These are kernel messages that are normally hidden by the nifty Apple logo.</p>
<p>At the prompt type:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1">memtest all</pre></div></div></div></div></div></div></div>


<p>This will attempt to test as much RAM as it can.  Remember that some of your RAM is being taken up by minimal amount of software that booted your machine into single user mode (the kernel and bash), so you won&#8217;t be able to test everything, but if the flaw was in the RAM being used by the software running at this point, the machine would have failed to boot.</p>
<p>If your RAM is good, the test will take hours and you will see something like:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="text"><pre class="de1">Memtest version 4.22 (64-bit)
Copyright (C) 2004 Charles Cazabon
Copyright (C) 2004-2008 Tony Scaminaci (Macintosh port)
Licensed under the GNU General Public License version 2 only
&nbsp;
Mac OS X 10.6.6 (10J567) running in single user mode
Memory Page Size:  4096
System has 2 Intel core(s) with SSE
Requested memory: 7555MB (7922552832 bytes)
Available memory: 7555MB (7922552832 bytes)
NOTE:  Memory request is too large, reducing to acceptable value...
Allocated memory:  7343MB (7700721344 bytes) at local address 0x00000000101000000
Attempting memory lock... locked successfully
Partitioning memory into 2 comparison buffers...
Buffer A: 3671MB (3850360672 bytes) starts at local address 0x0000000101000000
Buffer B: 3671 MB (3850360672 bytes) starts at local address 0x00000001e67fd760
&nbsp;
Running 1 test sequence... (CTRL-C to quit)
&nbsp;
Test sequence 1 of 1:
&nbsp;
Running tests on full 7343MB region...
  Stuck Address       : ok
  Linear PRN            : ok
Running comparison tests using 3671MB buffer...
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV          : ok
  Compare OR           : ok
  Compare AND         : ok
  Sequential Increment:ok
  Solid Bits               :ok
  Block Sequential      :ok
  Checkerboard         :ok
  Bit Spread             :ok
  Bit Flip                  :ok
  Walking Ones         :ok
  Walking Zeroes       :ok
&nbsp;
All tests passed!  Execution time:  7068 seconds.</pre></div></div></div></div></div></div></div>


<p>If your RAM is bad, you will likely get a response really fast, and you will see something like:</p>
<pre>*** Address Test Failed *** One or more DIMM address lines are non-functional.
</pre>
<p>or</p>
<pre>FAILURE: possible bad address line at offset 0x06b3a4c8.
</pre>
<p>or</p>
<pre>FAILURE: 0xbea1ce76 != 0xbea1ce7e at offset 0x06b3a4c8.
</pre>
<p>or</p>
<pre>*** Memory Test Failed *** Please check transcript for details.
</pre>
<p>If you get a message like:</p>
<pre>Attempting memory lock... ERROR: Memory lock failed - reason unknown.

WARNING: Testing with unlocked memory may be slower and less reliable
</pre>
<p>hit CTRL-C and make sure you booted into 64-bit mode by typing the following:</p>
<pre>uname -m
</pre>
<p>If the command doesn&#8217;t return <code>x86_64</code> then you are not running in 64-bit mode and your Mac can&#8217;t reach the RAM above 4GB.  Please reference the above command for booting your Mac into single user mode, as it includes the flags to set it to 64-bit mode, then reboot.</p>
<p>If the command above <strong>does</strong> return <code>x86_64</code>, then you <em>are</em> running in 64-bit mode and this message is probably a preview of test failures to come.</p>
<p>If you have more than one module of RAM, then take all of them out, and place one in the machine, boot, and run the test.  After that one finishes test, note the results, turn the Mac off, take the RAM module out, and put the next one in.  This way you can figure out which module is bad.</p>
<p>When done, make sure you have good RAM in the machine, boot it again, and type:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="kw2">sudo</span> nvram boot-args=<span class="st0">&quot;&quot;</span></pre></div></div></div></div></div></div></div>


<p>This will give you your &#8220;normal&#8221; Apple logo screen on boot.</p>
<p>I hope you will find this article as useful as I will the next time we need to test RAM on a Mac.</p>
<p>Today, Crucial was nice enough to send me some new RAM after I sent them the bad module.  So far, it appears to be passing memtest.  Cross your fingers for me!  <img src='http://www.littleprojects.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/02/03/testing-ram-on-a-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Copyright &#169; is not enough</title>
		<link>http://www.littleprojects.org/blog/2011/01/25/copyright-is-not-enough/</link>
		<comments>http://www.littleprojects.org/blog/2011/01/25/copyright-is-not-enough/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 04:25:03 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[web site]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=204</guid>
		<description><![CDATA[Tonight&#8217;s Digital Libraries class covered Copyrights, Patents, Copylefts, and other intellectual property concepts. This is especially important in the digital libraries world because the laws surrounding intellectual property make preservation challenging. An important take-away from tonight&#8217;s lecture was that merely placing &#8220;© 2010 Shawn M. Jones&#8221; at the bottom of my pages is not merely [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight&#8217;s <a title="ODU CS 751: Digital Libraries" href="http://www.cs.odu.edu/~mln/teaching/cs751-s11/">Digital Libraries</a> class covered Copyrights, Patents, Copylefts, and other intellectual property concepts.  This is especially important in the digital libraries world because the laws surrounding intellectual property make preservation challenging.</p>
<p>An important take-away from tonight&#8217;s lecture was that merely placing &#8220;© 2010 Shawn M. Jones&#8221; at the bottom of my pages is not merely enough to protect it legally.  A notice must appear somewhere on the site for its content.  Several years ago, <a title="Lawrence Lessig" href="http://en.wikipedia.org/wiki/Lawrence_Lessig">Lawrence Lessig</a> created the <a title="Creative Commons Web Site" href="http://creativecommons.org/">Creative Commons</a> license to allow those on the Internet to share their work while retaining their copyright to said work.</p>
<p>To provide a license for this blog, I&#8217;ve filled out the form on the site and followed the directions on the web site for linking to the chosen license, like so:</p>
<blockquote><p>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">the Little Projects of Shawn M. Jones</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://www.littleprojects.org" property="cc:attributionName" rel="cc:attributionURL">Shawn M. Jones</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</p></blockquote>
<p>We&#8217;re quite lucky to live in an era where folks are willing to do the legal legwork necessary to make this happen.  I&#8217;m happy that it&#8217;s even <a href="http://en.wikipedia.org/wiki/Creative_commons#Legal_cases" title="Wikipedia page showing cases where Creative Commons held up in court">held up in court</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/01/25/copyright-is-not-enough/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding a kernel on the web</title>
		<link>http://www.littleprojects.org/blog/2011/01/20/finding-a-kernel-on-the-web/</link>
		<comments>http://www.littleprojects.org/blog/2011/01/20/finding-a-kernel-on-the-web/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 05:02:35 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[web site]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=188</guid>
		<description><![CDATA[One of the great agonies of a human being is searching for that little kernel of knowledge that actually answers their question. Within a traditional library, one would ask the reference librarian to lead them to the documents that, hopefully, answer their question. On the web, we use search engines as if they were reference [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great agonies of a human being is searching for that little kernel of knowledge that actually answers their question.  Within a traditional library, one would ask the reference librarian to lead them to the documents that, hopefully, answer their question.  On the web, we use search engines as if they were reference librarians, and search engines are a poor substitute, but they are all we have for now.</p>
<p>Within a traditional library, the information about a book (metadata) is stored within some system (e.g. MARC), and this system is linked to some library classification (e.g. Dewey Decimal) for finding it on the shelf at a particular library.  A whole profession exists for making this happen.  Book metadata is chosen by professionals so that said book can be delivered to the person looking for the information within.  These professionals (catalogers) are the gatekeepers of the whole system.  Without them, the books might as well be strewn about.</p>
<p>On the web, there is no central authority.  Every site is responsible for its own content.  Search engines like Google use complex algorithms to try to find something that answers your question.  Web site owners must take it upon themselves to not only ensure that their site stays consistent and correct, but also that it has metadata for these search engines to use to find them.  Though <a title="Wikipedia article on Search Engine Optimization" href="http://en.wikipedia.org/wiki/Search_engine_optimization">Search Engine Optimization (SEO)</a> is largely used to ensure potential customers find businesses, it is also important in helping users find the information they are looking for.</p>
<p>Now that I am aware of the importance of such metadata, I have installed <a title="Dublin Core plugin for WordPress" href="http://wordpress.org/extend/plugins/dublin-core-for-wp/">a plugin for WordPress</a> on my blog that generates <a title="Wikipedia article on Dublin Core" href="http://en.wikipedia.org/wiki/Dublin_core">Dublin Core</a> metadata elements.  These metadata elements are supposed to help others find articles like this one via search engines.</p>
<p>This plugin takes the existing metadata I was already supplying for each post, and places it in the header of the HTML at the top of the page, like so:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="html"><pre class="de1">&lt;meta name=&quot;DC.publisher&quot; content=&quot;the Little Projects of Shawn M. Jones&quot; /&gt;
&lt;meta name=&quot;DC.publisher.url&quot; content=&quot;http://www.littleprojects.org/blog/&quot; /&gt;
&lt;meta name=&quot;DC.title&quot; content=&quot;Finding a kernel on the web&quot; /&gt;
&lt;meta name=&quot;DC.identifier&quot; content=&quot;http://www.littleprojects.org/blog/?p=188&quot; /&gt;
&lt;meta name=&quot;DC.date.created&quot; scheme=&quot;WTN8601&quot; content=&quot;2011-01-19T23:52:11&quot; /&gt;
&lt;meta name=&quot;DC.created&quot; scheme=&quot;WTN8601&quot; content=&quot;2011-01-19T23:52:11&quot; /&gt;
&lt;meta name=&quot;DC.date&quot; scheme=&quot;WTN8601&quot; content=&quot;2011-01-19T23:52:11&quot; /&gt;
&lt;meta name=&quot;DC.creator.name&quot; content=&quot;Shawn M. Jones&quot; /&gt;
&lt;meta name=&quot;DC.creator&quot; content=&quot;Shawn M. Jones&quot; /&gt;
&lt;meta name=&quot;DC.rights.rightsHolder&quot; content=&quot;Shawn M. Jones&quot; /&gt;
&lt;meta name=&quot;DC.language&quot; content=&quot;en-US&quot; scheme=&quot;rfc1766&quot; /&gt;</pre></div></div></div></div></div></div></div>


<p>I don&#8217;t really expect the search engine rankings to go up, but the real win here is that I&#8217;m helping others index my site in case I&#8217;ve actually provided exactly the information someone is looking for.  In a way, this is a form of SEO, but it gets back to that cataloging spirit originally found in the library.  There is no common list of tags or subjects for the web that we all must adhere to, but little steps like this bring us closer to finding the information we are looking for.</p>
<p>Take a look at the source for some of your favorite news sites, you&#8217;ll probably see the same metadata in their headers too.</p>
<p>For futher reading:</p>
<p><a href="http://www.dlib.org/dlib/July95/07weibel.html">Metadata: The Foundations of Resource Description</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/01/20/finding-a-kernel-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lil&#8217; bit:  scp and echo statements in your login scripts</title>
		<link>http://www.littleprojects.org/blog/2011/01/16/lil-bit-scp-and-echo-statements-in-your-login-scripts/</link>
		<comments>http://www.littleprojects.org/blog/2011/01/16/lil-bit-scp-and-echo-statements-in-your-login-scripts/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 17:26:43 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[linux/unix]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=131</guid>
		<description><![CDATA[For years, I have used scp to transfer files between Unix/Linux machines.  I noted quite a while ago that having an echo statement in my login script (in this case .bashrc) caused the file transfer to fail, so I removed all echo statements from login scripts, using them only for temporary debugging.  Today, I believe [...]]]></description>
			<content:encoded><![CDATA[<p>For years, I have used scp to transfer files between Unix/Linux machines.  I noted quite a while ago that having an echo statement in my login script (in this case .bashrc) caused the file transfer to fail, so I removed all echo statements from login scripts, using them only for temporary debugging.  Today, I believe I have found the way to have my cake (use scp to copy files) and eat it too (leave the echo statements in the login script).</p>
<p>If your .bashrc looks like this:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="co0">#!/bin/bash</span>
<span class="kw3">echo</span> <span class="st0">&quot;Running the .bashrc file&quot;</span>
&nbsp;
<span class="co0"># correct spelling mistakes</span>
<span class="kw3">shopt</span> <span class="re5">-s</span> cdspell
&nbsp;
<span class="co0"># save multiline commands in the command history</span>
<span class="kw3">shopt</span> <span class="re5">-s</span> cmdhist
&nbsp;
<span class="co0"># some useful aliases</span>
<span class="kw3">alias</span> <span class="re2">c</span>=<span class="st_h">'clear'</span>
<span class="kw3">alias</span> <span class="re2">ls</span>=<span class="st_h">'ls -p'</span>
<span class="kw3">alias</span> <span class="re2">vi</span>=<span class="st_h">'vim'</span>
&nbsp;
<span class="kw3">echo</span> <span class="st0">&quot;done with .bashrc file&quot;</span></pre></div></div></div></div></div></div></div>


<p>And you connect via SSH, you&#8217;ll see the following:</p>
<pre>[me@otherhost]$ ssh myhost
me@myhosts's password:
Running the .bashrc file
done with .bashrc file
[me@myhost me]$
</pre>
<p>Which is fine for an SSH session.  In fact, you might even ask questions of logging in users, or dump an entire warning banner to the screen to indemnify you for legal reasons.  Many interactive possibilities exist.</p>
<p>Now say you wish to copy a file from one server to another:</p>
<pre>[me@otherhost]$ scp myfile myhost:~/
Running the .bashrc file
</pre>
<p>Once this is done, you only see the output from the first echo.  What&#8217;s worse, the copy never happens.  <a title="Bug in Redhat's database against SCP" href="https://bugzilla.redhat.com/show_bug.cgi?id=20527">Some claim this is a bug</a>.  The fact that the bug was reported in 2000 and still exists in scp indicates to me that the scp authors don&#8217;t consider it a problem.</p>
<p>The solution is in testing for the existence of a terminal:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1"><span class="co0">#!/bin/bash</span>
<span class="kw1">if</span> tty <span class="sy0">&amp;</span>gt; <span class="sy0">/</span>dev<span class="sy0">/</span>null <span class="nu0">2</span><span class="sy0">&amp;</span>gt;<span class="sy0">&amp;</span>amp;<span class="nu0">1</span>; <span class="kw1">then</span>
    <span class="kw3">echo</span> <span class="st0">&quot;Running the .bashrc file&quot;</span>
<span class="kw1">fi</span>
&nbsp;
<span class="co0"># correct spelling mistakes</span>
<span class="kw3">shopt</span> <span class="re5">-s</span> cdspell
&nbsp;
<span class="co0"># save multiline commands in the command history</span>
<span class="kw3">shopt</span> <span class="re5">-s</span> cmdhist
&nbsp;
<span class="co0"># some useful aliases</span>
<span class="kw3">alias</span> <span class="re2">c</span>=<span class="st_h">'clear'</span>
<span class="kw3">alias</span> <span class="re2">ls</span>=<span class="st_h">'ls -p'</span>
<span class="kw3">alias</span> <span class="re2">vi</span>=<span class="st_h">'vim'</span>
&nbsp;
<span class="kw1">if</span> tty <span class="sy0">&amp;</span>gt; <span class="sy0">/</span>dev<span class="sy0">/</span>null <span class="nu0">2</span><span class="sy0">&amp;</span>gt;<span class="sy0">&amp;</span>amp;<span class="nu0">1</span>; <span class="kw1">then</span>
    <span class="kw3">echo</span> <span class="st0">&quot;done with .bashrc file&quot;</span>
<span class="kw1">fi</span></pre></div></div></div></div></div></div></div>


<p>Now scp will work without any output to the screen.  More importantly, your files will be copied:</p>
<pre>[me@otherhost]$ scp myfile myhost:~/
me@myhost's password:
myfile                               100% 1896KB   1.9MB/s   00:00
</pre>
<p>Thanks to the <a title=".bashrc and scp - Ars Technica" href="http://arstechnica.com/civis/viewtopic.php?f=16&amp;t=137594">forums on Ars Technica</a> for leading me to the answer to this issue.  As that post existed in 2000, I now see why the openssh folks haven&#8217;t &#8220;fixed&#8221; scp.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/01/16/lil-bit-scp-and-echo-statements-in-your-login-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This site is a blog</title>
		<link>http://www.littleprojects.org/blog/2011/01/10/this-site-is-a-blog/</link>
		<comments>http://www.littleprojects.org/blog/2011/01/10/this-site-is-a-blog/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 04:33:20 +0000</pubDate>
		<dc:creator>Shawn M. Jones</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[web site]]></category>

		<guid isPermaLink="false">http://www.littleprojects.org/blog/?p=128</guid>
		<description><![CDATA[I&#8217;ve resolved that what I&#8217;m really looking for in a web site is a blog. I wanted the site to do the following things: allow me to publish blog posts, which I was already doing with WordPress allow me to publish the occasional article, which I seem to have little time or inclination to do, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve resolved that what I&#8217;m really looking for in a web site is a <a title="definition of blog at dictionary.com" href="http://dictionary.reference.com/browse/blog">blog</a>.</p>
<p>I wanted the site to do the following things:</p>
<ul>
<li>allow me to publish blog posts, which I was already doing with <a title="wordpress home page" href="http://wordpress.org/">WordPress</a></li>
<li>allow me to publish the occasional article, which I seem to have little time or inclination to do, so I ditched <a title="Drupal home page" href="http://drupal.org/">Drupal</a></li>
<li>allow me to publish photos, for which I&#8217;m currently using Picasa Web Albums</li>
</ul>
<p>I&#8217;m maintaining my own site on my own server for the following reasons:</p>
<ul>
<li><a title="Blogger home page" href="http://www.blogger.com">Blogger</a> was too slow to load on many of the networks I experimented with</li>
<li>WordPress has more features than Blogger.</li>
<li>WordPress is open source, and I can learn about this nifty piece of software by running it myself.</li>
<li>I had already moved my mail services off of Gmail and onto my rented server, and wanted to consolidate my web services there as well.</li>
<li>I love messing with a Linux server in my spare time.</li>
</ul>
<p>We&#8217;ll see how far this Intel Celeron 2.53 GHz machine with 1GB of RAM will get me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littleprojects.org/blog/2011/01/10/this-site-is-a-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

