<?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"
	>

<channel>
	<title>Zak Scott</title>
	<atom:link href="http://zakscott.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://zakscott.com</link>
	<description>Vermont Web Developer</description>
	<pubDate>Fri, 31 Oct 2008 03:21:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Rails US State Select</title>
		<link>http://zakscott.com/rails-us-state-select/</link>
		<comments>http://zakscott.com/rails-us-state-select/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 03:21:12 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=22</guid>
		<description><![CDATA[
select&#40;:user, :state, &#91;
&#91;'Select a State', 'None'&#93;,
&#91;'Alabama', 'AL'&#93;,
&#91;'Alaska', 'AK'&#93;,
&#91;'Arizona', 'AZ'&#93;,
&#91;'Arkansas', 'AR'&#93;,
&#91;'California', 'CA'&#93;,
&#91;'Colorado', 'CO'&#93;,
&#91;'Connecticut', 'CT'&#93;,
&#91;'Delaware', 'DE'&#93;,
&#91;'District Of Columbia', 'DC'&#93;,
&#91;'Florida', 'FL'&#93;,
&#91;'Georgia', 'GA'&#93;,
&#91;'Hawaii', 'HI'&#93;,
&#91;'Idaho', 'ID'&#93;,
&#91;'Illinois', 'IL'&#93;,
&#91;'Indiana', 'IN'&#93;,
&#91;'Iowa', 'IA'&#93;,
&#91;'Kansas', 'KS'&#93;,
&#91;'Kentucky', 'KY'&#93;,
&#91;'Louisiana', 'LA'&#93;,
&#91;'Maine', 'ME'&#93;,
&#91;'Maryland', 'MD'&#93;,
&#91;'Massachusetts', 'MA'&#93;,
&#91;'Michigan', 'MI'&#93;,
&#91;'Minnesota', 'MN'&#93;,
&#91;'Mississippi', 'MS'&#93;,
&#91;'Missouri', 'MO'&#93;,
&#91;'Montana', 'MT'&#93;,
&#91;'Nebraska', 'NE'&#93;,
&#91;'Nevada', 'NV'&#93;,
&#91;'New Hampshire', 'NH'&#93;,
&#91;'New Jersey', 'NJ'&#93;,
&#91;'New Mexico', 'NM'&#93;,
&#91;'New York', 'NY'&#93;,
&#91;'North Carolina', 'NC'&#93;,
&#91;'North Dakota', 'ND'&#93;,
&#91;'Ohio', 'OH'&#93;,
&#91;'Oklahoma', 'OK'&#93;,
&#91;'Oregon', 'OR'&#93;,
&#91;'Pennsylvania', 'PA'&#93;,
&#91;'Rhode Island', 'RI'&#93;,
&#91;'South [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#CC0066; font-weight:bold;">select</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:user</span>, <span style="color:#ff3333; font-weight:bold;">:state</span>, <span style="color:#006600; font-weight:bold;">&#91;</span>
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Select a State'</span>, <span style="color:#996600;">'None'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Alabama'</span>, <span style="color:#996600;">'AL'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Alaska'</span>, <span style="color:#996600;">'AK'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Arizona'</span>, <span style="color:#996600;">'AZ'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Arkansas'</span>, <span style="color:#996600;">'AR'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'California'</span>, <span style="color:#996600;">'CA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Colorado'</span>, <span style="color:#996600;">'CO'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Connecticut'</span>, <span style="color:#996600;">'CT'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Delaware'</span>, <span style="color:#996600;">'DE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'District Of Columbia'</span>, <span style="color:#996600;">'DC'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Florida'</span>, <span style="color:#996600;">'FL'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Georgia'</span>, <span style="color:#996600;">'GA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Hawaii'</span>, <span style="color:#996600;">'HI'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Idaho'</span>, <span style="color:#996600;">'ID'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Illinois'</span>, <span style="color:#996600;">'IL'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Indiana'</span>, <span style="color:#996600;">'IN'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Iowa'</span>, <span style="color:#996600;">'IA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Kansas'</span>, <span style="color:#996600;">'KS'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Kentucky'</span>, <span style="color:#996600;">'KY'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Louisiana'</span>, <span style="color:#996600;">'LA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Maine'</span>, <span style="color:#996600;">'ME'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Maryland'</span>, <span style="color:#996600;">'MD'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Massachusetts'</span>, <span style="color:#996600;">'MA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Michigan'</span>, <span style="color:#996600;">'MI'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Minnesota'</span>, <span style="color:#996600;">'MN'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Mississippi'</span>, <span style="color:#996600;">'MS'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Missouri'</span>, <span style="color:#996600;">'MO'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Montana'</span>, <span style="color:#996600;">'MT'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Nebraska'</span>, <span style="color:#996600;">'NE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Nevada'</span>, <span style="color:#996600;">'NV'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'New Hampshire'</span>, <span style="color:#996600;">'NH'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'New Jersey'</span>, <span style="color:#996600;">'NJ'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'New Mexico'</span>, <span style="color:#996600;">'NM'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'New York'</span>, <span style="color:#996600;">'NY'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'North Carolina'</span>, <span style="color:#996600;">'NC'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'North Dakota'</span>, <span style="color:#996600;">'ND'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Ohio'</span>, <span style="color:#996600;">'OH'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Oklahoma'</span>, <span style="color:#996600;">'OK'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Oregon'</span>, <span style="color:#996600;">'OR'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Pennsylvania'</span>, <span style="color:#996600;">'PA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Rhode Island'</span>, <span style="color:#996600;">'RI'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'South Carolina'</span>, <span style="color:#996600;">'SC'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'South Dakota'</span>, <span style="color:#996600;">'SD'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Tennessee'</span>, <span style="color:#996600;">'TN'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Texas'</span>, <span style="color:#996600;">'TX'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Utah'</span>, <span style="color:#996600;">'UT'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Vermont'</span>, <span style="color:#996600;">'VT'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Virginia'</span>, <span style="color:#996600;">'VA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Washington'</span>, <span style="color:#996600;">'WA'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'West Virginia'</span>, <span style="color:#996600;">'WV'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Wisconsin'</span>, <span style="color:#996600;">'WI'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Wyoming'</span>, <span style="color:#996600;">'WY'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/rails-us-state-select/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Intrepid Ibex to have optional &#8220;Dark room&#8221; theme</title>
		<link>http://zakscott.com/intrepid-ibex-to-have-optional-dark-room-theme/</link>
		<comments>http://zakscott.com/intrepid-ibex-to-have-optional-dark-room-theme/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 16:16:10 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=20</guid>
		<description><![CDATA[UPDATE
There is an existing theme that is very similar to the Dark room theme, available for Ubuntu 8.04 Hardy Heron.
Check it out, Shiki-colors.
Good news, as the next release of Ubuntu (8.10) is going to be packaged with an optional theme to please the eyes. The default theme will still be the bright and orangy &#8220;Human&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong></p>
<p>There is an existing theme that is very similar to the Dark room theme, available for Ubuntu 8.04 Hardy Heron.</p>
<p>Check it out, <a title="Shiki-colors gnome theme" href="http://gnome-look.org/content/show.php/Shiki-Colors?content=86717">Shiki-colors</a>.</p>
<p>Good news, as the next release of Ubuntu (8.10) is going to be packaged with an optional theme to please the eyes. The default theme will still be the bright and orangy &#8220;Human&#8221; theme, with a few updates.. but you will be able to select the &#8220;Dark room&#8221; theme in System &gt; Preferences &gt; Appearance.</p>
<p style="text-align: center;"><a href="http://zakscott.com/wp-content/uploads/2008/10/ibex_desktop_full.jpg"><img class="aligncenter size-full wp-image-21" title="Intrepid Ibex Optional Theme" src="http://zakscott.com/wp-content/uploads/2008/10/ibex_desktop_full.jpg" alt="" width="500" height="375" /></a></p>
<p>via [<a title="Ubuntu 8.10 gets optional darkroom theme" href="http://lifehacker.com/5064515/ubuntu-810-gets-optional-darkroom-theme">lifehacker</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/intrepid-ibex-to-have-optional-dark-room-theme/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenGL Matrix as Desktop Background</title>
		<link>http://zakscott.com/opengl-matrix-as-desktop-background/</link>
		<comments>http://zakscott.com/opengl-matrix-as-desktop-background/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 01:35:09 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Gnome]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=19</guid>
		<description><![CDATA[For the last month or so I&#8217;ve been using the GL Matrix screensaver built into Gnome as my desktop background, and I&#8217;m probably not ever going back to a standard background. Other then the fact that it only takes up 10~15 megabytes to run, it doubles as a screensaver. Finding good 1680&#215;1050 backgrounds isn&#8217;t an [...]]]></description>
			<content:encoded><![CDATA[<p>For the last month or so I&#8217;ve been using the GL Matrix screensaver built into Gnome as my desktop background, and I&#8217;m probably not ever going back to a standard background. Other then the fact that it only takes up 10~15 megabytes to run, it doubles as a screensaver. Finding good 1680&#215;1050 backgrounds isn&#8217;t an easy task either..</p>
<p>At any rate, if you would like to use the GL Matrix screensaver as your background you must first disable the nautilus desktop:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">gconftool<span style="color: #000000;">-2</span> --<span style="color: #7a0874; font-weight: bold;">type</span> bool --<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>nautilus<span style="color: #000000; font-weight: bold;">/</span>preferences<span style="color: #000000; font-weight: bold;">/</span>show_desktop <span style="color: #c20cb9; font-weight: bold;">false</span></pre></div></div>

<p>Now let&#8217;s make the desktop entry for our xserver autostart:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">gedit ~<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>autostart<span style="color: #000000; font-weight: bold;">/</span>glmatrix.desktop</pre></div></div>

<p>Just paste the following into your editor and then save it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Desktop Entry<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">Version=</span><span style="color: #000000;">1.0</span>
<span style="color: #007800;">Encoding=</span>UTF<span style="color: #000000;">-8</span>
<span style="color: #007800;">Name=</span>No name
Name<span style="color: #7a0874; font-weight: bold;">&#91;</span>en_IN<span style="color: #7a0874; font-weight: bold;">&#93;</span>=Desktop matrix
<span style="color: #007800;">Exec=</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xscreensaver<span style="color: #000000; font-weight: bold;">/</span>glmatrix -root
X-GNOME-Autostart-<span style="color: #007800;">enabled=</span>true</pre></div></div>

<p>Once you have done that, restart Gnome by hitting <strong>Ctrl+Alt+Backspace</strong>.</p>
<p>Going back to the original nautlius desktop is simple:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">gconftool<span style="color: #000000;">-2</span> --<span style="color: #7a0874; font-weight: bold;">type</span> bool --<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>nautlius<span style="color: #000000; font-weight: bold;">/</span>preferences<span style="color: #000000; font-weight: bold;">/</span>show_desktop <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> nautilus</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/opengl-matrix-as-desktop-background/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preliminary Data with Migrations in Rails</title>
		<link>http://zakscott.com/preliminary-data-with-migrations-in-rails/</link>
		<comments>http://zakscott.com/preliminary-data-with-migrations-in-rails/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 01:20:16 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=18</guid>
		<description><![CDATA[At one time or another, you will most likely want your application to set-up with some preliminary data. One common example is a settings or options table within your database, or a default admin user that will be created upon install.
To get this done, is actually a lot easier then you may think..
Simply create a [...]]]></description>
			<content:encoded><![CDATA[<p>At one time or another, you will most likely want your application to set-up with some preliminary data. One common example is a settings or options table within your database, or a default admin user that will be created upon install.</p>
<p>To get this done, is actually a lot easier then you may think..</p>
<p>Simply create a new migration such as:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">script<span style="color:#006600; font-weight:bold;">/</span>generate migration add_default_user</pre></div></div>

<p>Now all you need to do is add the data into the migration.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">class</span> AddDefaultUser <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migration</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">up</span>
      User.<span style="color:#9900CC;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span>
        <span style="color:#ff3333; font-weight:bold;">:username</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'default'</span>, 
        <span style="color:#ff3333; font-weight:bold;">:password</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'password'</span>
       <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">down</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Once you have your migrations the way you like just run</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">rake db:migrate</pre></div></div>

<p> to finish the job.</p>
<p>One thing to consider is deleting any records you have added to this migration in the <strong>self.down</strong> method, depending on your applications requirements. However, I think that this may also be accomplished when the (user) migration is removed.</p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/preliminary-data-with-migrations-in-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Put Sessions into Database with Rails</title>
		<link>http://zakscott.com/put-sessions-into-database-with-rails/</link>
		<comments>http://zakscott.com/put-sessions-into-database-with-rails/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 21:33:49 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=17</guid>
		<description><![CDATA[Adding sessions into the database is a great way to speed up your application, and it&#8217;s very easy to do in Rails 2.x. It can be done in the following, 3 easy, steps:

rake db:sessions:create



rake db:migrate


Now go into config/environment.rb and uncomment the following line:

# Use the database for sessions instead of the cookie-based default,
# which shouldn't [...]]]></description>
			<content:encoded><![CDATA[<p>Adding sessions into the database is a great way to speed up your application, and it&#8217;s very easy to do in Rails 2.x. It can be done in the following, 3 easy, steps:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">rake db:sessions:create</pre></div></div>

<p></p>

<div class="wp_syntax"><div class="code"><pre class="ruby">rake db:migrate</pre></div></div>

<p></p>
<p>Now go into <strong>config/environment.rb</strong> and uncomment the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;"># Use the database for sessions instead of the cookie-based default,</span>
<span style="color:#008000; font-style:italic;"># which shouldn't be used to store highly confidential information</span>
<span style="color:#008000; font-style:italic;"># (create the session table with 'rake db:sessions:create')</span>
config.<span style="color:#9900CC;">action_controller</span>.<span style="color:#9900CC;">session_store</span> = <span style="color:#ff3333; font-weight:bold;">:active_record_store</span></pre></div></div>

<p></p>
<p>It&#8217;s is easy as that, now all of your sessions will be added to the database instead of files accessed at system level.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/put-sessions-into-database-with-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Connecting to an SMTP server using class.smtp.php</title>
		<link>http://zakscott.com/connecting-to-an-smtp-server-using-classsmtpphp/</link>
		<comments>http://zakscott.com/connecting-to-an-smtp-server-using-classsmtpphp/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 03:21:19 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=16</guid>
		<description><![CDATA[For one of my current projects I&#8217;m going to be writing a custom email class that will both send and receive email from an external/internal mail server. In order to make the module ultra-portable I&#8217;m going to be using an SMTP connection to take care of both tasks.
Right now I&#8217;m tutoring on the very excellent [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my current projects I&#8217;m going to be writing a custom email class that will both send and receive email from an external/internal mail server. In order to make the module ultra-portable I&#8217;m going to be using an SMTP connection to take care of both tasks.</p>
<p>Right now I&#8217;m tutoring on the very excellent <a href="http://phpmailer.codeworxtech.com/">PHPMailer</a> program that I&#8217;ve used many a time. It&#8217;s a very good module that has real good support backing it with frequent updates and bug patching via <a href="http://codeworxtech.com/">codeworxtech</a>. The module I plan on building is going to be full PHP5, unlike PHPMailer which is written for PHP4. Ok so now we&#8217;ve got some background, let&#8217;s get to the code.</p>
<p>First thing we&#8217;ll need to load the file up and instantiate the class:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #b1b100;">include</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'class.smtp.php'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #ff0000">$smtp</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SMTP<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

</p>
<p>Next we have to connect to the smtp server:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #ff0000">$smtp</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">Connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'mail.yourserver.com'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

</p>
<p>Finally we will authorize our smtp user via the Authenticate function:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #ff0000">$smtp</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">Authenticate</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'username'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'password'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

</p>
<p>Now, if we query the module for a connection status it should return <em>true</em> ( == 1 ).</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000066;">echo</span> <span style="color: #ff0000">$smtp</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">Connected</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

</p>
<p>So that&#8217;s all it takes to establish and log into an SMTP server via class.smtp.php. The module makes really good use of the fsockopen() function within PHP and I plan on taking a similar approach to my SMTP module.</p>
<p><a href="http://www.phpclasses.org/browse/file/920.html">Download class.smtp.php here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/connecting-to-an-smtp-server-using-classsmtpphp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>/girls</title>
		<link>http://zakscott.com/girls/</link>
		<comments>http://zakscott.com/girls/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 23:36:25 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Code Monkey]]></category>

		<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=15</guid>
		<description><![CDATA[
ls -a /girls &#124; grep 'chill'

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #c20cb9; font-weight: bold;">ls</span> -a <span style="color: #000000; font-weight: bold;">/</span>girls <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'chill'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/girls/feed/</wfw:commentRss>
		</item>
		<item>
		<title>geocode class</title>
		<link>http://zakscott.com/geocode-class/</link>
		<comments>http://zakscott.com/geocode-class/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 02:51:34 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=14</guid>
		<description><![CDATA[Came upon this rather slick geocode class written in PHP5 for use with google maps.
Thought I would share it.
]]></description>
			<content:encoded><![CDATA[<p>Came upon this rather slick <a href="http://www.phpclasses.org/browse/package/2893.html">geocode class</a> written in PHP5 for use with google maps.</p>
<p>Thought I would share it.</p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/geocode-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Paragraph breaks, #commentlist</title>
		<link>http://zakscott.com/paragraph-breaks-commentlist/</link>
		<comments>http://zakscott.com/paragraph-breaks-commentlist/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 01:56:09 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=13</guid>
		<description><![CDATA[Just fixed the weird spacing on the p tag within posts, and commentlist list-style-position to outside.
Should help clean things up a bit.
]]></description>
			<content:encoded><![CDATA[<p>Just fixed the weird spacing on the p tag within posts, and commentlist list-style-position to outside.</p>
<p>Should help clean things up a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/paragraph-breaks-commentlist/feed/</wfw:commentRss>
		</item>
		<item>
		<title>$blog</title>
		<link>http://zakscott.com/blog/</link>
		<comments>http://zakscott.com/blog/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 03:47:00 +0000</pubDate>
		<dc:creator>Zak Scott</dc:creator>
		
		<category><![CDATA[Code Monkey]]></category>

		<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://zakscott.com/?p=11</guid>
		<description><![CDATA[
if&#40;$blog-&#62;lastUpdate &#62; '2 months'&#41; &#123; 
echo 'DUDE WTF';
else &#123;
echo 'n_n';
&#125;

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$blog</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">lastUpdate</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff0000;">'2 months'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'DUDE WTF'</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #000066;">echo</span> <span style="color: #ff0000;">'n_n'</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://zakscott.com/blog/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
