<?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>Likesalmon.net</title>
	<atom:link href="http://likesalmon.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://likesalmon.net</link>
	<description>Web development for designers</description>
	<lastBuildDate>Sun, 05 May 2013 20:54:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Find the Size of Files and Directories in Terminal</title>
		<link>http://likesalmon.net/find-the-size-of-files-and-directories-in-terminal/</link>
		<comments>http://likesalmon.net/find-the-size-of-files-and-directories-in-terminal/#comments</comments>
		<pubDate>Sun, 05 May 2013 19:09:32 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=697</guid>
		<description><![CDATA[du (Disk Usage) is a super handy command line tool to list file sizes.  Common usage goes something like this: du -h /path/to/directory Which recursively lists all files in the directory in human readable forms. These are the switches I find most useful: du -skhc /path/to/directory - c, &#8211;total Produce a grand total -h, &#8211;human-readable [...]]]></description>
			<content:encoded><![CDATA[<p><code>du</code> (Disk Usage) is a super handy command line tool to list file sizes.  Common usage goes something like this:</p>
<p><code>du -h /path/to/directory</code></p>
<p>Which recursively lists all files in the directory in human readable forms. These are the switches I find most useful:</p>
<p><code>du -skhc /path/to/directory</code></p>
<dl>
<dt>- c, &#8211;total</dt>
<dd>Produce a grand total</dd>
<dt>-h, &#8211;human-readable</dt>
<dd>Print sizes in human readable format (e.g., 1K 234M 2G)</dd>
<dt>-k</dt>
<dd>Use SIZE-byte blocks, equavalent to &#8211;block-size=1K</dd>
<dt>-s, &#8211;summarize</dt>
<dd>Display only a total for each argument</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/find-the-size-of-files-and-directories-in-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Permissions Recursively</title>
		<link>http://likesalmon.net/change-permissions-recursively/</link>
		<comments>http://likesalmon.net/change-permissions-recursively/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 23:14:41 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=693</guid>
		<description><![CDATA[Change permissions on all directories, starting with folders contained in the current directory: find . -type d -exec chmod 755 {} \; Change permissions on all files, starting with files in the current directory: find . -type f -exec chmod 644 {} \;]]></description>
			<content:encoded><![CDATA[<p>Change permissions on all directories, starting with folders contained in the current directory:</p>
<p><code>find . -type d -exec chmod 755 {} \;</code></p>
<p>Change permissions on all files, starting with files in the current directory:</p>
<p><code>find . -type f -exec chmod 644 {} \;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/change-permissions-recursively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Node on Ubuntu 12.10 as User</title>
		<link>http://likesalmon.net/install-node-on-ubuntu-12-10-as-user/</link>
		<comments>http://likesalmon.net/install-node-on-ubuntu-12-10-as-user/#comments</comments>
		<pubDate>Thu, 31 Jan 2013 18:59:41 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=688</guid>
		<description><![CDATA[OMG, this could be the first time I&#8217;ve ever been able to post a link to a how-to without a list of comments and addendums: Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes These instructions worked perfectly to install NodeJS and NPM on Ubuntu as a non-root user.  Huge props to Tom Novelli. [...]]]></description>
			<content:encoded><![CDATA[<p>OMG, this could be the first time I&#8217;ve ever been able to post a link to a how-to without a list of comments and addendums:</p>
<p><a title="Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes" href="http://tnovelli.net/blog/blog.2011-08-27.node-npm-user-install.html" target="_blank">Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes</a></p>
<p>These instructions worked <em>perfectly</em> to install NodeJS and NPM on Ubuntu as a non-root user.  Huge props to Tom Novelli.  Respect.</p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/install-node-on-ubuntu-12-10-as-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Node.js v0.8.17 on Webfaction</title>
		<link>http://likesalmon.net/install-node-js-v0-8-17-on-webfaction/</link>
		<comments>http://likesalmon.net/install-node-js-v0-8-17-on-webfaction/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 04:18:56 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Webfaction]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=682</guid>
		<description><![CDATA[First follow the instructions for &#8220;Installing the latest version of tar&#8221; and &#8220;Save the new PATH&#8221; here : http://dstvns.com/setting-up-nodejs-on-webfaction-revised/ When I followed those instructions, installing tar went fine, but installing Node failed.  Here&#8217;s how I made it work: Install Node.js v0.8.17 cd $HOME/src wget http://nodejs.org/dist/v0.8.17/node-v0.8.17.tar.gz tar -xvf node-v0.8.17.tar.gz cd node-v0.8.17 Using your favorite editor, open the files configure and [...]]]></description>
			<content:encoded><![CDATA[<p>First follow the instructions for &#8220;Installing the latest version of tar&#8221; and &#8220;Save the new PATH&#8221; here : <a href="http://dstvns.com/setting-up-nodejs-on-webfaction-revised/">http://dstvns.com/setting-up-nodejs-on-webfaction-revised/</a></p>
<p>When I followed those instructions, installing tar went fine, but installing Node failed.  Here&#8217;s how I made it work:</p>
<h2>Install Node.js v0.8.17</h2>
<ol>
<li><code>cd $HOME/src</code></li>
<li><code>wget http://nodejs.org/dist/v0.8.17/node-v0.8.17.tar.gz</code></li>
<li><code>tar -xvf node-v0.8.17.tar.gz</code></li>
<li><code>cd node-v0.8.17</code></li>
<li>Using your favorite editor, open the files <code>configure</code> and <code>tools/install.py</code> from the <code>node-v0.8.17</code> directory. Change the first line <code>#!/usr/bin/env python</code> to <code>#!/usr/bin/env python2.7</code></li>
<li><code>alias python=python2.7</code> (Note: you can check your current version of python with <code>python -V</code>)</li>
<li><code>./configure --prefix=$HOME</code></li>
<li><code>make</code></li>
<li><code>python tools/install.py install</code></li>
</ol>
<p>Win!</p>
<p>(Credit for step 9 goes to: <a href="http://orion98mc.blogspot.com/2012/08/two-hours-ill-never-get-back.html">http://orion98mc.blogspot.com/2012/08/two-hours-ill-never-get-back.html</a>)</p>
<h2>Uninstall Node.js</h2>
<ol>
<li><code>rm -r ~/lib/node</code></li>
<li><code>rm -r ~/bin/node</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/install-node-js-v0-8-17-on-webfaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch Rename Files in Terminal Iteratively</title>
		<link>http://likesalmon.net/batch-rename-files-in-terminal-iteratively/</link>
		<comments>http://likesalmon.net/batch-rename-files-in-terminal-iteratively/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 01:19:45 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=676</guid>
		<description><![CDATA[Iteratively is a word!  Stupid spell check. Anyway, I had a bunch of sequentially named image files that needed to be renamed.  Here&#8217;s how I did it in the terminal: INDEX=0 for i in *; do mv $i slide-$INDEX.jpg; let INDEX=INDEX+1; done Given a directory full of files with names like foo_image_00001.jpg, foo_image_00002.jpg, etc.; this [...]]]></description>
			<content:encoded><![CDATA[<p>Iteratively is a word!  Stupid spell check.</p>
<p>Anyway, I had a bunch of sequentially named image files that needed to be renamed.  Here&#8217;s how I did it in the terminal:</p>
<p><code><br />
INDEX=0</p>
<p>for i in *;</p>
<p>do</p>
<p>mv $i slide-$INDEX.jpg;</p>
<p>let INDEX=INDEX+1;</p>
<p>done<br />
</code><br />
Given a directory full of files with names like foo_image_00001.jpg, foo_image_00002.jpg, etc.; this renames them to a more manageable slide-0.jpg, slide-1.jpg, etc.  Win!</p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/batch-rename-files-in-terminal-iteratively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Find and Replace Commands for the WordPress Underscores Theme</title>
		<link>http://likesalmon.net/3-find-and-replace-commands-for-the-wordpress-underscores-theme/</link>
		<comments>http://likesalmon.net/3-find-and-replace-commands-for-the-wordpress-underscores-theme/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 18:13:31 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=668</guid>
		<description><![CDATA[The following three commands are all you need to prepare the awesome _s theme for your next custom themeing project.  They will replace all mention of &#8220;_s&#8221; in the theme with the name of your theme. In the terminal, go to the _s directory and do: find . -type f -print0 &#124; xargs -0 perl [...]]]></description>
			<content:encoded><![CDATA[<p>The following three commands are all you need to prepare the <em>awesome</em> _s theme for your next custom themeing project.  They will replace all mention of &#8220;_s&#8221; in the theme with the name of your theme.</p>
<p>In the terminal, go to the _s directory and do:</p>
<ol>
<li><code>find . -type f -print0 | xargs -0 perl -pi -e "s/\'_s\'/\'mytheme\'/g;"</code></li>
<li><code>find . -type f -print0 | xargs -0 perl -pi -e "s/_s_/mytheme_/g;"</code></li>
<li><code>find . -type f -print0 | xargs -0 perl -pi -e "s/_s\b/Mytheme/g;"</code></li>
</ol>
<div>After replacing &#8220;mytheme&#8221; with the name of your theme, of course.</div>
<div></div>
<div>
<p>&nbsp;</p>
<p><em>Edit 2012/08/17:</em> Nevermind! Automatic built a generator that does the search and replace for you: <a title="" href="http://underscores.me/" target="blank">http://underscores.me/</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/3-find-and-replace-commands-for-the-wordpress-underscores-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OGG Encoding for HTML5 Audio</title>
		<link>http://likesalmon.net/ogg-encoding-for-html5-audio/</link>
		<comments>http://likesalmon.net/ogg-encoding-for-html5-audio/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 22:47:40 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=661</guid>
		<description><![CDATA[The html5 &#60;audio&#62; tag needs an mp3 file and and ogg file to be cross-browser compatible. For best results, only encode raw, wav, or aiff files this way. Mp3 to ogg will look like it works, but the file won&#39;t play on Firefox. Encode Install oggenc: $ sudo apt-get install vorbis-tools Encode: $ oggenc -q [...]]]></description>
			<content:encoded><![CDATA[<p>The html5 <code>&lt;audio&gt;</code> tag needs an mp3 file and and ogg file to be cross-browser compatible.  For best results, only encode raw, wav, or aiff files this way.  Mp3 to ogg will look like it works, but the file won&#39;t play on Firefox.</p>
<h2>Encode</h2>
<ol>
<li>Install oggenc: $ sudo apt-get install vorbis-tools</li>
<li>Encode: $ oggenc -q 6 input.wav -o output.ogg</li>
</ol>
<h2>The HTML:</h2>
<p><code>&lt;audio controls="controls" preload="auto" autobuffer autoplay id="player"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;source src="http://alialujah.com/files/3513/2641/1365/a-house-a-home.mp3" type="audio/mpeg" /&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;source src="http://alialujah.com/files/3813/2648/7285/a-house-a-home.ogg" type="audio/ogg" /&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;Aw dang! Your browser does not support html5.<br />
&lt;/audio&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/ogg-encoding-for-html5-audio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://alialujah.com/files/3513/2641/1365/a-house-a-home.mp3" length="6997510" type="audio/mpeg" />
<enclosure url="http://alialujah.com/files/3813/2648/7285/a-house-a-home.ogg" length="6750762" type="audio/ogg" />
		</item>
		<item>
		<title>.htaccess for Magento pretty URLs</title>
		<link>http://likesalmon.net/htaccess-for-magento-pretty-urls/</link>
		<comments>http://likesalmon.net/htaccess-for-magento-pretty-urls/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 00:36:43 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=655</guid>
		<description><![CDATA[I was pulling my hair out over this because Magento failed to produce an .htaccess file after I enabled url rewrites on my local dev server. I searched the old internets and found nothing! I ended up using the same .htaccess arguments as I do for WordPress and it worked great. To enable url rewrites, [...]]]></description>
			<content:encoded><![CDATA[<p>I was pulling my hair out over this because Magento failed to produce an .htaccess file after I enabled url rewrites on my local dev server.  I searched the old internets and found nothing!  I ended up using the same .htaccess arguments as I do for WordPress and it worked great.</p>
<p>To enable url rewrites, go to System > Configuration > Web > Search Engines Optimization > Use Web Server Rewrites and choose yes.</p>
<p>Copy the following into a blank file and save it in the root of your Magento install as &#8220;.htaccess&#8221;:</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteRule ^index\.php$ &#8211; [L]<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/htaccess-for-magento-pretty-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And the eCC compatible shopping cart winner is&#8230;</title>
		<link>http://likesalmon.net/and-the-ecc-compatible-shopping-cart-winner-is/</link>
		<comments>http://likesalmon.net/and-the-ecc-compatible-shopping-cart-winner-is/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 22:55:15 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[E-Commerce]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=649</guid>
		<description><![CDATA[Opencart! No wait&#8230; it was actually LiveCart. Ed. Note 9/8/11: LiveCart made me a liar.  Turns out its broken, the community is non-existent, and the documentation is incomplete.  After struggling with PHP error after error for hours yesterday, I&#8217;ve given it up and my search for an eCC compatible shopping cart continues.  I remain impressed [...]]]></description>
			<content:encoded><![CDATA[<p>Opencart! <del>No wait&#8230; it was actually LiveCart.</del></p>
<p><em>Ed. Note 9/8/11: LiveCart made me a liar.  Turns out its broken, the community is non-existent, and the documentation is incomplete.  After struggling with PHP error after error for hours yesterday, I&#8217;ve given it up and my search for an eCC compatible shopping cart continues.  I remain impressed by Opencart though, and I&#8217;m hoping like hell that I get Quickbooks integration through <a href="http://consolibyte.com/" target="_blank">consolibyte</a>.  I found them through the Opencart forums and their web connector is in beta.  Here&#8217;s hopin&#8217;!<br />
</em></p>
<p>&nbsp;</p>
<p>But not because it&#8217;s the best.  Its just the only one that actually works with eCC and Quickbooks.  The reason?  Variations.</p>
<h2>Variations are everything</h2>
<p>Quickbooks gives all items (the QB name for products) a unique item number. Variations on a product (like size and color) also get an item number. So if I am selling widgets, I would go into Quickbooks and add a new item called Widget, and Quickbooks would assign Widget item number 1. I have all different kinds of widgets so I&#8217;d leave the inventory amount at 0. Now I have to add a style (QB&#8217;s word for variations) for each kind of widget I&#8217;m selling. I have large widgets and small widgets and they come in green or red. So I add a style for each combo, large red, small red, large green, and small green.</p>
<p>When I save and look at the list of all my items, I find that I now have an entry for Widget with no styles, and an entry for each widget combination. Large red widgets are item number 2, small red widgets are item number 3, and so on. Quickbooks treats every variation as a unique product, which makes a lot of sense when you think about how hard it would be to track inventory otherwise. Unfortunately of the three carts I tested (Opencart, Livecart, and Prestashop), Livecart is the only only that works like this. And this is essential. So Livecart it is!</p>
<h2>But Opencart was soooo good!</h2>
<p>If Quickbooks integration wasn&#8217;t an issue, the winner would be Opencart by a mile. It&#8217;s <em>really</em> nice to use. The admin area (and the frontend while we&#8217;re at it) was super fast and just beautiful. Adding products and variations was a breeze. The workflow was so smooth and well thought out. Everything just made so much <em>sense</em>! I can&#8217;t say that about Livecart or Prestashop, which are both pretty slopping in comparison.</p>
<p>Code-wise Opencart was a big stand-out as well. No smarty templating to deal with, the code is clean, and the directory structure makes sense. Themeing is straight forward. All in all an exemplary MVC application. If only I could use it!</p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/and-the-ecc-compatible-shopping-cart-winner-is/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Livecart 500 Internal Server Error on Install</title>
		<link>http://likesalmon.net/livecart-500-internal-server-error-on-install/</link>
		<comments>http://likesalmon.net/livecart-500-internal-server-error-on-install/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 19:08:58 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[E-Commerce]]></category>

		<guid isPermaLink="false">http://likesalmon.net/?p=643</guid>
		<description><![CDATA[I just installed Livecart on my local development machine and got a 500 Internal Server error when I visited the site. My permissions were set correctly. The Apache log was showing this error: livecart/.htaccess: Options not allowed here Never seen that one before! I fixed it by following tristanC&#8217;s advice on this forum post. Just [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Livecart on my local development machine and got a 500 Internal Server error when I visited the site.  My permissions were set correctly.  The Apache log was showing this error: <code>livecart/.htaccess: Options not allowed here</code></p>
<p>Never seen that one before!  I fixed it by following tristanC&#8217;s advice on <a href="http://drupal.org/node/101197" title="" target="_blank">this forum post</a>.</p>
<p>Just edit /etc/apache2/mods-available/userdir.conf and add Options as the last argument on the AllowOverride line. Then restart Apache and you&#8217;re golden!</p>
]]></content:encoded>
			<wfw:commentRss>http://likesalmon.net/livecart-500-internal-server-error-on-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
