<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>tail -f findings.out</title>
	
	<link>http://dancingpenguinsoflight.com</link>
	<description />
	<lastBuildDate>Sun, 21 Aug 2011 14:33:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dancingpenguinsoflight" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="dancingpenguinsoflight" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Handy Excel Tip: Open workbook in new instance</title>
		<link>http://dancingpenguinsoflight.com/2011/05/handy-excel-tip-open-workbook-in-new-instance/</link>
		<comments>http://dancingpenguinsoflight.com/2011/05/handy-excel-tip-open-workbook-in-new-instance/#comments</comments>
		<pubDate>Sun, 29 May 2011 21:04:50 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[spreadsheet]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1924</guid>
		<description><![CDATA[I&#8217;ve written before about using Excel for some remote data collection and analysis tasks. One thing that often annoyed me in such situations was the inability to utilize multiple monitors. Whenever I wanted to break out a sheet, or especially &#8230; <a href="http://dancingpenguinsoflight.com/2011/05/handy-excel-tip-open-workbook-in-new-instance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a title="Web data in Excel" href="http://dancingpenguinsoflight.com/2009/07/pulling-data-into-excel-from-web-queries/" target="_blank">written</a> <a title="Web queries with dynamic parameters in Excel" href="http://dancingpenguinsoflight.com/2010/07/excel-web-query-urls-with-dynamic-parameters/" target="_blank">before</a> about using Excel for some remote data collection and analysis tasks. One thing that often annoyed me in such situations was the inability to utilize multiple monitors. Whenever I wanted to break out a sheet, or especially when opening a new workbook, I found there is no way in default Excel to open the item in a new instance. It would always open in the same window, severely limiting potentially useful layout arrangements.</p>
<p>As is unfortunately common with Windows improvements&#8230; there&#8217;s a registry modification to solve it. All credit goes to OnlineTechTips: <a target="_blank" title="How a new instance of Excel 2007 workbooks" href="http://www.online-tech-tips.com/ms-office-tips/how-to-open-a-new-instance-of-excel-2007-workbooks/">this article</a> got me fixed up quickly.</p>
<p>Basically you just download <a target="_blank" href="http://www.online-tech-tips.com/wp-content/uploads/Excel_New_Instance.zip">a zip file</a>, extract the contents, and rename the file whose title indicates the behavior you&#8217;d like in place. After this you just double click to run the file. This is a very convenient way to provide a fix, much easier than following descriptions of where in the registry tree to find what entries and what values to set them as. One of them even adds the option to open in a new Excel window to the right click context menu.</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/05/handy-excel-tip-open-workbook-in-new-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Charlie Sheen is a long way from philosophy– but the journey is winning</title>
		<link>http://dancingpenguinsoflight.com/2011/05/charlie-sheen-is-a-long-way-from-philosophy-but-the-journey-is-winning/</link>
		<comments>http://dancingpenguinsoflight.com/2011/05/charlie-sheen-is-a-long-way-from-philosophy-but-the-journey-is-winning/#comments</comments>
		<pubDate>Wed, 25 May 2011 19:52:13 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Amusing]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=2014</guid>
		<description><![CDATA[After reading about an interesting phenomenon witnessed in a cartoon by Randall xkcd I decided to see how true it was that you could get to Philosophy from most any Wikipedia term via a reasonable number of clicks (here the &#8230; <a href="http://dancingpenguinsoflight.com/2011/05/charlie-sheen-is-a-long-way-from-philosophy-but-the-journey-is-winning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After reading about an interesting phenomenon witnessed in a cartoon by Randall xkcd I decided to see how true it was that you could get to Philosophy from most any Wikipedia term via a reasonable number of clicks (here the devil waits, no doubt). The principle:</p>
<div style="width: 500px; border: 2px solid #aaa; background-color: rgb(158, 198, 208); padding: 10px 5px; margin-left: 80px;">
<blockquote style="padding: 0em;"><p>If you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at &#8220;Philosophy&#8221;.</p></blockquote>
<div class="credit" align="right"><small>&mdash;<cite><a target="_blank" href="http://xkcd.com/903/">Book of XKCD, Chapter 903 (See alt tag)</a></cite></small></div>
</div>
<p>Being a good citizen of the Internet I started my search with the article on Charlie Sheen, hopeful that I was a mere two or three hops from my beloved Ivory Tower description. The truth, it turns out, is far more amusing. Follow the clicktrain:</p>
<ul>
<li>Step 1: <a title="Wikipedia: Charlie Sheen" target="_blank" href="http://en.wikipedia.org/wiki/Charlie_Sheen">Charlie sheen</a> -> Martin sheen -> Stage name -> Pseudonym -> Name -></li>
<li>Step 6: Noun -> Linguistics -> Human -> Taxonomically -> Science -></li>
<li>Step 11: Knowledge -> Facts -> Information -> Finite -> Mathematics -></li>
<li>Step 16: Quantity -> Property -> Modern philosophy -></li>
<li>Step 19. <strong><em><span style="color:red;">Philosophy</span></em></strong></li>
</ul>
<p>Now of course I have to write a script to facilitate exploring distances between terms in Wikipedia. After more important projects&#8230;</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/05/charlie-sheen-is-a-long-way-from-philosophy-but-the-journey-is-winning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show all available documents to new Google Apps – Docs users</title>
		<link>http://dancingpenguinsoflight.com/2011/05/show-all-available-documents-to-new-google-apps-docs-users/</link>
		<comments>http://dancingpenguinsoflight.com/2011/05/show-all-available-documents-to-new-google-apps-docs-users/#comments</comments>
		<pubDate>Sun, 15 May 2011 01:55:52 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1950</guid>
		<description><![CDATA[At my job we use Google Docs (via Google Apps) for internal collaborative documents and archives. One big issue with this platform is that when new folks are hired/given accounts and they go to view &#8220;All documents&#8221;&#8211; lo, and behold! &#8230; <a href="http://dancingpenguinsoflight.com/2011/05/show-all-available-documents-to-new-google-apps-docs-users/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/gdocs-logo.png"><img class="alignright size-full wp-image-1992" title="gdocs-logo" src="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/gdocs-logo.png" alt="" width="151" height="150" /></a>At my job we use Google Docs (via Google Apps) for internal collaborative documents and archives. One big issue with this platform is that when new folks are hired/given accounts and they go to view &#8220;All documents&#8221;&#8211; lo, and behold! it is empty. That&#8217;s right, if you go to &#8220;All items&#8221; and select Visibility -&gt; YOURCOMPANY under More options as the filter, you will still only get &#8220;No items matched your selections&#8221;. This despite there potentially being thousands of documents that should fit your criterion.<br />
<span id="more-1950"></span><br />
As it happens these views only get populated based on creation or modification dates. In other words, new users only get to see documents that are modified or created after their account was created. By &#8220;see&#8221; I only mean visibility of the existence of documents in the Docs index interfaces and searches. The user can still view a document directly if they are sent a direct link (assuming they have permission). But the fact that you can&#8217;t even see documents you have permission to see in searches until they are modified is just insane. Google support verified this was a &#8220;feature&#8221;, and their reasoning is that in larger organizations new employees might be overwhelmed by a huge list of documents, things would be too hard to find. So the solution is to make it difficult to find anything!</p>
<p>Until the time when Google realizes this is annoying and silly, here&#8217;s a quick and easy (albeit not permanent) hack for this situation. <a title="Google Help on making collections" href="http://docs.google.com/support/bin/answer.py?answer=68486" target="_blank">Create a new collection</a> (helpful: name = creation date) and <a title="Google Help on adding docs to a collection" href="http://docs.google.com/support/bin/answer.py?hl=en&amp;answer=68491&amp;topic=15197" target="_blank">add all current documents</a> to it. This step counts as a modification to all the documents, and thus they will then appear in the list of all docs! The annoying bit is that next time you make a user you have to do the same thing.</p>
<p>This hack might not be feasible if you have high hundreds or especially thousands of documents, I am sorry to say. As far as I can tell you can&#8217;t drag more than 40-60 of them at once or it throws an error. If you do it in chunks it works fine though.</p>
<p>Lastly, perhaps you dislike messy lists of things you no longer need and want to remove the previous collection when a new user comes on and you create a new one. If you do that by simply deleting the collection you will also <a title="Google Help on deleting collection" href="http://docs.google.com/support/bin/answer.py?hl=en&amp;answer=68487&amp;topic=15197" target="_blank">delete all documents in the collection</a>! Really Google? You couldn&#8217;t add a damned checkbox to confirm the removal of child documents or just the collection container? Anyway, if you really care that much then there is a way. Click on one document, hold Shift and click on another document slightly past the bottom of your screen (after scrolling). This should be a reasonable number for your chunk size. Then hover over one of the selected documents, click Actions on the right, and click Organize. Here you can select the new collection to add them to it and deselect the old one so they aren&#8217;t in it. Once you are done going through all your docs the old collection should be empty and you can remove it safely. My approach is to create them with a name based on the date and just never remove them. If your users heavily leverage collections you might need to reconsider this.</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/05/show-all-available-documents-to-new-google-apps-docs-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bag of useful Bash aliases and functions</title>
		<link>http://dancingpenguinsoflight.com/2011/05/bag-of-useful-bash-aliases-and-functions/</link>
		<comments>http://dancingpenguinsoflight.com/2011/05/bag-of-useful-bash-aliases-and-functions/#comments</comments>
		<pubDate>Sun, 15 May 2011 01:10:23 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1968</guid>
		<description><![CDATA[Here are a number of assorted aliases and functions for Bash that I&#8217;ve made in the last few months and found to be useful. Enjoy! Sysadminish These two print the current value of the swappiness parameter and tail recent syslog &#8230; <a href="http://dancingpenguinsoflight.com/2011/05/bag-of-useful-bash-aliases-and-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are a number of assorted aliases and functions for Bash that I&#8217;ve made in the last few months and found to be useful. Enjoy!<br />
<span id="more-1968"></span></p>
<h2>Sysadminish</h2>
<p>These two print the current value of the <a title="Article on kernel swappiness" href="http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/" target="_blank">swappiness parameter</a> and tail recent syslog messages:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">swappy</span>=<span style="color: #ff0000;">&quot;sudo /sbin/sysctl vm.swappiness&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">sysl</span>=<span style="color: #ff0000;">&quot;sudo tail /var/log/syslog&quot;</span></div></td></tr></tbody></table></div>
<p>This converts unix timestamps (e.g. 1305401097) that you might find in logfiles to a more easily readable date format:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> fromunixtime <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;require 'ctime.pl'; print &amp;ctime($1);&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>The first is simply a quick way to check internet connectivity. Next are some super short ping aliases to avoid Ctrl+c all the time when you just need to verify that something responds. Pass them a URL to get one or three ping attempts:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">pingoo</span>=<span style="color: #ff0000;">&quot;ping -c 3 www.google.com&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">p1</span>=<span style="color: #ff0000;">&quot;ping -c 1 &quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">p3</span>=<span style="color: #ff0000;">&quot;ping -c 3 &quot;</span></div></td></tr></tbody></table></div>
<p>Pass a webpage URL and it will download the source to a file named after the domain (if you&#8217;re passing a root page, e.g. http://www.cnn.com/) or the page name (e.g. contact.html):</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> getsrc <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #007800;">$1</span> <span style="color: #660033;">-O</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/\/$//'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">'{print $NF }'</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>Sometimes you just need a big file. It doesn&#8217;t have to be interesting or contain any cosmological insights, but it does need to be a certain size. Pass that size in megabytes and this will give you just that, via a file full of zeroes:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> fakefile <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;print '0' x 1024 x 1024 x $1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$1</span>-MB-fake-file.txt<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>This handy one extracts all email addresses in a file and gives you a unique sorted list:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">findallemails</span>=<span style="color: #ff0000;">&quot;perl -wne'while(/[\w\.]+@[\w\.]+\w+/g){print <span style="color: #000099; font-weight: bold;">\&quot;</span>$&amp;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\&quot;</span>}' &quot;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> findemails <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; findallemails <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<h2>Listing and searching</h2>
<p>When you invoke <a title="Post on ack-grep" href="http://dancingpenguinsoflight.com/2008/09/ack-grep-but-better/" target="_blank">ack-grep</a> it&#8217;s case-sensitive by default. It also ignores certain files and directories, based on their nature in some cases and in all cases where it doesn&#8217;t know what the filetype is. This incantation removes those limitations and is shorter to boot:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ack</span>=<span style="color: #ff0000;">&quot;ack-grep -i -u&quot;</span></div></td></tr></tbody></table></div>
<p>This series allows you to list only directories or only files. You can pass a directory to list the contents or it will use the current directory as default:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Feeds file and directory filtered listers:</span><br />
<span style="color: #000000; font-weight: bold;">function</span> lister <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> == <span style="color: #ff0000;">''</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'.'</span>; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span>; <span style="color: #000000; font-weight: bold;">fi</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<span style="color: #666666; font-style: italic;"># List only directories:</span><br />
<span style="color: #000000; font-weight: bold;">function</span> lsd <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; lister <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">'^d'</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<span style="color: #666666; font-style: italic;"># More memorable version:</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">lsdirs</span>=lsd<br />
<span style="color: #666666; font-style: italic;"># List only files:</span><br />
<span style="color: #000000; font-weight: bold;">function</span> lsf <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; lister <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">'^d'</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<span style="color: #666666; font-style: italic;"># More memorable version:</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">lsfiles</span>=lsf</div></td></tr></tbody></table></div>
<h2>Media and Fun</h2>
<p>These two require <a title="Man page for identify" href="http://cf.ccmr.cornell.edu/cgi-bin/w3mman2html.cgi?identify%281%29" target="_blank">identify</a> be installed, part of <a title="ImageMagick CLI" href="http://www.imagemagick.org/script/command-line-tools.php" target="_blank">ImageMagick</a>. Install the imagemagick package for your system first. Pass the filename of an image and the first will provide a range of information while the second will just provide the resolution:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">imginfo</span>=<span style="color: #ff0000;">&quot;identify -format '-- %f -- <span style="color: #000099; font-weight: bold;">\n</span>Type: %m<span style="color: #000099; font-weight: bold;">\n</span>Size: %b bytes<span style="color: #000099; font-weight: bold;">\n</span>Resolution: %wpx x %hpx<span style="color: #000099; font-weight: bold;">\n</span>Colors: %k'&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">imgres</span>=<span style="color: #ff0000;">&quot;identify -format '%f: %wpx x %hpx<span style="color: #000099; font-weight: bold;">\n</span>'&quot;</span></div></td></tr></tbody></table></div>
<p>Examples:<br />
<a href="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/imginfo.png"><img class="alignright size-full wp-image-1978" title="imginfo" src="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/imginfo.png" alt="" width="655" height="145" /></a><br />
Sometimes you just need to jack in. Or at least fill your screen with impressive looking output:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">rmatrix</span>=<span style="color: #ff0000;">'echo -ne &quot;\e[31m&quot; ; while true ; do echo -ne &quot;\e[$(($RANDOM % 2 + 1))m&quot; ; tr -c &quot;[:print:]&quot; &quot; &quot; &lt; /dev/urandom | dd count=1 bs=50 2&gt; /dev/null ; done'</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">gmatrix</span>=<span style="color: #ff0000;">'echo -ne &quot;\e[32m&quot; ; while true ; do echo -ne &quot;\e[$(($RANDOM % 2 + 1))m&quot; ; tr -c &quot;[:print:]&quot; &quot; &quot; &lt; /dev/urandom | dd count=1 bs=50 2&gt; /dev/null ; done'</span></div></td></tr></tbody></table></div>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/matrix.png"><img class="alignright size-full wp-image-1981" title="matrix" src="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/matrix.png" alt="" width="572" height="300" /></a></p>
<div style="clear: both;"></div>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/05/bag-of-useful-bash-aliases-and-functions/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Great iPad Apps</title>
		<link>http://dancingpenguinsoflight.com/2011/05/great-ipad-apps/</link>
		<comments>http://dancingpenguinsoflight.com/2011/05/great-ipad-apps/#comments</comments>
		<pubDate>Mon, 09 May 2011 00:44:22 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[tablet]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1935</guid>
		<description><![CDATA[I purchased an iPad 2 recently and have really been impressed with the versatility of the platform. I keep finding new uses for it, including some that are new roles instead of replacements for more limited options. I don&#8217;t have &#8230; <a href="http://dancingpenguinsoflight.com/2011/05/great-ipad-apps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/ipad.jpg"><img class="alignright size-full wp-image-1944" title="ipad" src="http://dancingpenguinsoflight.com/wp-content/uploads/2011/05/ipad.jpg" alt="" width="161" height="141" /></a>I purchased an iPad 2 recently and have really been impressed with the versatility of the platform. I keep finding new uses for it, including some that are new roles instead of replacements for more limited options. I don&#8217;t have the bandwidth for a full review of the iPad 2 and all its great features. But I did end up going on a bit of an app spree, so I&#8217;d like to share some of the more interesting ones I&#8217;ve found so far.<br />
<span id="more-1935"></span></p>
<ul>
<li><a href="http://flipboard.com/" target="_blank">Flipboard</a>: This has become my favorite news application on any platform. You provide RSS feeds (or select from pre-entered sites) and Flipboard generates a digital magazine style view of the articles, complete with images and cleaned up typography. You can slide the item up to view the original article, email articles and share with various social networks from within the app as well. I&#8217;ve been surprised how much faster I can get through my daily news. One big complaint: get with it guys, add Read It Later support!</li>
<li><a href="http://readitlaterlist.com/blog/2010/06/introducing-read-it-later-for-ipad/" target="_blank">Read It Later</a>:  Lovely interface to read through your Read It Later list. There&#8217;s a  flipboardesque style view available for an additional cost, which was a  little disappointing. I do love RIL though, so I&#8217;ll probably fork over  another few bucks to support them as well. [<strong>Update, 2011-05-09</strong>: I <em>highly</em> recommend buying the Digest view, and anything I said about it  disparagingly can be safely ignored. Aside from turning your list into a  great Flipboard view, it figures out categories for you, and does a  fine job. Good form, Peter.]</li>
<li><a href="http://www.9to5mac.com/64551/meet-terra-ipad-browser-with-tabbed-full-screen-and-offline-browsing/" target="_blank"><del datetime="2011-05-11T19:28:05+00:00">Terra</del></a>: An alternate web browser. I started using this because of the very intuitive and useful gesture navigation. Two fingers swiped left or right takes you back and forward in your browsing history and three fingers is used to switch between tabs. This greatly speeds up browser use. There are plenty of other cool features as well! [<strong>UPDATE, 2011-05-11</strong>: <a href="http://forums.macrumors.com/showthread.php?t=1145275">Apple has apparently told Readdle</a> to remove Terra from the AppStore. Sure, there's some duplication with Safari, but everyone I've shown it to thinks it's a clearly improved experience. Curmudgeons.]</li>
<li><a href="http://blogs.adobe.com/conversations/2010/04/hey_weve_launched_an_ipad_app.html" target="_blank">Adobe Ideas</a>: A drawing app that makes your art a little more&#8230; artistic. It smoothes out lines and curves, so your shaky squiggles look a bit more intentional. Not bursting at the seams with features, but great for some quick brainstorming and illustrations.</li>
<li><a href="http://blog.ted.com/2010/10/14/introducing-the-ted-ipad-app/" target="_blank">TED</a>:  Awesome free app to view all current TED talks. Easy to search and get  summaries at a glance. I&#8217;m watching a lot more of these now!</li>
<li><a href="http://www.tuaw.com/2010/05/25/tchess-pro-for-ipad-is-very-very-good/" target="_blank">tChess Pro</a>:  Very full-featured and well-made chess application. You can use it to  learn via the decent AI, move analysis, gameplay instructions, hints and  other features. There are a variety of views, angles and appearances so  you can view the board however you see fit. You can even email games  back and forth and move the board around with gestures!</li>
<li><a href="http://www.brians-brain.org/projects/flickr-frame.html" target="_blank">FlickrFrame</a>: You provide your Flickr credentials and select a set or other criteria and FlickrFrame pulls up a full-screen slideshow of your images. Rotation speed and animation are configurable, so it makes a great photo frame from your iPad.</li>
<li><a href="http://itunes.apple.com/us/app/netflix/id363590051?mt=8" target="_blank">Netflix</a>: Not as full-featured as you might wish, a cause of <a href="http://www.hackingnetflix.com/2011/03/netflix-updates-ipad-app-your-thoughts.html">some complaints</a>, but it still works wonderfully to stream from your instant queue, search for items, etc. And the iPad form factor definitely works out very well for a mobile movie center.</li>
<li><a href="http://itunes.apple.com/us/app/speedtest-net-mobile-speed/id300704847?mt=8" target="_blank">Speed Test</a>:  Just what you might think: easy and quick way to view your current  download and upload rates. Good for checking on the go or verifying home  network speeds.</li>
<li><a href="http://itunes.apple.com/us/app/the-weather-channel-max-for/id364252504?mt=8" target="_blank">TWC Max+</a>: Was just looking for a simple weather app, but this was free so I gave it a shot. Turns out it&#8217;s pretty great! It provides current radar and other usual weather fare for as many locations as you&#8217;d like to configure. Alerts and some (rather useless) social media stuff is available as well.</li>
<li><a href="http://itunes.apple.com/us/app/coder-cheat-sheets/id427177167?mt=8" target="_blank">CoderCheat</a>: Free app providing a number of helpful and commonly used programming reference/cheat sheets. It doesn&#8217;t have a huge variety of languages, but even with just CSS, HTML, Javascript, MySQL, PHP, Python and Regex it was sure good enough for free!</li>
</ul>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/05/great-ipad-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast and easy bluetooth management on Ubuntu</title>
		<link>http://dancingpenguinsoflight.com/2011/02/fast-and-easy-bluetooth-management-on-ubuntu/</link>
		<comments>http://dancingpenguinsoflight.com/2011/02/fast-and-easy-bluetooth-management-on-ubuntu/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 22:16:21 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1908</guid>
		<description><![CDATA[I wanted to connect the conveniently svelte Apple wireless keyboard and mouse to my Ubuntu media server. I don&#8217;t often have issues connecting peripherals to my Ubuntu systems these days, so I naively assumed this would be a walk in &#8230; <a href="http://dancingpenguinsoflight.com/2011/02/fast-and-easy-bluetooth-management-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to connect the conveniently svelte <a target="_blank" title="Apple wireless keyboard" href="http://www.apple.com/keyboard/">Apple wireless keyboard</a> and mouse to my Ubuntu media server. I don&#8217;t often have issues connecting peripherals to my Ubuntu systems these days, so I naively assumed this would be a walk in park. Well, it could have been, but I did not find the royal road on my first attempt. <a target="_blank" title="Installing blueman" href="http://www.siamnet.org/Wiki/Ubuntu-AppleBluetoothKeyboard">Here&#8217;s the right way</a>.<br />
<span id="more-1908"></span><br />
Install blueman (assumes you are on 10.04):</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;echo 'deb http://ppa.launchpad.net/blueman/ppa/ubuntu lucid main' &gt;&gt; /etc/apt/sources.list&quot;</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-key adv</span> <span style="color: #660033;">--keyserver</span> keyserver.ubuntu.com <span style="color: #660033;">--recv-keys</span> 951DC1E2<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get update</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> blueman</div></td></tr></tbody></table></div>
<p>Now go to System -> Preferences -> Bluetooth Manager. This should bring up a handy utility:<br />
<a href="http://dancingpenguinsoflight.com/wp-content/uploads/2011/02/bluetooth-manager.png"><img src="http://dancingpenguinsoflight.com/wp-content/uploads/2011/02/bluetooth-manager.png" alt="" title="bluetooth-manager" width="502" height="382" class="aligncenter size-full wp-image-1910" /></a><br />
For the mouse:</p>
<ul>
<li>Right click on entry</li>
<li>Select Pair, passcode by default is &#8220;0000&#8243;</li>
<li>Once paired, right click again and select Connect to Input Service</li>
</ul>
<p>And keyboard:</p>
<ul>
<li>Right click on entry</li>
<li>Select Pair, didn&#8217;t ask for a passcode</li>
<li>Once paired, right click again and select Connect to Input Service</li>
</ul>
<p>After these easy steps both devices started working flawlessly. As it should be.</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/02/fast-and-easy-bluetooth-management-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spruce up your desktop with the National Geographic Photo of the Day</title>
		<link>http://dancingpenguinsoflight.com/2011/02/spruce-up-your-desktop-with-the-national-geographic-photo-of-the-day/</link>
		<comments>http://dancingpenguinsoflight.com/2011/02/spruce-up-your-desktop-with-the-national-geographic-photo-of-the-day/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 21:54:45 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1877</guid>
		<description><![CDATA[[Update, 2011-02-24] Reader Jason Coombs kindly made the necessary changes to get this working on Windows 7! Now I might be shamed into getting it working for Mac OS X as well His changes are here. I&#8217;ve updated my script &#8230; <a href="http://dancingpenguinsoflight.com/2011/02/spruce-up-your-desktop-with-the-national-geographic-photo-of-the-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>[Update, 2011-02-24] Reader Jason Coombs kindly made the necessary changes to get this working on Windows 7! Now I might be shamed into getting it working for Mac OS X as well <img src='http://dancingpenguinsoflight.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  His <a target="_blank" href="https://bitbucket.org/jaraco/jaraco.util/changeset/7cfc6de94873">changes are here</a>. I&#8217;ve updated my script linked below as well. I&#8217;ll add some nicer instructions for Windows users soon .[/Update]</em></p>
<p>I love checking the <a title="NatGeo Photo of the day site" target="_blank" href="http://photography.nationalgeographic.com/photography/photo-of-the-day">National Geographic Photo of the Day page</a> to see what wonderful slice of nature or mankind some intrepid soul has captured and shared. Often a wallpaper-sized image download is provided. I wanted to automate the process of checking the page for a wallpaper link, downloading the file, putting it somewhere appropriate, and setting it as my background. The result is <a target="_blank" title="Background script on GitHub" href="https://github.com/shuckins/sph_code/blob/master/misc-scripts/nat-geo_background-setter.py">this script</a>, which does all that and even:</p>
<ul>
<li>Verifies you have at least 25% free disk space before continuing</li>
<li>Renames the image to the title shown on the page</li>
<li>Creates a dir to hold these images if it doesn&#8217;t exist</li>
</ul>
<p><span id="more-1877"></span></p>
<h2>Windows users</h2>
<p>Download that script and double click assuming Python is installed. </p>
<h2>Linux users</h2>
<p>Download it, set it to be executable (chmod u+x nat-geo_background-setter.py), put it somewhere like /opt. You could add an alias to run it whenever you fancy:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Update path to where you placed the script:</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">newbg</span>=<span style="color: #ff0000;">&quot;/opt/USER/nat-geo_background-setter.py&quot;</span></div></td></tr></tbody></table></div>
<p>If you want it to run every day on Linux you could add a crontab entry:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">crontab <span style="color: #660033;">-e</span><br />
<span style="color: #666666; font-style: italic;"># Inside your crontab:</span><br />
<span style="color: #666666; font-style: italic;"># Set BG to picture of the day</span><br />
<span style="color: #000000;">0</span> <span style="color: #000000;">6</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>USER<span style="color: #000000; font-weight: bold;">/</span>nat-geo_background-setter.py</div></td></tr></tbody></table></div>
<p>Enjoy a bit of nature on your desktop!</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/02/spruce-up-your-desktop-with-the-national-geographic-photo-of-the-day/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Apple’s plans for the enterprise</title>
		<link>http://dancingpenguinsoflight.com/2011/01/apples-plans-for-the-enterprise/</link>
		<comments>http://dancingpenguinsoflight.com/2011/01/apples-plans-for-the-enterprise/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 23:50:06 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Enterprise]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1868</guid>
		<description><![CDATA[I don&#8217;t follow Apple very closely most of the time, but these facts I learned in close proximity recently struck me as pointing to an interesting possibility: Apple has a giant datacenter with no clear publicly released purpose. It&#8217;s one &#8230; <a href="http://dancingpenguinsoflight.com/2011/01/apples-plans-for-the-enterprise/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t follow Apple very closely most of the time, but these facts I learned in close proximity recently struck me as pointing to an interesting possibility:</p>
<ul>
<li>Apple has a <a href="http://gigaom.com/apple/apples-new-north-carolina-data-center-ready-to-roll-2/">giant datacenter</a> with no clear publicly released purpose. It&#8217;s one big server farm and it&#8217;s online now.</li>
<li>Apple has a <a href="http://www.conceivablytech.com/4886/business/apple-to-challenge-google-and-microsoft-with-cloud-os/">cloud OS patent</a>. It&#8217;s most focused on the administration of such an OS with cloud-based, network-booted capabilities. The hardware platform isn&#8217;t specified, but they applied for this back in 2006, before the iPhone was released and well before iPad rumors took flight.</li>
<li>Apple is quietly and quickly <a href="http://www.infoworld.com/t/it-management/what-you-missed-apple-quietly-became-key-enterprise-provider-902">moving into the enterprise space</a>. Not through the server route, or even necessarily through MacBooks and iMacs, but through revolutionary alternative devices such as the iPad.</li>
</ul>
<p>Perhaps Apple plans to release their own cloud-provided OS, enterprise-branded and customized. Securely connected to their sprawling new datacenter, Apple could provide businesses of all sizes with a productivity-enhancing and compliance-increasing platform that corporate users, IT teams, and management might all manage to get behind. There might be team-specific apps that are developed in-house or generated from a series of general template applications that provide commonly-needed functionality. From knowledge workers&#8217; daily activity to retail scenarios various organizations could stand to benefit from devices, interface patterns and quality that users prefer enough to bring in personally.</p>
<p>Comments welcome!</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/01/apples-plans-for-the-enterprise/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Counting columns in a CSV from the CLI on Linux</title>
		<link>http://dancingpenguinsoflight.com/2011/01/counting-columns-in-a-csv-from-the-cli-on-linux/</link>
		<comments>http://dancingpenguinsoflight.com/2011/01/counting-columns-in-a-csv-from-the-cli-on-linux/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 15:49:38 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1847</guid>
		<description><![CDATA[In wrangling some DB exports recently I needed the number of columns in multiple CSVs. It&#8217;s easy enough to just open them in OpenOffice and check the final column number, but I wanted a CLI utility. I even entertained some &#8230; <a href="http://dancingpenguinsoflight.com/2011/01/counting-columns-in-a-csv-from-the-cli-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In wrangling some DB exports recently I needed the number of columns in multiple CSVs. It&#8217;s easy enough to just open them in OpenOffice and check the final column number, but I wanted a CLI utility. I even entertained some notions of wc having a magical option to provide this, but no luck there.</p>
<p>So here&#8217;s a simple function I added to my .bashrc to do the trick:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Displays number of columns (intended for CSV-type files),</span><br />
<span style="color: #666666; font-style: italic;"># pass in separator then filename:</span><br />
<span style="color: #000000; font-weight: bold;">function</span> colcnt <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #007800;">DELIM</span>=<span style="color: #007800;">$1</span>;<br />
&nbsp; &nbsp; <span style="color: #007800;">FILE</span>=<span style="color: #007800;">$2</span>;<br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# of lines | Columns in <span style="color: #007800;">$FILE</span>&quot;</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;(&gt;1 row means there are other separators in the file):&quot;</span><br />
&nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$DELIM</span>&quot;</span> <span style="color: #ff0000;">'{print NF}'</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${FILE}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p><span id="more-1847"></span><br />
It&#8217;s in a function because Bash aliases don&#8217;t accept parameters. It uses the variable NF from awk which is the number of fields in the current record. The number of fields is sorted then unique entries are counted, providing a way to detect rows with different field separators or rows with missing columns. </p>
<p>Say you have a simple csv file called foo.csv:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;|&quot;messssssed&quot;|&quot;up&quot;<br />
&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;,&quot;some cols&quot;,&quot;yay&quot;<br />
&quot;i am&quot;|&quot;messssssed&quot;|&quot;up&quot;</div></td></tr></tbody></table></div>
<p>After you add the function above to your .bashrc open a new shell (I found that sourcing .bashrc did not always update the function definition) and run this:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&gt;</span> colcnt , foo.csv <br />
<span style="color: #666666; font-style: italic;"># of lines | Columns in foo.csv</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">1</span> row means there are other separators <span style="color: #000000; font-weight: bold;">in</span> the <span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">2</span> <span style="color: #000000;">1</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">6</span> <span style="color: #000000;">3</span></div></td></tr></tbody></table></div>
<p>This tells us that six lines had three columns and two lines had one column (as defined by the separator we passed in). If the CSV was consistently formatted (without the pipe-delimited line) you would only see one result row, being the total number of lines followed by the number of columns each line has (8 3).</p>
<p>If there&#8217;s a better/built-in way to do this please share! So far it&#8217;s been easy to use and helpful.</p>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/01/counting-columns-in-a-csv-from-the-cli-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reminder for mysql rubygem install on Ubuntu</title>
		<link>http://dancingpenguinsoflight.com/2011/01/reminder-for-mysql-rubygem-install-on-ubuntu/</link>
		<comments>http://dancingpenguinsoflight.com/2011/01/reminder-for-mysql-rubygem-install-on-ubuntu/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 03:09:10 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1841</guid>
		<description><![CDATA[Quick easy steps to get up and running with ruby, mysql, sqlite, rails, and most especially the mysql gem on a fresh Ubuntu 10.10 64-bit system: 123456789# mysql and dev packages needed for mysql rubygem: sudo apt-get install mysql-server mysql-client &#8230; <a href="http://dancingpenguinsoflight.com/2011/01/reminder-for-mysql-rubygem-install-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Quick easy steps to get up and running with ruby, mysql, sqlite, rails, and most especially the mysql gem on a fresh Ubuntu 10.10 64-bit system:</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># mysql and dev packages needed for mysql rubygem:</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> mysql-server mysql-client libmysqlclient-dev \<br />
libmysqld-dev<br />
<span style="color: #666666; font-style: italic;"># Needed for ruby-debug:</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> ruby1.8-dev <br />
<span style="color: #666666; font-style: italic;"># Rails package includes lots of goodies you'll likely want:</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rails sqlite3 ruby-debug<br />
<span style="color: #666666; font-style: italic;"># And finally the gem:</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql</div></td></tr></tbody></table></div>
    ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2011/01/reminder-for-mysql-rubygem-install-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

