<?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>RXGX</title>
	<atom:link href="http://www.rxgx.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rxgx.com</link>
	<description>Code for Websites that Work</description>
	<lastBuildDate>Wed, 12 Aug 2009 12:44:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keep Configuration out of Your Rails Apps with YAML</title>
		<link>http://www.rxgx.com/blog/keep-configuration-out-of-your-rails-apps-with-yaml/</link>
		<comments>http://www.rxgx.com/blog/keep-configuration-out-of-your-rails-apps-with-yaml/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 01:10:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[YAML]]></category>
		<category><![CDATA[YML]]></category>

		<guid isPermaLink="false">http://www.rxgx.com/?p=92</guid>
		<description><![CDATA[Do you have usernames, passwords or other configuration values mixed with code in your Ruby on Rails application? A YAML file will help keep these values out of your code. For example, I use YAML:load to load and parse my twitter.yml file stored in the config folder. The twitter.yml file contains the credentials for the [...]]]></description>
			<content:encoded><![CDATA[<p>Do you have usernames, passwords or other configuration values mixed with code in your Ruby on Rails application? A <a href="http://www.yaml.org/">YAML file</a> will help keep these values out of your code. For example, I use <code><a href="http://www.ruby-doc.org/core/classes/YAML.html">YAML:load</a></code> to load and parse my <code>twitter.yml</code> file stored in the config folder. The <code>twitter.yml</code> file contains the credentials for the Twitter account I am accessing.</p>
<p><b><code>/app/controllers/twitter_controller.rb</code></b></p>
<pre>
config = YAML::load( File.read( File.join(Rails.root, 'config', 'twitter.yml') ) )
</pre>
<p><b><code>/config/twitter.yml</code></b></p>
<pre>
email: email@domain.com
password: twitter
</pre>
<p>After the YAML file is loaded, the values in <code>twitter.yml</code> are saved to my local variable, <code>config</code>. I can use them in my Ruby file such as the following example with a Twitter class I have created.</p>
<p><b><code>/app/controller/twitter_controller.rb</code></b></p>
<pre>
config = YAML::load( File.read( File.join(Rails.root, 'config', 'twitter.yml') ) )
twitter = Twitter.new(config['email'], config['password'])
</pre>
<p>In the future, I&#8217;ll explain how to load and cache Twitter updates to the database and how to use different config files for different environments. These scripts were written for Ruby 1.8 and Rails 2.3.2. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/blog/keep-configuration-out-of-your-rails-apps-with-yaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revolution Tea: Drink 3D</title>
		<link>http://www.rxgx.com/portfolio/revolution-tea-drink-3d/</link>
		<comments>http://www.rxgx.com/portfolio/revolution-tea-drink-3d/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 09:26:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash Sites]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.rxgx.com/?p=80</guid>
		<description><![CDATA[An interactive website created in Adobe Flash (strictly ActionScript 2) for a delicious new tea beverage.]]></description>
			<content:encoded><![CDATA[<p>Client: <a href="http://www.revolutiontea.com"><strong>Revolution Tea, LLC</strong></a><br />
Website: <a href="http://drink3d.com"><strong>Drink 3D</strong></a><br />
Agency: <a href="http://www.havicedesign.com"><strong>Havice Design</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/portfolio/revolution-tea-drink-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use YAML in Your PHP Applications</title>
		<link>http://www.rxgx.com/blog/how-to-use-yaml-in-your-php-applications/</link>
		<comments>http://www.rxgx.com/blog/how-to-use-yaml-in-your-php-applications/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 03:40:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[YAML]]></category>
		<category><![CDATA[YML]]></category>

		<guid isPermaLink="false">http://www.rxgx.com/?p=111</guid>
		<description><![CDATA[I&#8217;ve learned a lot from transitioning from PHP to Ruby on Rails. One thing I loved about Rails was the separation of configuration and code. Rails stores it&#8217;s database configuration into a small text file written in YAML and organizes this in it&#8217;s own config folder. The following is about how I used YAML in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve learned a lot from transitioning from PHP to <a href="http://www.rubyonrails.org">Ruby on Rails</a>. One thing I loved about Rails was the separation of configuration and code. Rails stores it&#8217;s database configuration into a small text file written in <a href="http://www.yaml.org/">YAML</a> and organizes this in it&#8217;s own config folder. The following is about how I used YAML in PHP to better organize my code and framework files.</p>
<p><strong>Example:</strong></p>
<pre>
// Load Configuration
$config_path = PHP_PATH."/config/config.yml";
$class_path = PHP_PATH."/classes/spyc.php";
if (file_exists($config_path) &#038;&#038; file_exists($class_path)) {
	include $class_path;
	$yaml = new Spyc;
	$config = $yaml->YAMLLoad($config_path);
} else {
	exit("The configuration file is missing.");
}
</pre>
<p><a href="http://code.google.com/p/spyc/">Spyc</a>, &#8220;A simple YAML loader/dumper class for PHP,&#8221; is an open-source class for PHP that parses and stores the contents of a YAML file to an array. The line <code>$yaml = new Spyc;</code> creates an instance of the Spyc class, and the line <code>$config = $yaml->YAMLLoad($config_path);</code> stores the contents of the <code>config.yml</code> to the array <code>$config</code>. That&#8217;s all there is to it!</p>
<p>For more information about Spyc and to download the class, visit <a href="http://code.google.com/p/spyc">code.google.com/p/spyc</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/blog/how-to-use-yaml-in-your-php-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Generate Labels for Radio Buttons in Rails</title>
		<link>http://www.rxgx.com/blog/how-to-generate-labels-for-radio-buttons-in-rails/</link>
		<comments>http://www.rxgx.com/blog/how-to-generate-labels-for-radio-buttons-in-rails/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 04:36:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[form_for]]></category>
		<category><![CDATA[INPUT]]></category>
		<category><![CDATA[LABEL]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://wordpress/?p=58</guid>
		<description><![CDATA[This is the code that I got from the Rails API, however, the value was processed as an HTML attribute rather than the value of the radio button.

&#60;% form_for @review do f %&#62;
  &#60;%= f.label :rating, 1, :value => 1 %&#62;
  &#60;%= f.radio :rating, 1 %&#62;
&#60;% end %&#62;

Undesired output:

&#60;label for="review_rating" value="1"&#62;1&#60;/label&#62;
&#60;input id="review_rating_1" name="rating" [...]]]></description>
			<content:encoded><![CDATA[<p>This is the code that I got from the Rails API, however, the value was processed as an HTML attribute rather than the value of the radio button.</p>
<pre>
&lt;% form_for @review do f %&gt;
  &lt;%= f.label :rating, 1, :value => 1 %&gt;
  &lt;%= f.radio :rating, 1 %&gt;
&lt;% end %&gt;
</pre>
<p>Undesired output:</p>
<pre>
&lt;label for="review_rating" value="1"&gt;1&lt;/label&gt;
&lt;input id="review_rating_1" name="rating" type="radio" value="1" /&gt;
</pre>
<p>Here&#8217;s the code that works thanks to a few Google searches.</p>
<pre>
&lt;% form_for @review do f %&gt;
  &lt;%= f.label :rating_1, 1 %&gt;
  &lt;%= f.radio :rating, 1 %&gt;
&lt;% end %&gt;
</pre>
<p>Desired output:</p>
<pre>
&lt;label for="review_rating_1"&gt;1&lt;/label&gt;
&lt;input id="review_rating_1" name="rating" type="radio" value="1" /&gt;
</pre>
<p>Thanks to <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M001889">Rails API FormHelper</a> and <a href="http://stackoverflow.com/questions/746387/labels-for-radio-buttons-in-rails-form">Labels for radio buttons in rails form</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/blog/how-to-generate-labels-for-radio-buttons-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Palm Valley 303</title>
		<link>http://www.rxgx.com/portfolio/palm-valley-303/</link>
		<comments>http://www.rxgx.com/portfolio/palm-valley-303/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 00:16:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://wordpress/?p=47</guid>
		<description><![CDATA[Website and interactive map (Adobe Flash) for a 1,600 Acre Master Planned Business Park in Goodyear, AZ for SunCor Development.]]></description>
			<content:encoded><![CDATA[<p>Website and interactive map (Adobe Flash) for a 1,600 Acre Master Planned Business Park in Goodyear, AZ for SunCor Development.</p>
<p>Client: <a href="http://www.suncoraz.com"><strong>SunCor Development Company</strong></a><br />
Website: <a href="http://www.palmvalley303.com"><strong>Palm Valley 303</strong></a><br />
Agency: <a href="http://www.catywampus.com"><strong>Catywampus</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/portfolio/palm-valley-303/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Fix the Background Bug in Google Chrome</title>
		<link>http://www.rxgx.com/blog/how-to-make-sure-your-background-fills-the-screen-in-google-chrome/</link>
		<comments>http://www.rxgx.com/blog/how-to-make-sure-your-background-fills-the-screen-in-google-chrome/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 23:47:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://wordpress/?p=26</guid>
		<description><![CDATA[We&#8217;ve all heard of Google and use their sites every day, however, many people do not know they have a browser. Google Chrome is a new software to enter the world of browsers and claims to offer a faster and safer Web experience. If you haven&#8217;t tried Chrome yet, then I suggest you download and [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve all heard of Google and use their sites every day, however, many people do not know they have a browser. Google Chrome is a new software to enter the world of browsers and claims to offer a faster and safer Web experience. If you haven&#8217;t tried Chrome yet, then I suggest you download and test it for yourself.</p>
<p>The first thing you may notice when browsing with Google Chrome is that backgrounds tend not to fill the entire window on certain sites. I don&#8217;t know if this is a bug or a feature, but there&#8217;s a line of code one can add to their site to fix this. The trick is to make Chrome stretch your site to full dimensions of the window using CSS attributes with the HTML tag. Below is an example where the background image is set to repeat horizontally and the area not covered by the image is colored black.</p>
<p><code>html { width:100%; height:100%; background:#000 url(background.gif) repeat-x 0 0; }</code></p>
<p>The most important part of the style is the width and height at 100%. As long as you have the width and height set then whatever background you want to display will fill the whole window. That&#8217;s all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/blog/how-to-make-sure-your-background-fills-the-screen-in-google-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>McMurry Custom Plus™ Tour</title>
		<link>http://www.rxgx.com/portfolio/mcmurry-custom-plus/</link>
		<comments>http://www.rxgx.com/portfolio/mcmurry-custom-plus/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 23:26:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wordpress/?p=22</guid>
		<description><![CDATA[Interactive sales application in Adobe Flash (ActionScript) with customized accounts, URLs and content management.]]></description>
			<content:encoded><![CDATA[<p>Client: <a href="http://www.mcmurry.com"><strong>McMurry Inc.</strong></a><br />
Website: <a href="http://customplus.mcmurry.com"><strong>McMurry Custom Plus&trade; Tour</strong></a><br />
Agency: <a href="http://www.sugarcreative.com"><strong>Sugar Creative</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/portfolio/mcmurry-custom-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Masterpiece Replayed</title>
		<link>http://www.rxgx.com/portfolio/masterpiece-replayed/</link>
		<comments>http://www.rxgx.com/portfolio/masterpiece-replayed/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 22:35:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://wordpress/?p=15</guid>
		<description><![CDATA[Phoenix Art Museum needed a online experience with video for a special event via. Adobe Flash (ActionScript only).]]></description>
			<content:encoded><![CDATA[<p>Client: <a href="http://www.phxart.org"><strong>Phoenix Art Museum</strong></a><br />
Website: <a href="http://www.masterpiecereplayed.org"><strong>Masterpiece Replayed</strong></a><br />
Agency: <!--a href="http://www.sugarcreative.com"--><strong>Sugar Creative</strong><!--/a--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rxgx.com/portfolio/masterpiece-replayed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
