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

<channel>
	<title>Blue Cog Blog &#187; Computer User</title>
	<atom:link href="http://www.bluecog.com/blog/category/computer-user/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bluecog.com/blog</link>
	<description>It's just a freaking blue cog...</description>
	<lastBuildDate>Thu, 22 Dec 2011 01:21:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Tweaking the Bash Prompt</title>
		<link>http://www.bluecog.com/blog/2010/07/03/tweaking-the-bash-prompt/</link>
		<comments>http://www.bluecog.com/blog/2010/07/03/tweaking-the-bash-prompt/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 13:24:30 +0000</pubDate>
		<dc:creator>Bill Melvin</dc:creator>
				<category><![CDATA[Computer User]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.bluecog.com/blog/?p=636</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>A little Saturday morning tweaking.</p>
<p>Based on <a href="http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/">this</a> post at railstips.org, I decided to adjust my Bash prompt by appending the following to my <strong>~/.bashrc</strong> file:</p>
<pre class="brush: bash">
#...

function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2&gt; /dev/null) || return
  echo &quot;(&quot;${ref#refs/heads/}&quot;)&quot;
}

BLACK=&quot;\[\033[0;30m\]&quot;
BLUE=&quot;\[\033[0;34m\]&quot;
VIOLET=&quot;\[\033[1;35m\]&quot;
CYAN=&quot;\[\033[0;36m\]&quot;

PS1=&quot;\n[$CYAN\u@\h:$BLUE\w$VIOLET \$(parse_git_branch)$BLACK]\n\$ &quot;
</pre>
<p>The prompt will now show the name of the branch I am working in when the current directory is part of a Git repository. The original code used yellow, red, and green to highlight parts of the prompt. That messed with my mind when I ran RSpec and saw yellow and red when I was expecting all green. Rather than get used to it, I changed the colors. I also added some newlines to perhaps keep the command line neater when deep in a directory tree.</p>
<p style="text-align: center;"><a href="http://www.bluecog.com/blog/wp-content/uploads/2010/07/terminal_20100703_0909.png"><img class="size-medium wp-image-642 aligncenter" style="border: 1px solid black;" title="Terminal" src="http://www.bluecog.com/blog/wp-content/uploads/2010/07/terminal_20100703_0909-300x139.png" alt="Terminal screen shot" width="300" height="139" /></a></p>
<p>&nbsp;</p>
<p><em>[Update 2010-07-23]</em></p>
<p>After running with the above settings for a while I decided I don&#8217;t care for the colors in the prompt. Don&#8217;t need the square brackets either. I do like seeing the current git branch. That simplifies things a bit.</p>
<pre class="brush: bash">
#...

function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2&gt; /dev/null) || return
  echo &quot;(&quot;${ref#refs/heads/}&quot;)&quot;
}

PS1=&quot;\n\u@\h:\w  \$(parse_git_branch)\n\$ &quot;
</pre>
<p>&nbsp;</p>
<p><em>[Update 2010-09-25]</em></p>
<p>Okay, maybe a little color&#8230;</p>
<pre class="brush: bash">
#...

function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2&gt; /dev/null) || return
  echo &quot;(&quot;${ref#refs/heads/}&quot;)&quot;
}

VIOLET=&quot;\[\033[1;35m\]&quot;
NO_COLOR=&quot;\[\033[0;0m\]&quot;  

PS1=&quot;\n$VIOLET\u@\h:\w  \$(parse_git_branch)$NO_COLOR\n\$ &quot;
</pre>
<p>See. I told you it was &quot;tweaking.&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluecog.com/blog/2010/07/03/tweaking-the-bash-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Docs Backup with GDocBackup</title>
		<link>http://www.bluecog.com/blog/2009/12/31/google-docs-backup-with-gdocbackup/</link>
		<comments>http://www.bluecog.com/blog/2009/12/31/google-docs-backup-with-gdocbackup/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:26:33 +0000</pubDate>
		<dc:creator>Bill Melvin</dc:creator>
				<category><![CDATA[Computer User]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.bluecog.com/blog/?p=521</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>I was searching for a simple way to make local backups of my Google Docs and found <a href="http://code.google.com/p/gdocbackup/">gdocbackup</a> on Google Code. According to the project docs it runs on Windows and Linux (with Mono) so I tried it on both Windows 7 and Ubuntu 9.10 Desktop. </p>
<p>On the Windows 7 PC, I downloaded the installer from the Google Code project page, installed the application, and ran it. After configuring the backup directory and export formats for the documents I executed the backup and it worked fine.</p>
<p>Running it on Ubuntu took a bit more setup since I did not have Mono installed. First I installed the required Mono packages. </p>
<p><code>sudo apt-get install mono-runtime libmono-winforms2.0-cil mono-devel</code></p>
<p>The mono-devel package installs the mozroots utility needed to install a certificate required to access Google Docs (see <a href="http://gs.fhtino.it/gdocbackup/faq">http://gs.fhtino.it/gdocbackup/faq</a>).</p>
<p>Next I imported the Mozilla root certificates into Mono (see <a href="http://manpages.ubuntu.com/manpages/intrepid/man1/mozroots.1.html">http://manpages.ubuntu.com/manpages/intrepid/man1/mozroots.1.html</a>).</p>
<p><code>mozroots --import --sync</code></p>
<p>I downloaded <span style="font-weight:bold;">GDocBackup_0.4.9.71_BIN.zip</span> from the gdocbackup project&#8217;s Downloads page and extracted it to a GDocBak directory I created in my home directory. I also created a Data directory under GDocBak to hold the backup files. I opened a terminal in the GDocBak directory and ran GDocBackup.exe in Mono.</p>
<p><code>mono ./GDocBackup.exe</code></p>
<p>At this point the GDocBackup application worked the same as in Windows 7. It looks a little different but it downloaded the documents without errors. Now I just need to automate the backups. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluecog.com/blog/2009/12/31/google-docs-backup-with-gdocbackup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bookmarks Selective History</title>
		<link>http://www.bluecog.com/blog/2009/09/01/bookmarks-selective-history/</link>
		<comments>http://www.bluecog.com/blog/2009/09/01/bookmarks-selective-history/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 19:40:22 +0000</pubDate>
		<dc:creator>Bill Melvin</dc:creator>
				<category><![CDATA[Computer User]]></category>
		<category><![CDATA[Bookmarking]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.bluecog.com/blog/?p=382</guid>
		<description><![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>Some folks don&#8217;t keep bookmarks in their browsers anymore since you can always use a search engine to find things when you need them. Problem is, often the thing that interests me is not one of the top items in a search result set (even when I <em>can</em> remember the right search terms to use). If I&#8217;m looking for a specific thing I saw before I&#8217;m probably not going to be satisfied with search results showing me similar things but not that specific thing. I still use bookmarks.</p>
<p>I used to try to put bookmarks into folders based on category. That&#8217;s labor intensive always sorting out a categorization every time I create a bookmark. What I&#8217;ve been doing lately is this: When I first open Firefox (doesn&#8217;t have to be Firefox but that&#8217;s my main browser) I create a folder in the Bookmarks Toolbar named for the date such as <em>20090901</em>. That folder is where I&#8217;ll drop any bookmarks collected during the day. I will also review the previous day&#8217;s folder for any items that I want to move to a category folder I already have (usually don&#8217;t move any). I then move the previous day&#8217;s folder to a folder named <em>SelectiveHistory</em> that is one level down from the Bookmarks Toolbar under a folder named Bill.</p>
<p><img class="alignnone size-full wp-image-391" title="selectivehistoryexample3" src="http://www.bluecog.com/blog/wp-content/uploads/2009/09/selectivehistoryexample3.png" alt="selectivehistoryexample3" width="450" height="313" /></p>
<p>This has been working well. I have found that when I want to go back to a web page it is more likely to be a recent one so I don&#8217;t usually have to browse back too far in my SelectiveHistory. Firefox makes it easy to browse the bookmarks tree by simply hovering the pointer. I can also choose Tools &#8211; Organize Bookmarks to open the bookmarks Library and do a search when looking for something not so recent.</p>
<p>I do some maintenance on the SelectiveHistory folder by moving the daily folders into a previous month folder and monthly folders into a previous year folder. Doing so takes little time and not a lot of thought (easy enough to do before the coffee kicks in). I should also mention that I use <a href="http://www.xmarks.com/">Xmarks</a> to synchronize my massive bookmarks collection across the computers I use Firefox on frequently. I really should mention that, because I don&#8217;t think my method of collecting bookmarks described above would work nearly as well without synchronization.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluecog.com/blog/2009/09/01/bookmarks-selective-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

