<?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>paul schreiber &#187; public service announcement</title>
	<atom:link href="http://paulschreiber.com/blog/category/public-service-announcement/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulschreiber.com</link>
	<description>tagline goes here</description>
	<lastBuildDate>Wed, 18 Jan 2012 04:06:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ontario 2011 Election results, consolidated</title>
		<link>http://paulschreiber.com/blog/2011/10/14/ontario-2011-election-results-consolidated/</link>
		<comments>http://paulschreiber.com/blog/2011/10/14/ontario-2011-election-results-consolidated/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 05:59:48 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=2203</guid>
		<description><![CDATA[If you don&#8217;t want to download and parse 107 pages of Elections Ontario data, I&#8217;ve gathered it for you:]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want to <a href="http://www.wemakevotingeasy.ca/en/general-election-district-results.aspx?d=001">download</a> <a href="http://www.wemakevotingeasy.ca/en/general-election-district-results.aspx?d=002">and</a> <a href="http://www.wemakevotingeasy.ca/en/general-election-district-results.aspx?d=003">parse</a> <a href="http://www.wemakevotingeasy.ca/en/general-election-district-results.aspx?d=004">107</a> <a href="http://www.wemakevotingeasy.ca/en/general-election-district-results.aspx?d=005">pages</a> of Elections Ontario data, I&#8217;ve gathered it for you:</p>
<p><script src="https://gist.github.com/1289124.js?file=OntarioElection2011.txt"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/10/14/ontario-2011-election-results-consolidated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7198299 Canada Limited</title>
		<link>http://paulschreiber.com/blog/2011/05/03/7198299-canada-limited/</link>
		<comments>http://paulschreiber.com/blog/2011/05/03/7198299-canada-limited/#comments</comments>
		<pubDate>Tue, 03 May 2011 20:21:07 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=2120</guid>
		<description><![CDATA[7198299 Canada Limited is Red Chili Thai, 1266 Danforth Avenue in Toronto. [for Google]]]></description>
			<content:encoded><![CDATA[<p>7198299 Canada Limited is Red Chili Thai, 1266 Danforth Avenue in Toronto. [for Google]</p>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/05/03/7198299-canada-limited/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOWTO count words in JavaScript</title>
		<link>http://paulschreiber.com/blog/2011/03/03/howto-count-words-in-javascript/</link>
		<comments>http://paulschreiber.com/blog/2011/03/03/howto-count-words-in-javascript/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 22:36:57 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=2086</guid>
		<description><![CDATA[Here is a handy JavaScript function for counting words: String.prototype.countWords = function(value) { // remove html tags var cleanedText = this.replace(/< .[^]*?>/g, ' ') // remove numbers and punctuation .replace(/[–—.(),;:!?%#$‘’“”'"_+=\/\-]*/g, '') // remove/coalesce space chars .replace(/(&#38;nbsp;&#124;&#38;#160;&#124;[ ])+/gi, ' '); // &#8230; <a href="http://paulschreiber.com/blog/2011/03/03/howto-count-words-in-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a handy JavaScript function for counting words:</p>
<blockquote class="code">String.prototype.countWords = function(value) {
  // remove html tags
  var cleanedText = this.replace(/< .[^<>]*?>/g, ' ')
  // remove numbers and punctuation
  .replace(/[–—.(),;:!?%#$‘’“”'"_+=\/\-]*/g, '')
  // remove/coalesce space chars
  .replace(/(&amp;nbsp;|&amp;#160;|[ ])+/gi, ' ');
  // don't split "" into words, as you'll get 1 ([""])
  if (cleanedText === "") { return 0; }
  // count words
  return cleanedText.split(/\W/).length;
}</blockquote>]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/03/03/howto-count-words-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO set up IMAP email for Yahoo</title>
		<link>http://paulschreiber.com/blog/2011/02/19/howto-set-up-imap-email-for-yahoo/</link>
		<comments>http://paulschreiber.com/blog/2011/02/19/howto-set-up-imap-email-for-yahoo/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 18:21:37 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[yahoo]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=2054</guid>
		<description><![CDATA[A few weeks ago, I was helping my cousins set up their new iMac. Once everything was up and running, she inquired about adding their Yahoo account to Mail. The conventional wisdom says you can&#8217;t do this. Yahoo charges for &#8230; <a href="http://paulschreiber.com/blog/2011/02/19/howto-set-up-imap-email-for-yahoo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I was helping my cousins set up their new iMac. Once everything was up and running, she inquired about adding their Yahoo account to Mail. The conventional wisdom says you can&#8217;t do this. Yahoo charges for POP access. IMAP? Unavailable.</p>
<p>But then she hands me her new iPod touch…with her Yahoo mail account working just fine. It must get the mail <em>somehow</em>. And it&#8217;s highly unlikely Apple wrote some sort of custom HTTP-Mail transport just for them.</p>
<p>You <em>can</em> have IMAP access to your Yahoo Mail account. For free. Here&#8217;s how.</p>
<h3>Cutting to the chase</h3>
<p>IMAP server: apple.imap.mail.yahoo.com (username = Yahoo ID)<br />
SMTP server: apple.smtp.mail.yahoo.com (username = yahooid@yahoo.com)<br />
SSL enabled. Authentication = password.</p>
<h3>Step-by-step guide to configuring Mac OS X Mail for Yahoo</h3>
<ol>
<li>Go to Mail > Preferences…</li>
<li>Click Accounts (toolbar)</li>
<li>Click + (lower left)</li>
<li>You’ll see the first pane of the wizard. Enter your email address and password. Then click Continue.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/1-Yahoo-wizard.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/1-Yahoo-wizard-300x217.png" alt="" title="1 Yahoo wizard" width="300" height="217" class="alignnone size-medium wp-image-2056" /></a></li>
<li>Mail recognizes this as a Yahoo account. But you&#8217;re not a paying Yahoo Mail Plus customer, and don&#8217;t have access to the POP server. Don&#8217;t worry. That&#8217;s okay. Click Continue anyway.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/2-Yahoo-wizard-error.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/2-Yahoo-wizard-error-300x217.png" alt="" title="2 Yahoo wizard error" width="300" height="217" class="alignnone size-medium wp-image-2057" /></a></li>
<li>On the next screen, select IMAP from the popup and enter <strong>apple.imap.mail.yahoo.com</strong> as the server name.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/3A-Yahoo-wizard-IMAP-OK.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/3A-Yahoo-wizard-IMAP-OK-300x217.png" alt="" title="3A Yahoo wizard IMAP OK" width="300" height="217" class="alignnone size-medium wp-image-2059" /></a></p>
<p>Note: most of the instructions on the internet tell you to enter imap.apple.mail.yahoo.com. While this also works, you&#8217;ll get an SSL error:<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/4-SSL-error-1.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/4-SSL-error-1-300x123.png" alt="" title="4 SSL error 1" width="300" height="123" class="alignnone size-medium wp-image-2060" /></a></p>
<p>since Yahoo&#8217;s wildcard certificate is for <code>*.imap.mail.yahoo.com</code>. If you do this, you have to click Show Certificate, check the &#8220;Always trust…&#8221; checkbox, click connect and enter your Mac OS username and password. </p>
<p>Why bother?</li>
<li>Next, enter <strong>apple.smtp.mail.yahoo.com</strong> as your SMTP server. Enter your username (<em>full yahoo email address</em>) and password and click Continue:<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/7-Yahoo-wizard-SMTP.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/7-Yahoo-wizard-SMTP-300x217.png" alt="" title="7 Yahoo wizard SMTP" width="300" height="217" class="alignnone size-medium wp-image-2073" /></a></li>
<li>The good news: Mail has recognized this as not just an IMAP account, but a <em>Yahoo</em> IMAP account.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/8-Mail-recognizes-Yahoo.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/8-Mail-recognizes-Yahoo-292x300.png" alt="" title="8 Mail recognizes Yahoo" width="292" height="300" class="alignnone size-medium wp-image-2064" /></a></p>
<p>The bad news: it thinks it&#8217;s a POP account, and has set the port to 995.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/9-Port-is-wrong.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/9-Port-is-wrong-292x300.png" alt="" title="9 Port is wrong" width="292" height="300" class="alignnone size-medium wp-image-2065" /></a></p>
<p>Change the port to 993.</li>
<li>Finally, we need to set up the Junk mail folder. Click the Mailbox Behaviors tab. Besides Junk, check &#8220;Store Junk messages on the server.&#8221;
<p>Then, close the preferences window. When prompted, click Save.</li>
<li>Now, put your feet up. Depending on the amount of email you have, it could take an hour or more to download it all. Yeah, you whose friends email them photos instead of posting them to Flickr. That&#8217;s right. You.
<p>Once that&#8217;s done, you need to identify four mailboxes as special: Draft(s), Trash, Sent and Bulk Mail (Junk).</p>
<p>Select the Draft folder. Then select Mailbox > Use This Mailbox For > Drafts:<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/11-Use-for-draft.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/11-Use-for-draft-155x300.png" alt="" title="11 Use for draft" width="155" height="300" class="alignnone size-medium wp-image-2074" /></a></p>
<p>Select the Trash folder. Then select Mailbox > Use This Mailbox For > Trash:</p>
<p><a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/12-Use-for-Trash.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/12-Use-for-Trash-191x300.png" alt="" title="12 Use for Trash" width="191" height="300" class="alignnone size-medium wp-image-2075" /></a></p>
<p>Repeat for Sent and Bulk Mail.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/02/19/howto-set-up-imap-email-for-yahoo/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>HOWTO setup multistage deployment with Capistrano</title>
		<link>http://paulschreiber.com/blog/2011/02/12/howto-setup-multistage-deployment-with-capistrano/</link>
		<comments>http://paulschreiber.com/blog/2011/02/12/howto-setup-multistage-deployment-with-capistrano/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 01:24:29 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[multistage]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[staging]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=2013</guid>
		<description><![CDATA[When I wrote about deploying PHP sites with Capistrano, step 6 was a bit of a throwaway — hey, here's a quick hack for handling multistage deployment. I'd been using variants of that technique for quite some time but figured &#8230; <a href="http://paulschreiber.com/blog/2011/02/12/howto-setup-multistage-deployment-with-capistrano/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I wrote about <a href="http://paulschreiber.com/blog/2009/03/15/howto-deploy-php-sites-with-capistrano-2/">deploying PHP sites with Capistrano</a>, step 6 was a bit of a throwaway — hey, here's a quick hack for handling multistage deployment. I'd been using variants of that technique for quite some time but figured there must be a better way. There is: <a href="http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage">Capistrano multistage</a>. There is even <a href="https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension">documentation</a> for this. But it misses a few steps.</p>
<h3>How to setup multistage deployment with Capistrano</h3>
<ol>
<li>Install capistrano and capistrano multistage</li>
<li>Capify your project</li>
<li>Set up the <code>deploy/</code> directory</li>
<li>Create the deployment recipes</li>
</ol>
<p>In my Rails-based example, we'll have two stages: <em>staging</em> and <em>production</em>. You can name your stages whatever you want. However, don’t name one of your stages <em>stage</em> — that's a reserved word. Call it <em>staging</em>.</p>
<h3>Install capistrano and capistrano multistage</h3>
<p><code>gem install capistrano
<br />gem install capistrano-ext</code></p>
<h3>Capify your project</h3>
<p><code>capify .</code></p>
<h3>Set up the <code>deploy</code> directory</h3>
<p><code>
mkdir config/deploy
<br />touch config/deploy/staging.rb
<br />touch config/deploy/production.rb
</code>
</p>
<h3>Create the deployment recipes</h3>
<p>You’re going to edit three files: <code>deploy.rb</code>, <code>staging.rb</code> and <code>production.rb</code>:</p>
<h4>deploy.rb</h4>
<blockquote class="code">set :stages, %w(staging production)
set :default_stage, "production"
require 'capistrano/ext/multistage'
<br />default_run_options[:pty] = true
<br />set :application, "myproject"
set :use_sudo, false
set :keep_releases, 5
<br />set :repository,  "https://somewhere/svn/myproject/trunk"
set :scm, :subversion
set :scm_username, "me"
set :deploy_via, :export
<br /># this is useful in a shared hosting environment, where you have your own JAVA_HOME or GEM_HOME.
# otherwise, just set RAILS_ENV
set(:rake) { "JAVA_HOME=#{java_home} GEM_HOME=#{gem_home} RAILS_ENV=#{rails_env} /usr/bin/env rake" }
<br /># since :domain is defined in another file (staging.rb and production.rb),
# we need to delay its assignment until they're loaded
set(:domain) { "#{domain}" }
role(:web) { domain }
role(:app) { domain }
role(:db, :primary => true) { domain }
<br />namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end
<br /># for some reason, this isn't enabled by default
after "deploy:update", "deploy:cleanup"
<br /># here is an example task which uses rake, as defined above
after "deploy:migrate", "load_sample_fixtures"
desc "load sample fixtures"
task :load_sample_fixtures do
  run "cd #{current_release}; FIXTURES=samples #{rake} db:fixtures:load"
end
</blockquote>
<h4>staging.rb</h4>
<blockquote class="code">set :deploy_to, "/path/to/#{application}-stage"
# My Rails app uses RJB, so it needs to know where Java lives
set :java_home, "/path/to/java-6-openjdk"
set :domain, "testing.myserver.ca"
set :user, "paul"
set :rails_env, "staging"
# I am root on my staging server and have all the right gems installed
# so I don't need GEM_HOME to be overridden
set :gem_home, nil
</blockquote>
<h4>production.rb</h4>
<blockquote class="code">set :deploy_to, "/home/myuser/#{application}"
set :java_home, "/home/myuser/sw/jdk"
set :domain, "www.myserver.ca"
set :user, "myuser"
set :rails_env, "production"
set :gem_home, "/home/myuser/ruby/gems/"
<br /># in a shared hosting environment, you often need to specify your own passenger configuration
desc "copy the .htaccess file (passenger configuration); setup_load_paths.rb (sets GEM_HOME)"
namespace :deploy do
  task :copy_htaccess do
    run "cp #{current_release}/config/htaccess_production #{current_release}/public/.htaccess"
    run "mv #{current_release}/config/production_setup_load_paths.rb #{current_release}/config/setup_load_paths.rb"
  end
end
<br />after "deploy:update_code", "deploy:copy_htaccess"
</blockquote>
<p>Now, you’re set. You can deploy with <code>cap deploy</code> (for the default stage, production), or <code>cap staging deploy</code>. <a href="http://macromates.com/">TextMate</a>'s Capistrano plugin handles this gracefully, presenting you with a dialog listing the available stages.</p>]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/02/12/howto-setup-multistage-deployment-with-capistrano/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fixing iChat Google Talk login failures</title>
		<link>http://paulschreiber.com/blog/2011/02/09/fixing-ichat-google-talk-login-failures/</link>
		<comments>http://paulschreiber.com/blog/2011/02/09/fixing-ichat-google-talk-login-failures/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 21:27:05 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[public service announcement]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=1992</guid>
		<description><![CDATA[I was helping a friend set up her new iBook MacBook yesterday, and we were unable to get iChat to log in to her Google Talk account. We kept seeing this error: iChat can&#8217;t log in to talk.google.com because your &#8230; <a href="http://paulschreiber.com/blog/2011/02/09/fixing-ichat-google-talk-login-failures/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was helping a friend set up her new <strike>iBook</strike> MacBook yesterday, and we were unable to get iChat to log in to her Google Talk account.</p>
<p>We kept seeing this error:</p>
<blockquote><p>
iChat can&#8217;t log in to talk.google.com because your login ID or password is incorrect.<br />
<a class="inline" href="http://paulschreiber.com/wp-content/uploads/2011/02/Screen-shot-2011-02-09-at-3.08.28-PM.png"><img src="http://paulschreiber.com/wp-content/uploads/2011/02/Screen-shot-2011-02-09-at-3.08.28-PM-300x220.png" alt="" title="Screen shot 2011-02-09 at 3.08.28 PM" width="300" height="220" class="alignnone size-medium wp-image-1997" /></a>
</p></blockquote>
<p>And this XMPP error was logged to Console:</p>
<blockquote><p>
iChatAgent[33567]	[Warning] JConnection: Error: Error Domain=XMPPErrorDomain Code=10 &#8220;The operation couldn’t be completed. (XMPPErrorDomain error 10.)&#8221;
</p></blockquote>
<p>When we tried the same username and password on gmail.com in Safari, it worked. It also worked logging in to Google Talk using Adium.</p>
<p>So what&#8217;s going on? Well, my Google Account is paulschreiber@gmail.com. Most people know Google also accepts emails sent to paul.schreiber@gmail.com. What I <em>didn&#8217;t</em> know is that you can also use paul.schreiber <em>as a username</em>. Most of the time.</p>
<p>Let me explain with a chart:</p>
<table>
<tr>
<th>username</th>
<th>gmail.com</th>
<th>iChat</th>
<th>Adium</th>
</tr>
<tr>
<td>paulschreiber</td>
<td>YES</td>
<td>YES</td>
<td>YES</td>
</tr>
<tr>
<td>paul.schreiber</td>
<td>YES</td>
<td>NO</td>
<td>YES</td>
</tr>
</table>
<p>The problem was the dot. Once we removed it, we could log in successfully.</p>
<p>I assume the same thing happens if your actual username has a dot and you remove it.</p>
<p>Filed with Apple as <a href="radar:8978731">Radar 8978731</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/02/09/fixing-ichat-google-talk-login-failures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress batch upgrade</title>
		<link>http://paulschreiber.com/blog/2011/01/02/wordpress-batch-upgrade/</link>
		<comments>http://paulschreiber.com/blog/2011/01/02/wordpress-batch-upgrade/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 06:45:37 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[tech]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=1864</guid>
		<description><![CDATA[If you run a web server and have multiple installations of WordPress, upgrading them all is a pain. Wouldn&#8217;t it be nice if you could update a dozen WP installs at once? Wouldn&#8217;t it be even better if you could &#8230; <a href="http://paulschreiber.com/blog/2011/01/02/wordpress-batch-upgrade/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you run a web server and have multiple installations of WordPress, upgrading them all is a pain. </p>
<p>Wouldn&#8217;t it be nice if you could update a dozen WP installs at once? Wouldn&#8217;t it be even better if you could update the Akismet plugin at the same time? (WordPress releases independently of Akimset, and their subversion tags doesn&#8217;t track Akismet&#8217;s trunk).</p>
<p>Now you can. Inspired by <a href="http://birdhouse.org/software/2010/08/wordpress-mass-management/">Scot Hacker&#8217;s WordPress Mass Management Tools</a>, I created <a href="https://github.com/paulschreiber/misc/tree/master/python/wordpress">wp-upgrade</a>.</p>
<h3>Usage</h3>
<p><code>$ cd /path/to/wp-upgrade<br />
$ sudo ./wp-upgrade.py 3.0.4<br />
</code></p>
<h3>Configuration</h3>
<p>You need to configure two files before starting:</p>
<ul>
<li><code>sites.txt</code> a tab-delimited file with information about the sites you&#8217;ll be upgrading (path, url, email address of owner, userid of owner)</li>
<li><code>wp-upgrade.txt</code> an email with instructions to your users</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2011/01/02/wordpress-batch-upgrade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to solve the &#8220;undefined method `deep_symbolize_keys&#8217; for nil:NilClass&#8221; error in Rails</title>
		<link>http://paulschreiber.com/blog/2010/12/09/how-to-solve-the-undefined-method-deep_symbolize_keys-for-nilnilclass-error-in-rails/</link>
		<comments>http://paulschreiber.com/blog/2010/12/09/how-to-solve-the-undefined-method-deep_symbolize_keys-for-nilnilclass-error-in-rails/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 03:39:38 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[tech]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=1813</guid>
		<description><![CDATA[I was trying to migrate a table in my Rails app and got this error: undefined method `deep_symbolize_keys' for nil:NilClass It&#8217;s a strange error, and there weren&#8217;t very many hits on Google. A lighthouse ticket provided a clue. The problem &#8230; <a href="http://paulschreiber.com/blog/2010/12/09/how-to-solve-the-undefined-method-deep_symbolize_keys-for-nilnilclass-error-in-rails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was trying to migrate a table in my Rails app and got this error:<br />
  <code>undefined method `deep_symbolize_keys' for nil:NilClass</code></p>
<p>It&#8217;s a strange error, and there weren&#8217;t very many hits on Google. A <a href="http://railsdog.lighthouseapp.com/projects/31096/tickets/1607-generating-an-extension-has-some-issues">lighthouse ticket</a> provided a clue.</p>
<p>The problem wasn&#8217;t one of my plugins or gems — it was i18n itself. Upgrading from 0.4.1 to 0.5.0 solved my problem. (I am using Rails 2.3.10.)</p>
<p>Here&#8217;s the full stack trace:</p>
<blockquote class="code"><p>
$ rake db:migrate RAILS_ENV=production  &#8211;trace<br />
(in /home/loranaw/apply/releases/20101210024212)<br />
** Invoke db:migrate (first_time)<br />
** Invoke environment (first_time)<br />
** Execute environment<br />
rake aborted!<br />
undefined method `deep_symbolize_keys&#8217; for nil:NilClass<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/simple.rb:34:in `store_translations&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:215:in `load_file&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:215:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:215:in `load_file&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:21:in `load_translations&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:21:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:21:in `load_translations&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/simple.rb:57:in `init_translations&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/simple.rb:40:in `available_locales&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n/config.rb:38:in `available_locales&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/i18n-0.4.1/lib/i18n.rb:35:in `available_locales&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:226:in `valid_locale?&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:243:in `parse_extensions&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:233:in `split&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:118:in `initialize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:92:in `new&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:92:in `create_template&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:87:in `templates_in_path&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:86:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:86:in `templates_in_path&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/template.rb:69:in `load!&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:173:in `to_proc&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/paths.rb:40:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.10/lib/action_view/paths.rb:40:in `load!&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/initializer.rb:402:in `load_view_paths&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/initializer.rb:194:in `process&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/initializer.rb:113:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/initializer.rb:113:in `run&#8217;<br />
/home/loranaw/apply/releases/20101210024212/config/environment.rb:9<br />
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#8217;<br />
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/tasks/misc.rake:4<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31<br />
/usr/bin/rake:19:in `load&#8217;<br />
/usr/bin/rake:19
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2010/12/09/how-to-solve-the-undefined-method-deep_symbolize_keys-for-nilnilclass-error-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FedEx location in Burlington, Ontario Canada</title>
		<link>http://paulschreiber.com/blog/2010/10/04/fedex-location-in-burlington-ontario-canada/</link>
		<comments>http://paulschreiber.com/blog/2010/10/04/fedex-location-in-burlington-ontario-canada/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 23:37:10 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=1679</guid>
		<description><![CDATA[This was a bit hard to find: FedEx Burlngton 4243 North Service Road Burlington ON L7L 4X6 Canada (905) 332-4647]]></description>
			<content:encoded><![CDATA[<p>This was a bit hard to find:</p>
<address>FedEx Burlngton<br />
4243 North Service Road<br />
Burlington ON L7L 4X6<br />
Canada<br />
</address>
<p>(905) 332-4647</p>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2010/10/04/fedex-location-in-burlington-ontario-canada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO install the rjb gem on Ubuntu and Mac OS X</title>
		<link>http://paulschreiber.com/blog/2010/08/07/howto-install-the-rjb-gem-on-ubuntu-and-mac-os-x/</link>
		<comments>http://paulschreiber.com/blog/2010/08/07/howto-install-the-rjb-gem-on-ubuntu-and-mac-os-x/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 19:44:19 +0000</pubDate>
		<dc:creator>paulschreiber</dc:creator>
				<category><![CDATA[public service announcement]]></category>
		<category><![CDATA[tech]]></category>
		<guid isPermaLink="false">http://paulschreiber.com/?p=1655</guid>
		<description><![CDATA[Here&#8217;s how to install the Ruby Java Bridge (rjb) gem on Ubuntu Linux and Mac OS X: Ubuntu Linux (10.10) # aptitude install openjdk-6-jre-headless openjdk-6-jdk # JAVA_HOME=/usr/lib/jvm/java-6-openjdk gem install rjb Mac OS X 10.6.4 # JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home gem install rjb Note: &#8230; <a href="http://paulschreiber.com/blog/2010/08/07/howto-install-the-rjb-gem-on-ubuntu-and-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to install the <a href="http://rjb.rubyforge.org/">Ruby Java Bridge</a> (rjb) gem on Ubuntu Linux and Mac OS X:</p>
<h3>Ubuntu Linux (10.10)</h3>
<blockquote class="code"><p># aptitude install openjdk-6-jre-headless openjdk-6-jdk<br />
# JAVA_HOME=/usr/lib/jvm/java-6-openjdk gem install rjb
</p></blockquote>
<h3>Mac OS X 10.6.4</h3>
<blockquote class="code"><p># JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home gem install rjb</p></blockquote>
<p><strong>Note:</strong> rjb 1.3.2 <a href="http://rubyforge.org/forum/forum.php?forum_id=38127">requires</a> the <a href="http://adcdownload.apple.com/Java/java_for_mac_os_x_10.6_update_3_developer_package/javadeveloper_10.6_10m3261.dmg">Java for Mac OS X 10.6 Update 3 Developer Package</a>. If you don&#8217;t want to download it, you can use 1.3.1:</p>
<blockquote class="code"><p>
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home gem install rjb -v=1.3.1
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://paulschreiber.com/blog/2010/08/07/howto-install-the-rjb-gem-on-ubuntu-and-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

