<?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>Mon, 09 Aug 2010 22:07:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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>Excel web query URLs with dynamic parameters</title>
		<link>http://dancingpenguinsoflight.com/2010/07/excel-web-query-urls-with-dynamic-parameters/</link>
		<comments>http://dancingpenguinsoflight.com/2010/07/excel-web-query-urls-with-dynamic-parameters/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 01:01:32 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Dataviz]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1476</guid>
		<description><![CDATA[Last year I wrote about the ease and utility of pulling data into Excel via web queries. This mechanism has served me well in the interim and has proven to be an effective tool in collecting data for certain kinds &#8230; <a href="http://dancingpenguinsoflight.com/2010/07/excel-web-query-urls-with-dynamic-parameters/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last year I wrote about the ease and utility of <a title="Pulling data into Excel from web queries" href="http://dancingpenguinsoflight.com/2009/07/pulling-data-into-excel-from-web-queries/" target="_blank">pulling data into Excel via web queries</a>. This mechanism has served me well in the interim and has proven to be an effective tool in collecting data for certain kinds of analysis. It&#8217;s not suited for every application, but if the data you are interested in consists of thousands to tens of thousands of rows, it&#8217;s a simple and workable option.</p>
<p>In a recent effort to pull data into an  Excel spreadsheet for further analysis, I needed more flexibility than a static report URL could  provide. The back end could accept parameterized values (e.g. the  desired date range) in the report URLs. I just needed to be able to set these values (initially or through user input) from within the  spreadsheet, then request the needed data. Seems generally simple and useful enough, so I&#8217;ll share what I did.<br />
<span id="more-1476"></span></p>
<h2>Sample Report</h2>
<p>Ignoring most of the particularities of the reporting back end, say the report in question consists of an SQL query:</p>
<div class="codecolorer-container sql 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 /></div></td><td><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">/* Use defaults if no params sent */</span><br />
<span style="color: #993333; font-weight: bold;">SET</span> @beginmonth <span style="color: #66cc66;">=</span> IFNULL<span style="color: #66cc66;">&#40;</span>@begin_month<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">&quot;2000-01-01&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold;">SET</span> @endmonth <span style="color: #66cc66;">=</span> IFNULL<span style="color: #66cc66;">&#40;</span>@end_month<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">&quot;2010-12-31&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold;">SELECT</span> date_format<span style="color: #66cc66;">&#40;</span>date_entered<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'%Y-%m'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> date<span style="color: #66cc66;">,</span> profit_dollars<br />
<span style="color: #993333; font-weight: bold;">FROM</span> main_db<span style="color: #66cc66;">.</span>monthly_profits<br />
<span style="color: #993333; font-weight: bold;">WHERE</span> date<span style="color: #66cc66;">&#40;</span>date_entered<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">BETWEEN</span> @beginmonth <span style="color: #993333; font-weight: bold;">AND</span> @endmonth<br />
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> date <span style="color: #993333; font-weight: bold;">DESC</span>;</div></td></tr></tbody></table></div>
<p>The URL to access it is http://initech.com/reports/total_profits. Using the query above, this would return data from the beginning of 2000 to the end of 2010. To pass in values for the start and end date parameters you would use the URL http://initech.com/reports/total_profits?begin_month=2000-03-01&amp;end_month=2000-06-31. This would limit the data returned to the second quarter of 2000.</p>
<h2>Use in Excel</h2>
<p>So what if you want to use dynamic parameters like these when pulling data into Excel? Let&#8217;s assume you have a spreadsheet already pulling data from the static report URL and displaying results. If you run into trouble, check out <a title="Pulling data into Excel from web queries" href="http://dancingpenguinsoflight.com/2009/07/pulling-data-into-excel-from-web-queries/" target="_blank">my earlier article on the subject</a>. Once that&#8217;s working, right-click the resultant data table in Excel, select Edit Query, and add the parameter names and values in the format ["FieldName"]:</p>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/05/params.png" rel="shadowbox[post-1476];player=img;"><img class="aligncenter size-full wp-image-1631" title="params" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/05/params.png" alt="" width="359" height="304" /></a></p>
<p>FieldName in this case can be whatever you want to call the variable for the user&#8217;s convenience. This format is recognized by Excel and you&#8217;ll be prompted to enter a value. You can enter it yourself of course, or you can select a cell from which to pull the value. You can also specify whether to use the cell for future data refreshes and whether to refresh automatically. These features are key for our intended use. You can set a parameter value in a single cell and have it effect any number of web  queries, across various sheets!</p>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/05/params-selected.png" rel="shadowbox[post-1476];player=img;"><img class="aligncenter size-full wp-image-1632" title="params-selected" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/05/params-selected.png" alt="" width="283" height="166" /></a></p>
<p>Note: This last feature only partially works in Mac Office 2008. A cell&#8217;s value can be selected as a parameter value but after updating it you have to manually refresh all related web queries. In Windows Office 2007, updating the specified cell updates all queries that have this property set, which is great for easing administrative load caused by having to update reports!</p>
<h2>Date format annoyance</h2>
<p>Your backend reporting system might likely expect dates in proper ISO format (YYYY-MM-DD). Excel, in its infinite wisdom, allows &#8220;Date&#8221; typed fields to be one of a myriad of formats, not one of which is proper ISO. So you need to make your date fields Text type and enter the dates as ISO format yourself.</p>
<p><a title="Artlcle on Excel web queries" href="http://www.jkp-ads.com/Articles/WebQuery.asp" target="_blank">This article </a>has additional information on the above approach as well as more screenshots of the various steps.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/07/excel-web-query-urls-with-dynamic-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0: Well-polished, fun to customize</title>
		<link>http://dancingpenguinsoflight.com/2010/07/wordpress-3-0-well-polished-fun-to-customize/</link>
		<comments>http://dancingpenguinsoflight.com/2010/07/wordpress-3-0-well-polished-fun-to-customize/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 03:44:37 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1583</guid>
		<description><![CDATA[After reading about all the exciting new features and improvements packed into WordPress 3.0, I&#8217;ve finally gotten this blog updated to it. Thelonious is one awesome release of WordPress, making this great platform even better! Upgrading I ran into a &#8230; <a href="http://dancingpenguinsoflight.com/2010/07/wordpress-3-0-well-polished-fun-to-customize/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/200px-WordPress_logo.png" rel="shadowbox[post-1583];player=img;"><img class="alignleft size-full wp-image-1601" title="200px-WordPress_logo" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/200px-WordPress_logo.png" alt="" width="200" height="67" /></a>After reading about all the exciting new features and improvements packed into <a title="WordPress 3.0" href="http://wordpress.org/development/2010/06/thelonious/" target="_blank">WordPress 3.0</a>, I&#8217;ve finally gotten this blog updated to it. Thelonious is one awesome release of WordPress, making this great platform even better!<br />
<span id="more-1583"></span></p>
<h2>Upgrading</h2>
<p>I ran into a memory limit issue for PHP when I first tried the upgrade automatically, due to the larger size of this new version. This was easily fixed by following <a title="Fix WP 3.0 upgrade memory error" href="http://www.quickonlinetips.com/archives/2010/06/fix-allowed-memory-size-exhausted-errors-wordpress-3-upgrade/" target="_blank">this post&#8217;s advice</a>. After that I just clicked Upgrade Automatically and what do you know WordPress updated itself properly in no time at all. I then went to the Dashboard and was greeted with the new hotness.</p>
<h2>Themes and such</h2>
<p>As you can see if you&#8217;ve been to this blog before, things look a bit different. This is mostly because it&#8217;s so easy and fast to customize many visual aspects in the new version that, well, it&#8217;s hard to resist tweaking!</p>
<p>I decided to go with the new theme included in WordPress 3.0: <a title="TwentyTen theme page" href="http://wordpress.org/extend/themes/twentyten" target="_blank">TwentyTen</a>. With a variety of attractive headers, six widget areas, and great looking typography fresh out of the box, this is a much improved default theme. One of my favorite features: when editing in Visual Mode, your <a title="Post on WYSIWYG visual mode in 2010" href="http://2010dev.wordpress.com/2010/02/06/wysiwyrg/" target="_blank">post content will appear just like it would in your actual blog</a>! This means no more processes like: make some edits, click save, wait for the save, click preview, check out the preview in a new tab. Just keep working in the same editor and get the real view right away.</p>
<p>You can now also add and edit your blog&#8217;s menus without editing any files through the <a title="Appearance Menus" href="http://codex.wordpress.org/Appearance_Menus_SubPanel" target="_blank">Appearance Menus</a>. The positioning of this through the UI is limited by what your theme supports, but its much easier to customize and get what you actually want into a menu than before.</p>
<h2>Plugins</h2>
<p>Working with plugins is also made a bit easier in WordPress 3.0. You can update all plugins with updates available in a single step. And you get lots of handy info about the upgrade from a single screen. I mean just look at this:</p>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/plugin-upgrade.png" rel="shadowbox[post-1583];player=img;"><img class="aligncenter size-full wp-image-1612" title="plugin-upgrade" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/plugin-upgrade.png" alt="" width="661" height="372" /></a>Awesomesauce. And when you are done, it shows you the status all at once as well, so you know if that big batch of upgrade cookies came out alright or not:</p>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/upgrade-complete.png" rel="shadowbox[post-1583];player=img;"><img class="aligncenter size-full wp-image-1614" title="upgrade-complete" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/07/upgrade-complete.png" alt="" width="546" height="271" /></a>In this and many other areas, the admin interface has been streamlined, making just about everything easier to get to. And the icing on the cake: everything is faster anyway! I didn&#8217;t make any other changes to my server, but since the upgrade interacting with everything in the admin interface has been much snappier. Add to that a whopping 1200 bug fixes and this is a great milestone release.</p>
<h2>New Flexibility</h2>
<p>Another big feature of 3.0 is <a title="Custom Post Types" href="http://codex.wordpress.org/Custom_Post_Types" target="_blank">Custom Post Types</a>. This allows you to register new types aside from just the default Posts, Attachments, Pages, Revisions and Nav Menus. You can define the custom type&#8217;s attributes, how to display it, and more. This would be great for more business-oriented blogs, or even simply highly-customized personal sites.</p>
<p>WordPress 3.0 is an incredible update! I highly recommend upgrading to it.</p>
<p><strong> </strong></p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/07/wordpress-3-0-well-polished-fun-to-customize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Osmos: beautiful, relaxing, and cross-platform ambient game</title>
		<link>http://dancingpenguinsoflight.com/2010/06/osmos-beautiful-relaxing-and-cross-platform-ambient-game/</link>
		<comments>http://dancingpenguinsoflight.com/2010/06/osmos-beautiful-relaxing-and-cross-platform-ambient-game/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 04:13:30 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1571</guid>
		<description><![CDATA[I came across a game called Osmos by Hemisphere Games from this story posted on Slashdot. Their experience of porting the game Osmos to Linux and the sales they had witnessed thereafter was what interested me initially. They had found &#8230; <a href="http://dancingpenguinsoflight.com/2010/06/osmos-beautiful-relaxing-and-cross-platform-ambient-game/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across a game called <a title="Osmos home" href="http://www.hemispheregames.com/osmos/" target="_blank">Osmos by Hemisphere Games</a> from <a title="Osmos Linux sales numbers" href="http://www.hemispheregames.com/2010/06/23/linux-the-numbers/" target="_blank">this story</a> posted on Slashdot. Their experience of porting the game Osmos to Linux and the sales they had witnessed thereafter was what interested me initially. They had found the decision to be a profitable one. I was pleased and a bit surprised at this. Then I saw there was demo for the game running on Linux. It installed quickly, worked perfectly, and had stunning visuals, along with a wonderfully chill soundtrack. Often gaming on Linux is manifested through Wine, workarounds, resignation to VMs running other OSes, or simply putting up with games that aren&#8217;t really that attractive.</p>
<p><a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/06/zoomed-in_ambient-welcome.png" rel="shadowbox[post-1571];player=img;"><img class="alignleft size-full wp-image-1574" style="float: left; margin: 10px;" title="sm-zoomed-in_ambient-welcome" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/06/sm-zoomed-in_ambient-welcome.png" alt="sm-zoomed-in_ambient-welcome" width="300" height="208" /></a>Osmos is a wonderfully fun and good-looking game. I was so impressed by the demo (a game that starts off with Newton in Latin deserves my attention) that I purchased the full game. I might add this is only $10 and allows you access to DRM-free versions on Windows, Mac, and Linux, as well as a download of an ambient album used in the game! Quite a deal for a game that can provide many hours of enjoyment. It&#8217;s like a simpler version of the first stage of Spore, with more interesting novel elements and music reminiscent of Blade Runner. <a href="http://dancingpenguinsoflight.com/wp-content/uploads/2010/06/full-screen_force-reception.png" rel="shadowbox[post-1571];player=img;">Full size screenshot here</a>.</p>
<p>Go check it out, it&#8217;s a lot of fun. And if you are on Linux and want to see more great games for a great platform, consider buying the game!</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/06/osmos-beautiful-relaxing-and-cross-platform-ambient-game/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Review of Hacking Vim 7.2</title>
		<link>http://dancingpenguinsoflight.com/2010/06/review-of-hacking-vim-7-2/</link>
		<comments>http://dancingpenguinsoflight.com/2010/06/review-of-hacking-vim-7-2/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 01:24:43 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Book Review]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1480</guid>
		<description><![CDATA[Hacking Vim 7.2 by Kim Schulz is filled with a variety of useful explanations and helpful tips for Vim users wanting to improve their efficiency and learn more about their editor. While I&#8217;ve enjoyed finding new and better ways to &#8230; <a href="http://dancingpenguinsoflight.com/2010/06/review-of-hacking-vim-7-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin-right: 10px;" title="vim_logo" src="http://dancingpenguinsoflight.com/wp-content/uploads/2009/07/vim_logo.png" alt="vim_logo" width="125" height="125" /><a title="Hacking Vim on Packt" href="https://www.packtpub.com/hacking-vim-7-2/book" target="_blank"><em>Hacking Vim 7.2</em></a> by Kim Schulz is filled with a variety of useful explanations and helpful tips for <a title="vim homepage" href="http://www.vim.org/" target="_blank">Vim</a> users wanting to improve their efficiency and learn more about their editor. While I&#8217;ve enjoyed finding <a title="DPOL posts on Vim" href="http://dancingpenguinsoflight.com/?s=vim" target="_blank">new and better ways to use Vim</a> for some time, I still learned quite a lot from this book.</p>
<p>If you use Vim only to edit text files when you happen to be  logged  into a CLI: mosey on along, this isn&#8217;t the book for you. If you   currently use Vim regularly and want to improve your knowledge and effectiveness with it: your time reading this book will be well-spent. If you&#8217;ve somehow never heard of   Vim but are enraptured by the idea of a text editor that can be an effective IDE in   addition to allowing you to play Tetris and Rubik&#8217;s Cube: you might like this book too.<br />
<span id="more-1480"></span><br />
At first this book seemed rather short for such a  potentially expansive topic. In the  end I found this to be mostly a virtue  rather than a problem, as the amount  of information presented is, in fact,  voluminous. A more comprehensive  approach likely would have been too  hefty and less  effective. It doesn&#8217;t pretend to be a  manual for Vim. Instead it  illustrates the best approaches for various issues and situations, suggests improvements  on more common operations, and provides lots of  references to external  resources (primarily Vim internal help and vim.org) to  learn more. Examples and illustrations provide insight into some of Vim&#8217;s lesser known abilities, while commonly used ones are explained and presented in new and useful ways. Groups of features resolve into <em>solutions</em>.</p>
<h2>Chapter by Chapter</h2>
<h3><strong>Chapter 1, Getting Started with Vim</strong></h3>
<p>Primarily a history of the Vim editor. Useful to expand the knowledge of Vim fans, but not really pertinent to <em>hacking</em> your beloved editor. Would probably have been better as an appendix or excised entirely.</p>
<h3><strong>Chapter 2</strong>, <strong>Personalizing Vim</strong></h3>
<p>Editing your Vim config, customizing fonts, colors, menu buttons and other UI elements. Lots of great material for tuning the visual appearance. More about vim.org and other resources for colorschemes (such as <a title="Vim colorscheme test site" href="http://vimcolorschemetest.googlecode.com/svn/html/index-c.html" target="_blank">this gem</a>) would have been helpful. The ability to add tooltip balloons was new to me and quite exciting. Schulz provides a number of great examples for their use. The discussion of abbreviations was a bit confusing, especially considering the recommendation of the more intuitive snippets approach in Chapter 4.</p>
<h3><strong>Chapter 3, Better Navigation</strong></h3>
<p>By now you might already be feeling overwhelmed by the number of key commands to remember. I recommend starting a cheat sheet of those you find especially interesting. Speaking of that, perhaps it&#8217;s just my predilections and lack of a perfect memory, but the vast number of code navigation keys was just a bit too much. Sure, &#8220;extra keys pressed equals extra time wasted&#8221;, but what about extra time sorting through key commands in your thoughts? Still, plenty of tips should be mind-blowing if new to you. Jumping to files named in the text of the current file, for example, is really handy. The information about search improvements, both in user files and in the help system, was quite good. I&#8217;ve yet to really use signs or marks, but found their explanation here illuminating.</p>
<h3><strong>Chapter 4, Production (Productivity?) Boosters</strong></h3>
<p>Templates! Templates are awesome, and this was a welcome introduction to a topic <a title="DPOL post on Bash scripting, template" href="http://dancingpenguinsoflight.com/2009/03/vim-for-bash-scripting-a-happier-union/" target="_blank">I&#8217;ve barely scratched</a> in my Vim journey. I&#8217;ve also not used placeholders in templates before, which look to be quite useful. Tag lists and essential plugins for their use are explained, providing an effective presentation of this feature. I was getting a little worried around pg. 86, as the number of Ctrl + x, Ctrl + SOME_KEY commands started to get cumbersome. Then came the explanation of triggering all completion types using a single key, which was quite refreshing. Complete using dictionaries, words in the current document, language files, and more, all using a single key. The SuperCleverTab function will be a very welcome addition to my configuration. Until seeing the example about macros, I never really felt how useful they might be. This definitely convinced me.</p>
<p>But this meaty chapter isn&#8217;t over yet! Sessions felt rather opaque to me before reading this section, and I think they will now definitely serve a role for me. No more ritual of opening the right files, folding them just how I want, etc every morning. Undo branching&#8230; I still find this rather too complicated and marginal of a feature to care about. But the examples were at least explanatory. Folding is a great eye-saver, and the coverage was adequate. I&#8217;m still not really a fan of vimdiff, as there are other diff utilities out there that make the process faster and more intuitive to me. One exception is finding the diff between the current buffer and the saved file, which is very handy and not something available in most editors for sure! I hadn&#8217;t opened remote files in Vim directly before, so the section on this at the end of this chapter was quite useful.</p>
<h3><strong>Chapter 5, Advanced Formatting</strong></h3>
<p>I felt mostly ambivalent about the beginning of this chapter. To me, if you want text aligned a certain way, or want to create proper lists and use other more advanced document formatting features, you should use a word processor. Adding whitespace to my text files for alignment&#8217;s sake doesn&#8217;t strike me as a good idea.</p>
<p>The second part covering formatting pertinent to coding was much more useful. I&#8217;ve used things like autoindent and formatting of pasted code for a while now, and they are quite essential to sanity. Great coverage for those new to these features. Integration of external formatting tools such as Tidy is also described. <strong></strong></p>
<h3><strong>Chapter 6, Basic Vim Scripting</strong></h3>
<p>&#8220;<em>Now</em> we get to it&#8221; was my feeling starting this chapter. There&#8217;s some very helpful stuff in here, but it&#8217;s strangely organized and should have been moved or at least mentioned earlier in the book to provide the most benefit. Some critically handy items: explanation of Vim configuration file directories, how to properly override layers of configuration, Vimball installation, syntax highlighting and colorscheme creation. Then&#8230; comes an introductory language tutorial. Honestly, it&#8217;s pretty dull and mostly elementary. I would have rather this been moved to an appendix mentioned early in the book. It does provide broad coverage of the basics one would need to start writing Vim scripts.</p>
<h3><strong>Chapter 7, Extended Vim Scripting</strong></h3>
<p><strong></strong>Everything you need to know about actually writing Vim scripts: suggested code format, function structure, adding key mappings, detecting OS and Vim version, debugging and distributing scripts, documentation, even integrating programming languages like Python and Ruby! This is certainly a great reference to get started with Vim scripting. Schulz also gives an example script wrapping up a number of these points, providing something like a Vim scripter&#8217;s &#8220;Hello World&#8221;.</p>
<h3><strong>Appendix A, Vim Can Do Everything</strong></h3>
<p>Examples of the many and varied things you can do with Vim, such as Tweet and play Tetris. Provides amusement, but not a lot of value. The section on Vim as an IDE should really have been expanded to an entire chapter or appendix considering the likely audience for this book.</p>
<h3><strong>Appendix B, Vim Configuration Alternatives</strong></h3>
<p>A number of tips on how to keep your Vim configuration organized. Spends time explaining a system of scripts created by Jos van RisWick that allows the user to make changes to their configuration from GUI menus and make them permanent, instead of editing config files. I had never heard of this and found it quite interesting.</p>
<p>The last few pages deal with storing your Vim configuration online. While I whole-heartedly agree with the intent, the particular manifestation presented is rather terrible. Using this setup, the user&#8217;s .vimrc would be downloaded <em>every time</em> Vim is opened. Then it still has to be parsed, which for heavily customized setups can already take a moment. Not the best when you&#8217;re looking for a lean editor. And what about the legion of scripts and other supporting files outside .vimrc? I think not. My approach to the problem is to keep all of my Vim configuration files inside an SCM system, checking it out on each system the first time I want to use Vim.</p>
<h2>Issues</h2>
<ul>
<li><strong>Confused structure</strong>: Chapters 6 and 7 felt rather strangely divided  in  themselves, and I felt most of the content should have been provided   earlier. Having a better knowledge of the syntax and nature of ex   commands/Vim scripting would have made the content throughout the book   more understandable. I felt I was mostly taking the syntax in the code provided for   granted, without feeling comfortable enough about all the components that I could have written something of my own design.</li>
<li><strong>Typos</strong>: The text would have greatly benefited from another round of   copy-editing. Most of the errors weren&#8217;t very distracting. There were, however, a number of typos in the code provided that   were more problematic, especially for a work on an editor that can be   rather picky about commands. For a first edition, these aren&#8217;t overly   numerous.</li>
<li><strong>Lack of color diagrams</strong>: I&#8217;m all for using black and  white images  when they will suffice, but when providing illustrations of  *color*  highlighting files, images without color are downright useless!  I was  rather surprised at this oversight, first appearing in chapter 2,  then  in multiple places in chapter 6. They could have at least linked  to  color images online.</li>
</ul>
<h2>Conclusion</h2>
<p>All in all this was a very useful  treasure trove of tips. Some I&#8217;ve  already added to my repertoire, and  more I&#8217;m trying to understand  better. In fact, I learned so much from it  that I decided I will likely  need to drop most of my current Vim config  and remake it cleanly. I  know I&#8217;m not alone in collecting bits and  pieces of configuration for  this wonderful editor, in a fashion  occasionally reminiscent of a  deranged hermit crab. Now that I have a  more solid understanding I can  rebuild it quickly and effectively.</p>
<p>In summary, I agree with <a title="Brian Carper's Hacking Vim 7.2 review" href="http://briancarper.net/blog/review-hacking-vim-72" target="_blank">Brian Carper</a>:</p>
<blockquote><p>The best you can hope for in a book is a broad outline to point the way  toward features that you didn&#8217;t know much about. Hacking Vim 7.2  achieves this goal.</p></blockquote>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/06/review-of-hacking-vim-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skip the distractions: Focus on web page content with Readability</title>
		<link>http://dancingpenguinsoflight.com/2010/06/skip-the-distractions-focus-on-web-page-content-with-readability/</link>
		<comments>http://dancingpenguinsoflight.com/2010/06/skip-the-distractions-focus-on-web-page-content-with-readability/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 22:38:36 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1502</guid>
		<description><![CDATA[Often when trying to catch up on the news or just researching something online, I come across article pages filled with distractions. Ads before the article, ads around the article, ads below the article, ads in the article, obscene sidebars &#8230; <a href="http://dancingpenguinsoflight.com/2010/06/skip-the-distractions-focus-on-web-page-content-with-readability/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: right; " title="stupid-ads" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/06/stupid-ads.png" alt="stupid-ads" width="246" height="236" />Often when trying to catch up on the news or just researching something online, I come across article pages filled with distractions. Ads before the article, ads around the article, ads below the article, ads in the article, obscene sidebars with three or four columns, animated neon dancing bears trying to sell me railroad testing equipment at a Ruby on Rails site, you get the idea. Sure, you could use something like <a title="FlashBlock add-on page" href="https://addons.mozilla.org/en-US/firefox/addon/433/" target="_blank">FlashBlock</a> and get the worst of these out of the way. But often you&#8217;re still left with a misshapen mass of text whose designer might have had a number of priorities before getting to clarity of presentation.</p>
<p>Enter <a title="Readability homepage" href="http://lab.arc90.com/experiments/readability/" target="_blank">Readability</a>:</p>
<blockquote><p><em>Readability</em> is a simple tool that makes reading on the Web more enjoyable by removing the clutter around what you&#8217;re reading.</p></blockquote>
<p>Huzzah! Simply go to the <a title="Readability homepage" href="http://lab.arc90.com/experiments/readability/" target="_blank">Readability site</a> and try out the different options for how you want rendered pages to look. You can change things like font size and style, as well as margin. You can even make the colors inverted if you prefer a dark background. Then drag the indicated button to your bookmark toolbar and click it whenever you are on a page you want to be more readable. After discovering Readability, I&#8217;ve been using it every day.</p>
<p>I was interested to see that the new version of Safari released today (version 5) added a feature called <a title="Safari Reader info" href="http://www.apple.com/safari/whats-new.html#reader" target="_blank">Safari Reader</a>. This serves the same purpose as Readability, just built into the browser&#8217;s address bar. It doesn&#8217;t appear that Safari Reader allows you to set more advanced options like the appearance of the font, but it does have the added benefit of remembering your zoom level.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/06/skip-the-distractions-focus-on-web-page-content-with-readability/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Snow Leopard… with a flashlight</title>
		<link>http://dancingpenguinsoflight.com/2010/04/installing-snow-leopard-with-a-flashlight/</link>
		<comments>http://dancingpenguinsoflight.com/2010/04/installing-snow-leopard-with-a-flashlight/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 22:41:17 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[MacBook]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1465</guid>
		<description><![CDATA[I recently had occasion to install Snow Leopard on an older MacBook Pro. I put in the install DVD and started the process going. After it rebooted, the startup sound played, the Apple logo showed, the activity animation spun around &#8230; <a href="http://dancingpenguinsoflight.com/2010/04/installing-snow-leopard-with-a-flashlight/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had occasion to install Snow Leopard on an older MacBook Pro. I put in the install DVD and started the process going. After it rebooted, the startup sound played, the Apple logo showed, the activity animation spun around for a bit&#8230; then the screen went black. I let it sit for a while, assuming things would happily re-appear. No such luck. The machine was running and sounded active, but nothing ever appeared on the screen.</p>
<p>After some consulting with good friend Google, I gathered that this same behavior was witnessed by a number of people (<a href="http://www.tongfamily.com/archives/2009/08/snow-leopard-is-out-and-here-are-the-bugs/" target="_blank">blog</a>, <a href="http://forums.macrumors.com/showthread.php?t=774843" target="_blank">forums</a>). Older MacBooks upgrading to Snow Leopard sometimes apparently fail to engage the backlight.</p>
<p>Thankfully, there was a lo-tech and amusing workaround: a flashlight!<br />
<span id="more-1465"></span><br />
<img class="aligncenter size-full wp-image-1468" title="snow-leopard-install" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/03/snow-leopard-install.JPG" alt="snow-leopard-install" width="700" height="512" /></p>
<p>With the assistance of this external lighting I could see enough of the install screens to complete the process. It&#8217;s easiest to see holding the light not too close to the screen and at a steep angle to avoid glare. Not that anything really helps, this is an annoying and slow process. Finding the mouse cursor by having to scan the whole screen bit by bit, not so fun.</p>
<p>Joyfully, after the final reboot, the backlight returned from its slumber:</p>
<p><img class="aligncenter size-full wp-image-1469" title="post-install" src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/03/post-install.JPG" alt="post-install" width="700" height="449" /></p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/04/installing-snow-leopard-with-a-flashlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with “could not create shared memory segment” from postgres on Ubuntu</title>
		<link>http://dancingpenguinsoflight.com/2010/03/dealing-with-could-not-create-shared-memory-segment-from-postgres-on-ubuntu/</link>
		<comments>http://dancingpenguinsoflight.com/2010/03/dealing-with-could-not-create-shared-memory-segment-from-postgres-on-ubuntu/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 14:44:49 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1458</guid>
		<description><![CDATA[After installing postgresql-8.4 from the Ubuntu repos on an Ubuntu 9.10 machine, I received the following when the daemon tried to start up: 1234567&#160;* The PostgreSQL server failed to start. Please check the log output: FATAL: &#160;could not create shared &#8230; <a href="http://dancingpenguinsoflight.com/2010/03/dealing-with-could-not-create-shared-memory-segment-from-postgres-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After installing postgresql-8.4 from the Ubuntu repos on an Ubuntu 9.10 machine, I received the following when the daemon tried to start up:</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 /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;* The PostgreSQL server failed to start. Please check the log output:<br />
FATAL: &nbsp;could not create shared memory segment: Invalid argument<br />
DETAIL: &nbsp;Failed system call was shmget(key=5433001, size=35233792, 03600).<br />
HINT: &nbsp;This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. &nbsp;You can either reduce the request size or reconfigure the kernel with larger SHMMAX. &nbsp;To reduce the request size (currently 35233792 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 13).<br />
&nbsp; &nbsp; If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.<br />
&nbsp; &nbsp; The PostgreSQL documentation contains more information about shared memory configuration.<br />
[fail]</div></td></tr></tbody></table></div>
<p>Fail indeed. Here&#8217;s the fix:</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: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf-orig <span style="color: #000000; font-weight: bold;">&amp;&amp;</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'echo &quot;#\n# For postgres\nkernel.shmmax = 104857600&quot; &gt;&gt; /etc/sysctl.conf'</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> sysctl <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>postgresql-<span style="color: #000000;">8.4</span> start</div></td></tr></tbody></table></div>
<p>This increases a particular kernel parameter to allow postgres enough memory to start. Yay for poor defaults&#8230;</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/03/dealing-with-could-not-create-shared-memory-segment-from-postgres-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tune MySQL like a pro with MySQLTuner</title>
		<link>http://dancingpenguinsoflight.com/2010/03/tune-mysql-like-a-pro-with-mysqltuner/</link>
		<comments>http://dancingpenguinsoflight.com/2010/03/tune-mysql-like-a-pro-with-mysqltuner/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 23:22:10 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1447</guid>
		<description><![CDATA[I don&#8217;t know why I didn&#8217;t know about this before (or why I forgot about it, more likely), but I came across MySQLTuner recently and was most pleasantly surprised. It&#8217;s a Perl script that only requires your MySQL user and &#8230; <a href="http://dancingpenguinsoflight.com/2010/03/tune-mysql-like-a-pro-with-mysqltuner/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why I didn&#8217;t know about this before (or why I forgot about it, more likely), but I came across <a title="MySQLTuner blog" target="_blank" href="http://blog.mysqltuner.com/">MySQLTuner</a> recently and was most pleasantly surprised. It&#8217;s a Perl script that only requires your MySQL user and password to provide detailed and useful checks of a running MySQL instance. First though, check out the awesome URL you <a title="MySQLTuner download" target="_blank" href="http://blog.mysqltuner.com/download/">download it</a> at:</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: #c20cb9; font-weight: bold;">wget</span> mysqltuner.pl</div></td></tr></tbody></table></div>
<p>Yeah, that&#8217;s the actual URL that works. Pretty sweet.</p>
<p>Anyway, next you make it executable, run it, enter creds:</p>
<p><img src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/03/Screenshot1.png" alt="Get MySQLTuner running" title="MySQLTuner_first-steps" width="613" height="414" class="size-full wp-image-1452" /></p>
<p>Then the goodies appear:</p>
<p><img src="http://dancingpenguinsoflight.com/wp-content/uploads/2010/03/results.png" alt="MySQLTuner Results" title="MySQLTuner_results" width="640" height="630" class="size-full wp-image-1449" /></p>
<p>Oh, that query_cache_limit is tiny! At this point, no changes have been made to your setup. But at a glance you get helpful stats, validate that changes you&#8217;ve decided to make are in place, and get alerted to potential improvements.</p>
<p>If I knew Perl now and refreshed my MySQL tuning knowledge, I&#8217;d love to help as a <a href="http://blog.mysqltuner.com/2010/01/searching-for-a-new-mysqltuner-maintainer/">maintainer</a> of this lovely script. Maybe sometime soon&#8230;</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/03/tune-mysql-like-a-pro-with-mysqltuner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting multiple images to one PDF on Linux</title>
		<link>http://dancingpenguinsoflight.com/2010/02/converting-multiple-images-to-one-pdf-on-linux/</link>
		<comments>http://dancingpenguinsoflight.com/2010/02/converting-multiple-images-to-one-pdf-on-linux/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 18:12:26 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1440</guid>
		<description><![CDATA[There are a number of ways you can go about the process of converting image files into PDFs, most simply by opening a given image and printing it. You can select &#8220;Print to file&#8221; instead of a printer device, PDF &#8230; <a href="http://dancingpenguinsoflight.com/2010/02/converting-multiple-images-to-one-pdf-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are a number of ways you can go about the process of converting image files into PDFs, most simply by opening a given image and printing it. You can select &#8220;Print to file&#8221; instead of a printer device, PDF format is the default for this type of output. But say you have a folder full of images and you want to make one big PDF of them. Here&#8217;s how you can do that:</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 /></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;">cd</span> FOLDER_WITH_IMAGES<br />
<span style="color: #007800;">FILES</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">*</span>jpg<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> temp <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> temp<br />
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$FILES</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #007800;">BASE</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$file</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.jpg//g'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; convert ..<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$BASE</span>.jpg <span style="color: #007800;">$BASE</span>.pdf; <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span><br />
pdftk <span style="color: #000000; font-weight: bold;">*</span>pdf <span style="color: #c20cb9; font-weight: bold;">cat</span> output ..<span style="color: #000000; font-weight: bold;">/</span>FINAL_NAME.pdf <span style="color: #000000; font-weight: bold;">&amp;&amp;</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<br />
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> temp</div></td></tr></tbody></table></div>
<p>This loops through all the .jpg images in the directory and converts them to a PDF file of the same name. Once that is done they are all combined into FINAL_NAME.pdf by <a title="pdftk home" href="http://www.accesspdf.com/pdftk/" target="_blank">pdftk</a>, a handy PDF utility. The temp dir business is there to make the temp PDF file removal easier.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/02/converting-multiple-images-to-one-pdf-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>git tip: Ignoring modifications to tracked files</title>
		<link>http://dancingpenguinsoflight.com/2010/02/git-tip-ignoring-modifications-to-tracked-files/</link>
		<comments>http://dancingpenguinsoflight.com/2010/02/git-tip-ignoring-modifications-to-tracked-files/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 04:13:29 +0000</pubDate>
		<dc:creator>Samuel Huckins</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[RubyOnRails]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[VCS]]></category>

		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=1427</guid>
		<description><![CDATA[Problem You have a file already tracked in your git repository, but you don&#8217;t want future modifications to it to be tracked. A perfect example of this is the DB config file for Rails projects (config/database.yml). You&#8217;ll probably want to &#8230; <a href="http://dancingpenguinsoflight.com/2010/02/git-tip-ignoring-modifications-to-tracked-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p><em>You have a file already tracked in your git repository, but you don&#8217;t want future modifications to it to be tracked.</em></p>
<p>A perfect example of this is the DB config file for Rails projects (config/database.yml). You&#8217;ll probably want to track this to keep the production and staging configuration stored and consistent. But it&#8217;s quite likely that individual development configurations will be different. Having a commit for each developer adding their own local configuration and thereby polluting it for others when they push is just silly.</p>
<h2>Solution</h2>
<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: #c20cb9; font-weight: bold;">git</span> update-index <span style="color: #660033;">--assume-unchanged</span> FILENAME</div></td></tr></tbody></table></div>
<h2>The fun details</h2>
<p>I had initially thought that <a title="git-ignore docs" href="http://ftp.cc.uoc.gr/pub/software/scm/git/docs/gitignore.html" target="_blank">git-ignore</a> was the thing to use for this. That was wrong: git-ignore&#8217;s purpose is to allow ignoring of <em>untracked</em> files. In the case of the Rails DB conf example above, the file is already tracked. It has the instance information that needs to be shared and now we want to add local development details. Since it&#8217;s tracked, any modifications are going to be picked up by <a title="git-status docs" href="http://www.kernel.org/pub/software/scm/git/docs/git-status.html" target="_blank">git-status</a>. When you do a commit including changes to tracked files listed in .gitignore, the changes do indeed get pushed, which isn&#8217;t what we want.</p>
<p>When looking around for solutions to this, I saw &#8220;git rm &#8211;cached FILENAME&#8221; suggested as a way to stop tracking currently tracked files. And it does this, but it also deletes the file in the commit, which isn&#8217;t what we want either.</p>
<p><a title="git update-index man page" href="http://kernel.org/pub/software/scm/git/docs/v1.0.13/git-update-index.html">git update-index</a> allows you to alter your <a title="Post on git's staging area" href="http://www.gitready.com/beginner/2009/01/18/the-staging-area.html" target="_blank">staging area</a> more manually than usual. With it you can perform a wide range of operations not otherwise possible through standard commands. Continuing with the Rails DB conf example, here&#8217;s what the workflow would look like:</p>
<ol>
<li>config/database.yml with permanent instance info is added, committed, and pushed</li>
<li>Application code is pulled down by new developer</li>
<li>Local modifications made to database.yml for new developer&#8217;s local DB setup</li>
<li>git update-index &#8211;assume-unchanged config/database.yml</li>
</ol>
<p>Thereafter, the changes to conf/database.yml won&#8217;t appear in status or get committed. You can continue making and committing other changes, going about business as usual. But any changes to config/database.yml won&#8217;t ever appear.</p>
<p>In case you decide you <em>do</em> want to start tracking changes on a file previously ignored, just run:</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: #c20cb9; font-weight: bold;">git</span> update-index <span style="color: #660033;">--no-assume-unchanged</span> FILENAME</div></td></tr></tbody></table></div>
<p>Thereafter changes to FILENAME will appear in git-status.</p>
<h2>Gotcha</h2>
<p>The annoying part about this solution is that it has to be run against every new checkout of the repo with the files whose modifications should not be tracked. The command sets a particular bit per checkout, and it&#8217;s not passed on to new checkouts.</p>
<p>Just as I was finishing up some fact checking for this write-up, I came across <a href="http://justaddwater.dk/2009/12/07/how-to-make-git-ignore-files-that-already-exist-in-your-project/" target="_blank">Jesper Rønn-Jensen&#8217;s post</a> on this exact topic. If only it had come up in my initial searches! Here&#8217;s hoping the next searcher has better luck.</p>
   ]]></content:encoded>
			<wfw:commentRss>http://dancingpenguinsoflight.com/2010/02/git-tip-ignoring-modifications-to-tracked-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
