<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Code Prostitute</title>
	<atom:link href="http://codeprostitute.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeprostitute.com</link>
	<description>the sordid details of my career as a code prostitute</description>
	<lastBuildDate>Sun, 28 Feb 2010 03:49:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='codeprostitute.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/eb94fd06db9956b497d8c8d226fd21c6?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Code Prostitute</title>
		<link>http://codeprostitute.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codeprostitute.com/osd.xml" title="Code Prostitute" />
	<atom:link rel='hub' href='http://codeprostitute.com/?pushpress=hub'/>
		<item>
		<title>Samsung Blu-ray player network woes and solution!</title>
		<link>http://codeprostitute.com/2010/02/27/samsung-blu-ray-player-network-woes-and-solution/</link>
		<comments>http://codeprostitute.com/2010/02/27/samsung-blu-ray-player-network-woes-and-solution/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 03:49:09 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/?p=56</guid>
		<description><![CDATA[So, we got this Samsung Blu-ray player that also does Netflix, Blockbuster, Pandora, etc. But of course, it needs a network connection. If you don&#8217;t have a LAN cable to plug in (we didn&#8217;t), then you have to buy Samsung&#8217;s ~$80 wireless network adaptor. Reportedly, it was originally on sale for $35, and is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=56&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>So, we got <a href="http://www.samsung.com/us/consumer/tv-video/blu-ray/blu-ray-players/BD-P1590/XAA/index.idx?pagetype=prd_detail&amp;returnurl=">this Samsung Blu-ray player</a> that also does Netflix, Blockbuster, Pandora, etc.  But of course, it needs a network connection.  </p>
<p>If you don&#8217;t have a LAN cable to plug in (we didn&#8217;t), then you have to buy Samsung&#8217;s ~$80 wireless network adaptor.  Reportedly, it was originally on sale for $35, and is the same hardware I believe, but, they probably discovered they could charge more.  I understand their position on this.  There are lots of network adaptors out there, they want one that already has the drivers on it because the player and TV don&#8217;t act like a computer and can download / install drivers.  However, they <em>could have</em> allowed you to connect a computer to it to download the needed drivers, but whatever.  Their product, their choice.</p>
<p>Anyway, we looked quite a bit for a USB adaptor and ways to resolve this without having to shell out $80 on top of the not-so-cheap player already.  I even considered dropping a LAN cable in the wall. </p>
<p>Anyway, you want to hear about the solution.  As it turns out we have AT&amp;T Uverse and their Motorola digital &#8220;STB&#8221; (set top box).  I was curious, if the LAN port on the back of the STB is not being used to feed it connection and using a coax cable instead, would the LAN port (RJ-45) share its connection?</p>
<p>I grabbed a short Cat 5 cable and tried it.  I went to the Menu &gt; Setup &gt; Network screen on the player and changed it from &#8220;Wireless&#8221; to &#8220;Cable.&#8221;  The next thing I saw was, &#8220;There&#8217;s a firmware update would you like to download it?&#8221;  Heck yes I would.  I tried it, and it started downloading!  My wife and I high-fived and will soon be watching movies from Netflix streaming.</p>
<p>Cheers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=56&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2010/02/27/samsung-blu-ray-player-network-woes-and-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>YourTable.reset_column_information</title>
		<link>http://codeprostitute.com/2009/11/17/rails-migration-make-database-changes-take-place-before-inserting-updating-records/</link>
		<comments>http://codeprostitute.com/2009/11/17/rails-migration-make-database-changes-take-place-before-inserting-updating-records/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 20:58:16 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/?p=51</guid>
		<description><![CDATA[Rails Migration: Make Database Changes Take Place Before Inserting / Updating Records Let&#8217;s say you have a table to create, and start using it right away, in the same script. If you try to use it right away, it will error out as the table doesn&#8217;t exist yet. class CreateJobLevels type) end end def self.down [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=51&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Rails Migration: Make Database Changes Take Place Before Inserting / Updating Records</strong></p>
<p>Let&#8217;s say you have a table to create, and start using it right away, in the same script.  If you try to use it right away, it will error out as the table doesn&#8217;t exist yet.</p>
<p><code>class CreateJobLevels  type)<br />
     end<br />
   end</p>
<p>   def self.down<br />
     drop_table :job_levels<br />
   end<br />
 end<br />
</code></p>
<p>You need to use:  <strong>reset_column_information</strong></p>
<p><code>class CreateJobLevels &lt; ActiveRecord::Migration<br />
   def self.up<br />
     create_table :job_levels do |t|<br />
       t.integer :id<br />
       t.string :name</p>
<p>       t.timestamps<br />
     end</p>
<p>     <strong>JobLevel.reset_column_information</strong><br />
     %w{assistant executive manager director}.each do |type|<br />
       JobLevel.create(:name =&gt; type)<br />
     end<br />
   end</p>
<p>   def self.down<br />
     drop_table :job_levels<br />
   end<br />
 end<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=51&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/11/17/rails-migration-make-database-changes-take-place-before-inserting-updating-records/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>undefined method `set_cookie&#8217; 2.3.3</title>
		<link>http://codeprostitute.com/2009/10/14/undefined-method-set_cookie-2-3-3/</link>
		<comments>http://codeprostitute.com/2009/10/14/undefined-method-set_cookie-2-3-3/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 18:39:00 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[2.3.3]]></category>
		<category><![CDATA[deprecated]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[set_cookie]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/?p=49</guid>
		<description><![CDATA[If you&#8217;re using &#8220;Tamper-proof cookies&#8221; like I am following this tutorial, and recently moved to rails 2.3.3, you may be getting this error: NoMethodError (undefined method `set_cookie&#8217; for #): It actually isn&#8217;t so much to do with Tamper-proof cookies, as it is that set_cookie has been deprecated in favor or http_only=. So, if you&#8217;re having [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=49&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using &#8220;Tamper-proof cookies&#8221; like I am following this <a href="http://thewebfellas.com/blog/2008/7/14/a-tamper-proof-cookie-jar-for-rails-development">tutorial</a>,<br />
and recently moved to rails 2.3.3, you may be getting this error:</p>
<p><strong>NoMethodError (undefined method `set_cookie&#8217; for #):</strong></p>
<p>It actually isn&#8217;t so much to do with Tamper-proof cookies, as it is that <strong>set_cookie</strong> has been deprecated in favor or <strong>http_only=</strong>.</p>
<p>So, if you&#8217;re having this issue, open lib/tamper_proof_cookie_jar.rb and search for &#8220;set_cookie&#8221; (should be line 38).</p>
<p>replace with this:<br />
<code><br />
      http_only=options<br />
</code></p>
<p>Or, anywhere you were using set_cookie, use http_only= instead.</p>
<p>Restart your app server (apache, mod_rails, mongrel&#8230;) and it should work for you now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=49&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/10/14/undefined-method-set_cookie-2-3-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>Snow Leopard Install, Ruby on Rails MySQL dev machine</title>
		<link>http://codeprostitute.com/2009/09/26/snow-leopard-install-ruby-on-rails-mysql-dev-machine/</link>
		<comments>http://codeprostitute.com/2009/09/26/snow-leopard-install-ruby-on-rails-mysql-dev-machine/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 06:19:13 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/?p=43</guid>
		<description><![CDATA[Here are some helpful notes if you&#8217;re upgrading to Snow Leopard (SL), and you do Ruby on Rails / MySQL development. From a dev perspective, there are a number of things that changed with the update to Leopard. On the Snow Leopard DVD, under “Optional Installs”, install “Xcode.mpkg”. Use all default options. If you were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=43&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Here are some helpful notes if you&#8217;re upgrading to Snow Leopard (SL), and you do Ruby on Rails / MySQL development.</p>
<p>From a dev perspective, there are a number of things that changed with the update to Leopard.</p>
<p>On the Snow Leopard DVD, under “Optional Installs”, install “Xcode.mpkg”. Use all default options.</p>
<p>If you were using MacPorts,it will need to be updated.<br />
Install the latest for SL (1.8.0):  <a href="http://www.macports.org/install.php">http://www.macports.org/install.php</a><br />
Then, follow this guide to update MacPorts &#8211; I suggest doing the manual method to make sure you don&#8217;t install stuff you don&#8217;t really need.  I installed coreutils, and it installed pretty much everything else I needed.  If you&#8217;re running MySQL through MacPorts, don&#8217;t add it back.  You&#8217;ll be guided by the Ruby on Rails guide to install the 64-bit version next.<br />
The user will probably want wget&#8230; installing that gets you openssl, zlib.<br />
<a href="http://trac.macports.org/wiki/Migration">http://trac.macports.org/wiki/Migration</a></p>
<p>Ruby on Rails__<br />
This is an excellent guide, do follow this:<br />
<a href="http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard">http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard</a>  Before you read this post and give up, look up your errors in the comments.  I had 2 or 3 issues and what do you know?  Others had the same issues, I followed a few of the comments where people address others&#8217; issues and viola&#8230; working nicely now.   <strong>Another tip for MySQL</strong>:  When you install MySQL from mysql.org, be sure to pick the right one.. I kept getting the PowerPC one because it was at the end and had a &#8220;64&#8243; on it&#8230; I realized I needed the other one.</p>
<p>This should get you through most of the changes for Ruby on Rails, and a good start on developer machines in general.</p>
<p>Post any questions you have.</p>
<p>Cheers,<br />
Richard</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=43&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/09/26/snow-leopard-install-ruby-on-rails-mysql-dev-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>64-bit OS X Snow Leopard defaults to 32-bit kernel</title>
		<link>http://codeprostitute.com/2009/09/11/64-bit-os-x-snow-leopard-defaults-to-32-bit-kernel/</link>
		<comments>http://codeprostitute.com/2009/09/11/64-bit-os-x-snow-leopard-defaults-to-32-bit-kernel/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:15:53 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[32-bit]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/?p=34</guid>
		<description><![CDATA[Why? It defaults to the 32-bit kernel on bootup because not all software you may have may be compiled / designed for 64-bit. Moving from 32 to 64 is a gradual process. 64-bit applications can still take advantage of being 64-bit and using multiple cores, but the kernel itself is still 32-bit by default. Only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=34&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Why?</strong><br />
It defaults to the 32-bit kernel on bootup because not all software you may have may be compiled / designed for 64-bit.  Moving from 32 to 64 is a gradual process.  64-bit applications can still take advantage of being 64-bit and using multiple cores, but the kernel itself is still 32-bit by default.  Only Snow Leopard Xserve boots into 64-bit kernel by default.</p>
<p><strong>How do you change this?<br />
</strong>If you have a machine capable of 64-bit processing, and you&#8217;re bold enough to go 64 only, hold down <strong>6</strong> and <strong>4</strong> on boot up.  It will make the machine boot up in 64-bit kernel mode &#8211; but be ready for 32-bit applications to break.</p>
<p>Here&#8217;s how you find out if you&#8217;re machine is capable of 64-bit processing:<br />
<a href="http://support.apple.com/kb/HT3696">http://support.apple.com/kb/HT3696</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=34&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/09/11/64-bit-os-x-snow-leopard-defaults-to-32-bit-kernel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>Snow Leopard upgrade, Exchange 2007, PlugSuit, VPN</title>
		<link>http://codeprostitute.com/2009/09/10/snow-leopard-upgrade-exchange-2007-plugsuit-vpn/</link>
		<comments>http://codeprostitute.com/2009/09/10/snow-leopard-upgrade-exchange-2007-plugsuit-vpn/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 22:53:51 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[PlugSuit]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/2009/09/10/snow-leopard-upgrade-exchange-2007-plugsuit-vpn/</guid>
		<description><![CDATA[The main reason for me to upgrade is to start using Mail and iCal and leave the daily torture of using Entourage. Mail and iCal work great. I had a little tweaking to do to make it check Exchange mail through our external URL (webmail). Just had to use the full UPN (UserPrincipalName) for the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=33&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>The main reason for me to upgrade is to start using Mail and iCal and leave the daily torture of using Entourage.</p>
<p>Mail and iCal work great.  I had a little tweaking to do to make it check Exchange mail through our external URL (webmail).  Just had to use the full UPN (UserPrincipalName) for the username, AD password, and the external URL for both internal and external servers.  </p>
<p>The PlugSuit is incompatible (particularly with Quicktime I think).  <a href="http://infinite-labs.net/kb/plugsuit/ps-remove-on-10.6.html">Here</a> is how you disable it (you might have to enable and then disable it for the disabling to take).</p>
<p>When trying to start VPN, I got the horrible CiscoVPN Error 51 I complained and solved <a href="http://codeprostitute.com/2008/06/19/cisco-vpn-error-51-unable-to-communicate-with-the-vpn-subsystem/">here</a>.</p>
<p>But this time, I couldn&#8217;t fix it.  It seems the CiscoVPN folder I referenced was removed.  After some investigation, I found that Apple has included VPN capabilities into the OS.  You just go to your System Preferences, Network, and hit the + to add a new network interface, select VPN.  Then select whatever VPN parameters you need to &#8211; check with your pleasant and always helpful IT Admin for the params.</p>
<p>Cheers,<br />
R</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=33&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/09/10/snow-leopard-upgrade-exchange-2007-plugsuit-vpn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Bad CPU type in executable&#8221; MySQL upgrade for 64-bit following Snow Leopard install</title>
		<link>http://codeprostitute.com/2009/09/10/bad-cpu-type-in-executable-mysql-upgrade-for-64-bit-following-snow-leopard-install/</link>
		<comments>http://codeprostitute.com/2009/09/10/bad-cpu-type-in-executable-mysql-upgrade-for-64-bit-following-snow-leopard-install/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 22:35:12 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.6 MySQL]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/2009/09/10/bad-cpu-type-in-executable-mysql-upgrade-for-64-bit-following-snow-leopard-install/</guid>
		<description><![CDATA[Recently, like many others, I upgraded to Snow Leopard on my MBP. I do lots of development on my machine (Ruby on Rails, MySQL, Java, .NET over VMWare + Vista Ultimate, etc.). I&#8217;ll post my thoughts on the whole experience, but in this post, I want to highlight an issue I ran across. I was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=32&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, like many others, I upgraded to Snow Leopard on my MBP.  I do lots of development on my machine (Ruby on Rails, MySQL, Java, .NET over VMWare + Vista Ultimate, etc.).  </p>
<p>I&#8217;ll post my thoughts on the whole experience, but in this post, I want to highlight an issue I ran across.</p>
<p>I was previously running 32-bit MySQL 5.0 installed over Mac Ports.  After I ran through <a href="http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard">this great post</a> on upgrading to SL, I found I started getting this error in my RoR log:</p>
<p>Bad CPU type in executable&#8230;</p>
<p>As it turns out, I actually had installed &#8220;Mac OS X 10.5 (PowerPC, 64-bit)&#8221; from <a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">MySQL</a>, instead of what I should have installed:  Mac OS X 10.5 (x86_64).  </p>
<p>The solution:<br />
Just download the right one and install it.  I have a 64-bit capable, Intel Core 2 Duo processor, so this was the right one for me.  <a href="http://support.apple.com/kb/HT3696">Here&#8217;s</a> how you find out what you have.</p>
<p>Good luck!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=32&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/09/10/bad-cpu-type-in-executable-mysql-upgrade-for-64-bit-following-snow-leopard-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby / Rails:  Remove Extra Space</title>
		<link>http://codeprostitute.com/2009/05/01/ruby-rails-remove-extra-space/</link>
		<comments>http://codeprostitute.com/2009/05/01/ruby-rails-remove-extra-space/#comments</comments>
		<pubDate>Fri, 01 May 2009 18:16:24 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rails ruby squeeze strip space]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/2009/05/01/ruby-rails-remove-extra-space/</guid>
		<description><![CDATA[&#8230;or anything else you want from a string. " myemail @ address. co m ".gsub(/\s/, '') gsub() substitutes all instances found (g = global), if you just want to substitute the first instance use sub() Or, if you want to trim the whitespace from each end: result = " myemail@address.com ".strip To just trim the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=28&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>&#8230;or anything else you want from a string.</p>
<p><code><br />
" myemail @ address. co m ".gsub(/\s/, '')<br />
</code></p>
<p><strong>gsub()</strong> substitutes all instances found (g = global), if you just want to substitute the first instance use <strong>sub()</strong></p>
<p>Or, if you want to trim the whitespace from each end:</p>
<p><code><br />
result = " myemail@address.com ".strip<br />
</code></p>
<p>To just trim the whitespace on the left or the right, use these (respectively):<br />
<code>lstrip()</code><br />
<code>rstrip()</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=28&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/05/01/ruby-rails-remove-extra-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL:  Reset ID Auto-Increment</title>
		<link>http://codeprostitute.com/2009/02/13/mysql-reset-id-auto-increment/</link>
		<comments>http://codeprostitute.com/2009/02/13/mysql-reset-id-auto-increment/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 22:10:21 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[auto-increment]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/2009/02/13/mysql-reset-id-auto-increment/</guid>
		<description><![CDATA[ALTER TABLE tablename AUTO_INCREMENT = 1 Auto-increment is the thing that makes the primary key (integer) increment by 1 each time a record is inserted. Say you have 10 records (1..10). If you delete 9 and 10, the next ID is going to be 11, not 9. However, if you run the SQL command above, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=22&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><code>ALTER TABLE tablename AUTO_INCREMENT = 1</code></p>
<p>Auto-increment is the thing that makes the primary key (integer) increment by 1 each time a record is inserted.  Say you have 10 records (1..10).  If you delete 9 and 10, the next ID is going to be 11, not 9.  However, if you run the SQL command above, you can reset it to the last record ID, plus 1 &#8211; making the next record in this example, 9.</p>
<p>If you happen to want to do this in a migration file, just use &#8220;execute.&#8221;</p>
<p><code>def self.up<br />
execute 'ALTER TABLE tablename AUTO_INCREMENT = 1'<br />
# then go on to populate the right way<br />
Skill.create(:id =&gt; 1, :name =&gt; 'Ajax')<br />
...<br />
end</code></p>
<p><code>def self.down<br />
Skill.find(:all).each { |s| s.destroy }<br />
end</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=22&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/02/13/mysql-reset-id-auto-increment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
		<item>
		<title>Mirroring script for SQL Server / Sharepoint</title>
		<link>http://codeprostitute.com/2009/01/23/mirroring-script-for-sql-server-sharepoint/</link>
		<comments>http://codeprostitute.com/2009/01/23/mirroring-script-for-sql-server-sharepoint/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 16:31:07 +0000</pubDate>
		<dc:creator>codeprostitute</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[sps sharepoint sql batch]]></category>

		<guid isPermaLink="false">http://codeprostitute.com/2009/01/23/mirroring-script-for-sql-server-sharepoint/</guid>
		<description><![CDATA[http://spadmin.spaces.live.com/blog/cns!F030C52B8E5517C3!352.entry I was working in one of my SharePoint test labs this weekend, and decided to write a script that would recycle, stop or start all of the SharePoint Key services. Copy the text and save it as ManageServices.bat Enjoy @ECHO OFF :CHOICE CLS ECHO. ECHO ********************************************************************** ECHO. ECHO ** Recycle, Stop, Start SharePoint Key [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=21&subd=codeprostitute&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>http://spadmin.spaces.live.com/blog/cns!F030C52B8E5517C3!352.entry</p>
<p>I was working in one of my SharePoint test labs this weekend, and decided to write a script that would recycle, stop or start all of the SharePoint Key services. Copy the text and save it as ManageServices.bat</p>
<p>Enjoy</p>
<p>@ECHO OFF<br />
:CHOICE<br />
CLS<br />
ECHO.<br />
ECHO **********************************************************************<br />
ECHO.<br />
ECHO ** Recycle, Stop, Start SharePoint Key Services<br />
ECHO.<br />
ECHO ** Created April 23 2008<br />
ECHO ** Gene Magerr<br />
ECHO ** genemagerr@hotmail.com<br />
ECHO ** Version 1.0 &#8211; April 23 2008<br />
ECHO **         1.1 -<br />
ECHO **         1.2 -<br />
ECHO **<br />
ECHO **<br />
ECHO ** You have a royalty-free right to use, modify, reproduce, and<br />
ECHO ** distribute this script file in any way you find useful, provided that<br />
ECHO ** you agree that the creator, owner above has no warranty, obligations,<br />
ECHO ** or liability for such use.<br />
ECHO.<br />
ECHO ** This batch file will Recycle, Stop or Start all of the key<br />
ECHO ** SharePoint 2007 services. It will also do an IISRESET /NOFORCE<br />
ECHO ** after each of the tasks.<br />
ECHO.<br />
ECHO **********************************************************************<br />
ECHO.<br />
ECHO Please choose a menu option.<br />
ECHO.<br />
ECHO Recycle all services &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. 1<br />
ECHO Stop all services &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. 2<br />
ECHO Start all services &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; 3<br />
ECHO Quit (without affecting services) &#8230;&#8230;&#8230; 4<br />
ECHO.<br />
CHOICE /C:1234 /N /T:180 /D:4<br />
ECHO.</p>
<p>IF ERRORLEVEL == 4 GOTO END<br />
IF ERRORLEVEL == 3 GOTO START<br />
IF ERRORLEVEL == 2 GOTO STOP<br />
IF ERRORLEVEL == 1 GOTO RECYCLE</p>
<p>:RECYCLE<br />
ECHO Stopping and restarting key services<br />
ECHO.<br />
net stop oSearch<br />
net stop SPAdmin<br />
net stop SPTimerv3<br />
net stop SPTrace<br />
net start oSearch<br />
net start SPAdmin<br />
net start SPTimerv3<br />
net start SPTrace<br />
PING 1.1.1.1 -n 1 -w 2000 &gt;NUL<br />
ECHO Recycling IIS<br />
ECHO.<br />
IISRESET /NOFORCE<br />
PAUSE<br />
GOTO CHOICE</p>
<p>:STOP<br />
ECHO Stopping key services<br />
ECHO.<br />
net stop oSearch<br />
net stop SPAdmin<br />
net stop SPTimerv3<br />
net stop SPTrace<br />
PING 1.1.1.1 -n 1 -w 2000 &gt;NUL<br />
ECHO Stopping IIS<br />
ECHO.<br />
IISRESET /STOP<br />
PAUSE<br />
GOTO CHOICE</p>
<p>:START<br />
ECHO Starting key services<br />
net start oSearch<br />
net start SPAdmin<br />
net start SPTimerv3<br />
net start SPTrace<br />
PING 1.1.1.1 -n 1 -w 2000 &gt;NUL<br />
ECHO Starting IIS<br />
ECHO.<br />
IISRESET /START<br />
PAUSE<br />
GOTO CHOICE</p>
<p>:END</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeprostitute.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeprostitute.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeprostitute.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeprostitute.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeprostitute.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeprostitute.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeprostitute.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeprostitute.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeprostitute.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeprostitute.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeprostitute.com&blog=514134&post=21&subd=codeprostitute&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codeprostitute.com/2009/01/23/mirroring-script-for-sql-server-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc64af99efb447b9f3051865eccc597?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codeprostitute</media:title>
		</media:content>
	</item>
	</channel>
</rss>