<?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>devblog</title>
	<atom:link href="http://devblog.bluefuton.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.bluefuton.com</link>
	<description>small snippets of webmonkey wisdom</description>
	<lastBuildDate>Thu, 19 Aug 2010 10:49:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Redirect the output of a command to a file when using sudo</title>
		<link>http://devblog.bluefuton.com/2010/08/redirect-the-output-of-a-command-to-a-file-when-using-sudo/</link>
		<comments>http://devblog.bluefuton.com/2010/08/redirect-the-output-of-a-command-to-a-file-when-using-sudo/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 10:49:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[append]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=529</guid>
		<description><![CDATA[Rather than > or >>, use tee. Redirecting the output of commands run with sudo requires a different approach. For instance consider sudo ls > /root/somefile will not work since it is the shell that tries to write to that file. You can use ls &#124; sudo tee -a /root/somefile to append, or ls &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>Rather than > or >>, use <a href="http://en.wikipedia.org/wiki/Tee_(command)">tee</a>.</p>
<blockquote><p>Redirecting the output of commands run with sudo requires a different approach. For instance consider <code>sudo ls > /root/somefile</code> will not work since it is the shell that tries to write to that file. You can use <code>ls | sudo tee -a /root/somefile</code> to append, or <code>ls | sudo tee /root/somefile</code> to overwrite contents.</p></blockquote>
<p>From <a href="https://help.ubuntu.com/community/RootSudo">https://help.ubuntu.com/community/RootSudo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/08/redirect-the-output-of-a-command-to-a-file-when-using-sudo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion branching best practice</title>
		<link>http://devblog.bluefuton.com/2010/08/subversion-branching-best-practice/</link>
		<comments>http://devblog.bluefuton.com/2010/08/subversion-branching-best-practice/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 09:39:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=527</guid>
		<description><![CDATA[Most new code is checked into the trunk.  In general, our developers try to never &#8220;break the tree&#8221;.  Anyone who checks in code which causes the trunk builds to fail will be the recipient of heaping helpings of trash talk and teasing until he gets it fixed.  The trunk should always build, and as much [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Most new code is checked into the trunk.  In general, our developers try to never &#8220;break the tree&#8221;.  Anyone who checks in code which causes the trunk builds to fail will be the recipient of heaping helpings of trash talk and teasing until he gets it fixed.  The trunk should always build, and as much as possible, the resulting build should always work.</p>
<p>Most new code is checked into the trunk. The trunk is the place where active development of new features is happening.  The trunk could be described as &#8220;basically unstable&#8221;. In our situation, the stability of the trunk build fluctuates over the months during our development cycle.</p>
<p>During the early and middle parts of a development cycle, the trunk is often not very stable at all.  As we approach alpha, beta and final release, things settle down and the trunk gets more and more stable.</p>
<p>At the moment of release, a branch gets created.  This branch becomes our maintenance tree for that release.  Our current maintenance branch is called &#8220;3.0&#8243;, since that&#8217;s the current major version number of our product.  When we need to do a bug fix or patch release, it is done in the maintenance branch.  Each time we do a release out of the maintenance branch (like 3.0.2), we apply a tag.</p>
<p>After the maintenance branch is created, the trunk once again becomes &#8220;basically unstable&#8221;.  Developers start adding the risky code changes we didn&#8217;t want to include in the release.  New feature work begins.  The cycle starts over and repeats itself.</p></blockquote>
<p>From <a href="http://www.ericsink.com/scm/scm_branches.html">http://www.ericsink.com/scm/scm_branches.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/08/subversion-branching-best-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List your Apache virtual hosts</title>
		<link>http://devblog.bluefuton.com/2010/05/list-your-apache-virtual-hosts/</link>
		<comments>http://devblog.bluefuton.com/2010/05/list-your-apache-virtual-hosts/#comments</comments>
		<pubDate>Fri, 21 May 2010 08:48:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/2010/05/list-your-apache-virtual-hosts/</guid>
		<description><![CDATA[apache2ctl -t -D DUMP_VHOSTS]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">apache2ctl <span style="color: #660033;">-t</span> <span style="color: #660033;">-D</span> DUMP_VHOSTS</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/05/list-your-apache-virtual-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy a large directory of files using ls and xargs</title>
		<link>http://devblog.bluefuton.com/2010/05/copy-a-large-directory-of-files-using-ls-and-xargs/</link>
		<comments>http://devblog.bluefuton.com/2010/05/copy-a-large-directory-of-files-using-ls-and-xargs/#comments</comments>
		<pubDate>Thu, 13 May 2010 10:00:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=524</guid>
		<description><![CDATA[ls . &#124; xargs -i -t cp ./&#123;&#125; /path/to/new/directory See example 12-6 at http://www.homepage.montana.edu/~unixuser/051905/abs-guide/moreadv.html]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> . <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-t</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>new<span style="color: #000000; font-weight: bold;">/</span>directory</pre></div></div>

<p>See example 12-6 at <a href="http://www.homepage.montana.edu/~unixuser/051905/abs-guide/moreadv.html">http://www.homepage.montana.edu/~unixuser/051905/abs-guide/moreadv.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/05/copy-a-large-directory-of-files-using-ls-and-xargs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails migrations: creating a MySQL BIGINT</title>
		<link>http://devblog.bluefuton.com/2010/04/rails-migrations-creating-a-mysql-bigint/</link>
		<comments>http://devblog.bluefuton.com/2010/04/rails-migrations-creating-a-mysql-bigint/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 10:56:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bigint]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/2010/04/rails-migrations-creating-a-mysql-bigint/</guid>
		<description><![CDATA[add_column :facebook_user_id, :integer, :limit =&#62; 8 # BIGINT]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">add_column <span style="color:#ff3333; font-weight:bold;">:facebook_user_id</span>, <span style="color:#ff3333; font-weight:bold;">:integer</span>, <span style="color:#ff3333; font-weight:bold;">:limit</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">8</span> <span style="color:#008000; font-style:italic;"># BIGINT</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/04/rails-migrations-creating-a-mysql-bigint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic use of &#8216;screen&#8217;</title>
		<link>http://devblog.bluefuton.com/2010/02/basic-use-of-screen/</link>
		<comments>http://devblog.bluefuton.com/2010/02/basic-use-of-screen/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:25:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=517</guid>
		<description><![CDATA[Using screen is a great way to leave long-running processes churning away when you&#8217;re not logged into the machine. Open a new screen screen Detach from the screen This does not interrupt whatever is running in the screen. Press Ctrl-A then D. Reattach to a screen you&#8217;ve already opened screen -r If you&#8217;ve opened multiple [...]]]></description>
			<content:encoded><![CDATA[<p>Using <a href="http://www.kuro5hin.org/story/2004/3/9/16838/14935">screen</a> is a great way to leave long-running processes churning away when you&#8217;re not logged into the machine.</p>
<h3>Open a new screen</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">screen</span></pre></div></div>

<h3>Detach from the screen</h3>
<p>This does not interrupt whatever is running in the screen.</p>
<p>Press Ctrl-A then D.</p>
<h3>Reattach to a screen you&#8217;ve already opened</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span></pre></div></div>

<p>If you&#8217;ve opened multiple screens, a list will be displayed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">There are several suitable screens on:
	1681.ttys004.braeburn	<span style="color: #7a0874; font-weight: bold;">&#40;</span>Detached<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	1686.ttys004.braeburn	<span style="color: #7a0874; font-weight: bold;">&#40;</span>Detached<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Just use the process ID of the screen to resume the right one:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span> <span style="color: #000000;">1681</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/02/basic-use-of-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change your default SSH username</title>
		<link>http://devblog.bluefuton.com/2010/02/change-your-default-ssh-username/</link>
		<comments>http://devblog.bluefuton.com/2010/02/change-your-default-ssh-username/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 12:09:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=514</guid>
		<description><![CDATA[If you&#8217;ve not had your own choice of username on your machine (for example, if your company imposes a username policy), you can set up a different default username for SSH in ~/.ssh/config: Host * User chris]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve not had your own choice of username on your machine (for example, if your company imposes a username policy), you can set up a different default username for SSH in ~/.ssh/config:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Host <span style="color: #000000; font-weight: bold;">*</span>
  User chris</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/02/change-your-default-ssh-username/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Readable, colourful Terminal in Snow Leopard</title>
		<link>http://devblog.bluefuton.com/2010/01/readable-colourful-terminal-in-snow-leopard/</link>
		<comments>http://devblog.bluefuton.com/2010/01/readable-colourful-terminal-in-snow-leopard/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 15:15:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[snowleopard]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=506</guid>
		<description><![CDATA[Install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php Install the Snow-Leopard-friendly version of the TerminalColors plugin for SIMBL: http://github.com/timmfin/terminalcolours Install the IR_Black theme and set it as default in Terminal.app preferences: http://blog.infinitered.com/entries/show/6 Turn on CLI color in your .bash_profile: export CLICOLOR=1; Bonus round: set yourself a colourful bash prompt: http://devblog.bluefuton.com/2008/05/coloured-bash-prompt-in-os-x/]]></description>
			<content:encoded><![CDATA[<p><img src="http://devblog.bluefuton.com/wp-content/uploads/2010/01/Screen-shot-2010-01-27-at-15.16.291.png" alt="Terminal screenshot" width="550" height="388" /></p>
<ol>
<li>Install SIMBL: <a href="http://www.culater.net/software/SIMBL/SIMBL.php">http://www.culater.net/software/SIMBL/SIMBL.php</a></li>
<li>Install the Snow-Leopard-friendly version of the TerminalColors plugin for SIMBL: <a href="http://github.com/timmfin/terminalcolours">http://github.com/timmfin/terminalcolours</a></li>
<li>Install the IR_Black theme and set it as default in Terminal.app preferences: <a href="http://blog.infinitered.com/entries/show/6">http://blog.infinitered.com/entries/show/6</a></li>
<li>Turn on CLI color in your .bash_profile:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CLICOLOR</span>=<span style="color: #000000;">1</span>;</pre></div></div>

</li>
<li>Bonus round: set yourself a colourful bash prompt: <a href="http://devblog.bluefuton.com/2008/05/coloured-bash-prompt-in-os-x/">http://devblog.bluefuton.com/2008/05/coloured-bash-prompt-in-os-x/</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2010/01/readable-colourful-terminal-in-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Border radius in Chrome, Firefox and Safari</title>
		<link>http://devblog.bluefuton.com/2009/12/border-radius-in-chrome-firefox-and-safari/</link>
		<comments>http://devblog.bluefuton.com/2009/12/border-radius-in-chrome-firefox-and-safari/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:47:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[radius]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=502</guid>
		<description><![CDATA[Chrome 4 currently appears to be the only browser to implement the W3C&#8217;s border-radius property: http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-radius border-top-left-radius: 1em; border-top-right-radius: 1em; You can produce the same result using proprietary attributes in Firefox 3.5 and Safari 4: /* Firefox */ -moz-border-radius-topleft: 1em; -moz-border-radius-topright: 1em; &#160; /* Safari */ -webkit-border-top-left-radius: 1em; -webkit-border-top-right-radius: 1em; Source: http://www.css3.info/preview/rounded-border/]]></description>
			<content:encoded><![CDATA[<p>Chrome 4 currently appears to be the only browser to implement the W3C&#8217;s border-radius property:</p>
<p><a href="http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-radius">http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-radius</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">border-top-left-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
border-top-right-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>You can produce the same result using proprietary attributes in Firefox 3.5 and Safari 4:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Firefox */</span>
-moz-border-radius-topleft<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
-moz-border-radius-topright<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Safari */</span>
-webkit-border-top-left-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
-webkit-border-top-right-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>Source: <a href="http://www.css3.info/preview/rounded-border/">http://www.css3.info/preview/rounded-border/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2009/12/border-radius-in-chrome-firefox-and-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using find with -exec to copy large directories</title>
		<link>http://devblog.bluefuton.com/2009/10/using-find-with-exec-to-copy-large-directories/</link>
		<comments>http://devblog.bluefuton.com/2009/10/using-find-with-exec-to-copy-large-directories/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:38:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://devblog.bluefuton.com/?p=500</guid>
		<description><![CDATA[To copy files from one directory, you might usually do: cp dir/* anotherdir/ If you try to do this with a particular large number of files, you may encounter the &#8216;argument list too long&#8217; error. In this case you can use: find . -exec cp &#123;&#125; /path/to/anotherdir/ \; More approaches at: http://www.linuxjournal.com/article/6060]]></description>
			<content:encoded><![CDATA[<p>To copy files from one directory, you might usually do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> dir<span style="color: #000000; font-weight: bold;">/*</span> anotherdir<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>If you try to do this with a particular large number of files, you may encounter the &#8216;argument list too long&#8217; error. In this case you can use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>anotherdir<span style="color: #000000; font-weight: bold;">/</span> \;</pre></div></div>

<p>More approaches at: <a href="http://www.linuxjournal.com/article/6060">http://www.linuxjournal.com/article/6060</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.bluefuton.com/2009/10/using-find-with-exec-to-copy-large-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
