<?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>Zepplock &#124; vova.org</title>
	<atom:link href="http://vova.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://vova.org</link>
	<description>Make Love not War</description>
	<lastBuildDate>Sun, 19 Jul 2009 19:19:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Incrementing and initializing counter in a view in 1 (one!) line</title>
		<link>http://vova.org/2009/07/19/incrementing-and-initializing-counter-in-a-view-in-1-one-line/</link>
		<comments>http://vova.org/2009/07/19/incrementing-and-initializing-counter-in-a-view-in-1-one-line/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 19:19:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://vova.org/?p=31</guid>
		<description><![CDATA[Many times I have to make a counter that starts with 1 and monotonically incremented by 1 in Rails view. The typical example is when showing a list of things like:

7.1
7.2
7.3
....

The nice trick is to make it in 1 line:

&#60;li&#62;7.&#60;%= n = n + 1 rescue n = 1 %&#62;&#60;/li&#62;

instead of initializing &#8220;n&#8221; before the [...]]]></description>
			<content:encoded><![CDATA[<p>Many times I have to make a counter that starts with 1 and monotonically incremented by 1 in Rails view. The typical example is when showing a list of things like:</p>
<pre class="brush: ruby;">
7.1
7.2
7.3
....
</pre>
<p>The nice trick is to make it in 1 line:</p>
<pre class="brush: ruby;">
&lt;li&gt;7.&lt;%= n = n + 1 rescue n = 1 %&gt;&lt;/li&gt;
</pre>
<p>instead of initializing &#8220;n&#8221; before the loop (which requres extra line of code).</p>
<p>Now the question is: is this DRY enough? Is it?</p>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/07/19/incrementing-and-initializing-counter-in-a-view-in-1-one-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Philip Glass &#8211; Tirol Concerto</title>
		<link>http://vova.org/2009/06/02/philip-glass-tirol-concerto/</link>
		<comments>http://vova.org/2009/06/02/philip-glass-tirol-concerto/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 05:11:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Music]]></category>

		<guid isPermaLink="false">http://vova.org/?p=24</guid>
		<description><![CDATA[Philip Morris Glass (born January 31, 1937) is an American music composer. He is considered one of the most influential composers of the late-20th century and is widely acknowledged as a composer who has brought art music to the public (along with precursors such as Richard Strauss, Kurt Weill and Leonard Bernstein) &#8211; Wikipedia
Glass&#8217;s Tirol [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Philip Morris Glass (born January 31, 1937) is an American music composer. He is considered one of the most influential composers of the late-20th century and is widely acknowledged as a composer who has brought art music to the public (along with precursors such as Richard Strauss, Kurt Weill and Leonard Bernstein) &#8211; <a href="http://en.wikipedia.org/wiki/Philip_Glass">Wikipedia</a></p></blockquote>
<p>Glass&#8217;s Tirol Concerto is a three movement music <strong>masterpiece</strong>. </p>
<ul>
<li>First movement is very &#8220;classical&#8221; with light influences of 1600&#8217;s music. Beautiful piano with just a hint of strings.</li>
<li>The second movement is like a wide and long river. It flows you slowly and graciously (the music is mostly strings but beautifully complimented by piano)</li>
<li>The third one is very spontaneous and jazzy. Sometimes you can hear Rachmaninoff&#8217;s influence. Sometimes it just bursts out with wild energy</li>
</ul>
<p><a href="http://www.amazon.com/Dennis-Russell-Davies-Performs-Philip/dp/B0001IW3U6/ref=sr_1_2?ie=UTF8&#038;s=music&#038;qid=1243919473&#038;sr=8-2">Amazon CD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/06/02/philip-glass-tirol-concerto/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails JSON parser vs Open Flash Chart 2</title>
		<link>http://vova.org/2009/05/21/rails-json-parser-vs-open-flash-chart-2/</link>
		<comments>http://vova.org/2009/05/21/rails-json-parser-vs-open-flash-chart-2/#comments</comments>
		<pubDate>Thu, 21 May 2009 17:44:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://72.14.184.46/?p=18</guid>
		<description><![CDATA[Well having multiple JSON parsers in Ruby on Rails is not a lot of fun.
Let me explain the situation. I was happily using &#8220;.to_json&#8221; (means Rails JSON parser) until I had to parse a POST request with JSON body.
I googled it like normal people do and found this:

require &#34;json&#34;
data = JSON.parse(input)

which worked fine until I [...]]]></description>
			<content:encoded><![CDATA[<p>Well having multiple JSON parsers in Ruby on Rails is not a lot of fun.</p>
<p>Let me explain the situation. I was happily using &#8220;.to_json&#8221; (means Rails JSON parser) until I had to parse a POST request with JSON body.<br />
I googled it like normal people do and found this:</p>
<pre class="brush: ruby;">
require &quot;json&quot;
data = JSON.parse(input)
</pre>
<p>which worked fine until I tried my Open Flash Charts. They were blank. No error message. Nothing.<br />
Removing the statement to require JSON fixed the issue.</p>
<p>I also tried </p>
<pre class="brush: ruby;">
require &quot;json/pure&quot;
</pre>
<p>and</p>
<pre class="brush: ruby;">
require &quot;json/ext&quot;
</pre>
<p>with similar results.</p>
<p>The short debugging session revealed that Ruby Open Flash Chart 2 helper is generating right JSON when Rails built-in generator is used.<br />
When using json, json/pure or json/ext the certain characters (slashes, quotes) in a resulting string were escaped (sometimes several times) which breaks the Open Flash Charts.</p>
<p>The solution was to use</p>
<pre class="brush: ruby;">
data = ActiveSupport::JSON.decode(input)
</pre>
<p>which is a call to parse the json string using the Rails built-in parser.</p>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/05/21/rails-json-parser-vs-open-flash-chart-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Home Music Server (DIY style)</title>
		<link>http://vova.org/2009/05/09/my-home-music-server-diy-style/</link>
		<comments>http://vova.org/2009/05/09/my-home-music-server-diy-style/#comments</comments>
		<pubDate>Sat, 09 May 2009 17:42:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Audio]]></category>

		<guid isPermaLink="false">http://72.14.184.46/?p=15</guid>
		<description><![CDATA[Preface: Some time ago I realized that using my home desktop (Dell XPS 710) with 1000w power supply as a music server is not good. It was not good in many ways: it was very power hungry, I think about 250w when idle and ~350-500w depending on the task running. It was noisy, all those [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Preface: </strong>Some time ago I realized that using my home desktop (Dell XPS 710) with 1000w power supply as a music server is not good. It was not good in many ways: it was very power hungry, I think about 250w when idle and ~350-500w depending on the task running. It was noisy, all those fans and multiple hard drives made a lot of noise. My music collection was on the PC used by everyone so any trojan/virus could wipe out the whole collection&#8230; So I decided to migrate to something more reasonable while being on the budget.</p>
<p><strong>Requirements: </strong> So how the &#8220;Home Music Server&#8221; should look like? Here are some ideas I had in mind:</p>
<ul>
<li>Use ~50w of power</li>
<li>Be small and generate no noise (preferably no spinning parts)</li>
<li>Somewhat secure</li>
<li>Preferably provide access to my collection through the rest of the home (like wife listening to the music in the bedroom, or access some videos in the living room</li>
<li>Low cost (let&#8217;s assume < $300)</li>
</ul>
<p><strong>System design: </strong>What I had on my hands? I had speakers (<a href="http://www.totemacoustic.com/products/columns/hawk/">Totem Hawks</a>) connected to the amplifier (<a href="http://www.psaudio.com/ps/products/detail/trio-c-100?cat=audio">PS Audio Trio C100 Dual Mono</a>), amplifier was fed through DAC (<a href="http://www.glassjaraudio.com/product.sc?categoryId=4&#038;productId=6">Alien DIY USB</a> Digital to Analogue Converter). I also had about 1.3Tb of music on two 1Tb had drives</p>
<p>So the rest of the system had to be determined. The missing component(s) would be a box that connects multiple hard drives on one side and has USB/SPDIF audio output on the other side. Is it a single box? Or is it several boxes? We will see <img src='http://vova.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Music Collection: </strong>Let&#8217;s step back for a bit and see what music I have and how I store it. As I mentioned before I have two 1Tb drives hosting my classical and rock/jazz/other collection. I used to have thousands of CDs but I have digitized them all to lossless storage. The formats I have are about mostly <a href="http://flac.sourceforge.net/">FLAC</a>, <a href="http://www.monkeysaudio.com/">Monkey Audio APE</a> (I know, I know, it sucks) and 10% other formats (wv, shn, some mp3s too). Music is organized in directories sorted by author and then by album. Every (well almost every) album contains <a href="http://en.wikipedia.org/wiki/Cue_sheet_(computing)">.cue</a> file which lists all songs in the album and songs are tagged with author/album/year/etc information.</p>
<p><strong>Player: </strong>I was using <a href="http://www.foobar2000.org/">Foobar 2000</a> player for so long I can&#8217;t even name other good music players. I&#8217;m very happy that it plays every possible audio format and has plugins for almost any situation. So I had big expectations that Foobar will help me connect all my components together while providing some kind of interface to control my library.</p>
<p><strong>Solution: </strong>After googling around I bumped into two components that fit the bill (~$260 total):</p>
<ul>
<li><a href="http://www.dlink.com/products/?pid=666">D-Link DNS 321 NAS</a> ($99 after rebate)</li>
<li><a href="http://eeepc.asus.com/global/product900a-spec.html">ASUS Eee PC 900</a> with 4Gb SSD drive ($159 on sale Buy.com)</li>
</ul>
<p><strong>NAS: </strong>The NAS (Network Attached Storage) is a very good solution for this problem. You connect ethernet cable to it and all you files are accessible from Windows, MAC or Linux (also supports ftp, iTunes, uPNP, etc). So I put one of my hard drives in there and copied all my music there. It sucks about 30w of power while drives are spinning. The neat feature is that it powers down the drives when not in use (which lowers power to about 20w). It is running Linux in its NAS guts and supports 3rd party software (I don&#8217;t use this feature here but it can come handy later)</p>
<p><strong>Netbook: </strong>The core of the system is ASUS Eee PC netbook. It&#8217;s small, silent and only 18w of power idle and 21w when working which is perfect (see requirements). It comes with Linux pre-installed but I installed Windows XP Sp3 since Foobar is Windows only. </p>
<p><strong>Software: </strong>So what did I have to install to get it going?</p>
<ul>
<li>Windows XP</li>
<li>Foobar 2000 player</li>
<li>To control foobar remotely from any browser (including iphones and smartphones) &#8211; turns out there&#8217;s a foobar plugin for that: <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=62218">Foobar HTTP Control</a>.</li>
</ul>
<p><strong>Extras: </strong>One of the interesting features of the system is internet radio. I really like commercial free <a href="http://www.radioparadise.com/">Radio Paradise</a>. Foobar can play a streaming music from it too! Very convenient way to listen to new music.</p>
<p><strong>Alternatives and Next Steps: </strong></p>
<ul>
<li>You can install <a href="http://mediatomb.cc/">Media Tomb</a> on the NAS itself and use one of the many supported devices to stream audio/video directly (no netbook required)</li>
<li>See how this system can fit into different home automation solutions</li>
<li>D-Link 321 NAS supports iTunes streaming. When I start iYunes on any computer at home I see it in the list but no music available. Need to configure it it and see if FLAC/APE files are supported</li>
<li>Find a low cost hardware player that can connect to NAS and strem music off it like radio</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/05/09/my-home-music-server-diy-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Chinese Audio Dealers</title>
		<link>http://vova.org/2009/04/22/chinese-audio-dealers/</link>
		<comments>http://vova.org/2009/04/22/chinese-audio-dealers/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:41:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Audio]]></category>

		<guid isPermaLink="false">http://72.14.184.46/?p=11</guid>
		<description><![CDATA[Here&#8217;s an updated list of Chinese audiophile equipment (tube amps, solid state amps, dacs, cables, loudspeakers etc)
Dealers:
www.china-highend-hifi.com &#8211; lots of products
www.pacificvalve.us &#8211; toll free phone number, good website
www.newtube.com &#8211; Mostly Jolida tube audio equipment
www.nysound.com- not a best web design, weird navigation
www.coemaudio.com &#8211; not all pages are in English
www.usatubeaudio.com &#8211; many popular products, but have to [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an updated list of Chinese audiophile equipment (tube amps, solid state amps, dacs, cables, loudspeakers etc)</p>
<p><strong>Dealers:</strong><br />
<a href="http://www.china-highend-hifi.com">www.china-highend-hifi.com</a> &#8211; lots of products<br />
<a href="http://pacificvalve.us">www.pacificvalve.us</a> &#8211; toll free phone number, good website<br />
<a href="http://www.newtube.com/content">www.newtube.com</a> &#8211; Mostly Jolida tube audio equipment<br />
<a href="http://www.nysound.com ">www.nysound.com</a>- not a best web design, weird navigation<br />
<a href="http://www.coemaudio.com/html/production01.htm">www.coemaudio.com</a> &#8211; not all pages are in English<br />
<a href="http://www.usatubeaudio.com">www.usatubeaudio.com</a> &#8211; many popular products, but have to call for pricing<br />
<a href="http://www.audiophilechina.com">www.audiophilechina.com</a> &#8211; tons of different products at affordable prices</p>
<p><strong>Manufacturers:</strong><br />
<a href="http://www.audiospace-hifi.com">www.audiospace-hifi.com</a> &#8211; very good website, lots of details. I don&#8217;t think they sell direct though.<br />
<a href="http://www.xshn.com/en">www.xshn.com/en</a> &#8211; same as the one above. Not sure if you can buy direct.</p>
<p>Products are mostly from these manufacturers: Acoustat / Ali / Aurum Cantus / Azaly / CEC / Classic / Doge / Dussun / E&#038;T / G&#038;W / HAL / Image / Jolida / JSMR / Jungson / Korsun / Mingda Meixing / Nanzidu / Opera / Original / Shanling / Shengya / Xindak / Jolida</p>
<p>p.s. I have no affiliation with these websites. I have googled all of them when I was looking for a replacement tube amp.</p>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/04/22/chinese-audio-dealers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zebra stripes for tables</title>
		<link>http://vova.org/2009/04/14/zebra-stripes-for-tables/</link>
		<comments>http://vova.org/2009/04/14/zebra-stripes-for-tables/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 17:40:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://72.14.184.46/?p=8</guid>
		<description><![CDATA[Replacing

&#60;tr&#62;

with

&#60;tr class=&#34;&#60;%= cycle('one', 'two') %&#62;&#34;&#62;

in your tables will make lists easier to read.
Also apply the following css:

table tr.one td
{
background: grey;
}
table tr.two td
{
background: white;
}

]]></description>
			<content:encoded><![CDATA[<p>Replacing</p>
<pre class="brush: html;">
&lt;tr&gt;
</pre>
<p>with</p>
<pre class="brush: html;">
&lt;tr class=&quot;&lt;%= cycle('one', 'two') %&gt;&quot;&gt;
</pre>
<p>in your tables will make lists easier to read.</p>
<p>Also apply the following css:</p>
<pre class="brush: css;">
table tr.one td
{
background: grey;
}
table tr.two td
{
background: white;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/04/14/zebra-stripes-for-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authlogic</title>
		<link>http://vova.org/2009/04/10/authlogic/</link>
		<comments>http://vova.org/2009/04/10/authlogic/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 17:36:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://72.14.184.46/?p=3</guid>
		<description><![CDATA[After trying several Ruby on Rails authentication solutions I think that Authlogic is the best one. Authlogic can be installed as gem and as a plugin, does not require the use of generators (only optional scaffolding to save you time) and is very modular.
A very well written tutorial is here.
The github repository is here
]]></description>
			<content:encoded><![CDATA[<p>After trying several Ruby on Rails authentication solutions I think that Authlogic is the best one. Authlogic can be installed as gem and as a plugin, does not require the use of generators (only optional scaffolding to save you time) and is very modular.</p>
<p>A very well written tutorial is <a href="http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup" target="_blank">here</a>.<br />
The github repository is <a href="http://github.com/binarylogic/authlogic/tree/master">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://vova.org/2009/04/10/authlogic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
