<?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>rootsmith blog</title>
	<atom:link href="http://blog.rootsmith.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rootsmith.ca</link>
	<description>random technology ramblings</description>
	<lastBuildDate>Thu, 31 Jan 2013 06:17:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Connecting USB Drives To A Fun-Plugged DNS-323</title>
		<link>http://blog.rootsmith.ca/uncategorized/connecting-usb-drives-to-a-fun-plugged-dns-323/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=connecting-usb-drives-to-a-fun-plugged-dns-323</link>
		<comments>http://blog.rootsmith.ca/uncategorized/connecting-usb-drives-to-a-fun-plugged-dns-323/#comments</comments>
		<pubDate>Thu, 31 Jan 2013 06:17:06 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=233</guid>
		<description><![CDATA[He is how to connect a USB drive to a DNS-323. Essentially, wget usb-storage.ko insmod usb-storage.ko mkdir /mnt/usb1 mount -t ext3 /dev/sdb2 /mnt/usb1 You can find out what device was attached by looking in dmesg after plugging in the device.]]></description>
			<content:encoded><![CDATA[<p>He is how to <a href="http://dns323.kood.org/howto:external_drive" target="_blank">connect a USB drive to a DNS-323</a>.</p>
<p>Essentially,</p>
<ul>
<li>wget usb-storage.ko</li>
<li>insmod usb-storage.ko</li>
<li>mkdir /mnt/usb1</li>
<li>mount -t ext3 /dev/sdb2 /mnt/usb1</li>
</ul>
<p>You can find out what device was attached by looking in dmesg after plugging in the device.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/connecting-usb-drives-to-a-fun-plugged-dns-323/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>brew install postgres 9.2 output</title>
		<link>http://blog.rootsmith.ca/uncategorized/brew-install-postgres-9-2-output/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=brew-install-postgres-9-2-output</link>
		<comments>http://blog.rootsmith.ca/uncategorized/brew-install-postgres-9-2-output/#comments</comments>
		<pubDate>Fri, 28 Sep 2012 19:24:07 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=216</guid>
		<description><![CDATA[# Build Notes If builds of PostgreSQL 9 are failing and you have version 8.x installed, you may need to remove the previous version first. See: https://github.com/mxcl/homebrew/issues/issue/2510 To build plpython against a specific Python, set PYTHON prior to brewing: PYTHON=/usr/local/bin/python brew install postgresql See: http://www.postgresql.org/docs/9.2/static/install-procedure.html # Create/Upgrade a Database If this is your first install, <a href='http://blog.rootsmith.ca/uncategorized/brew-install-postgres-9-2-output/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p># Build Notes</p>
<p>If builds of PostgreSQL 9 are failing and you have version 8.x installed,<br />
you may need to remove the previous version first. See:</p>
<p>https://github.com/mxcl/homebrew/issues/issue/2510</p>
<p>To build plpython against a specific Python, set PYTHON prior to brewing:<br />
  PYTHON=/usr/local/bin/python  brew install postgresql<br />
See:</p>
<p>http://www.postgresql.org/docs/9.2/static/install-procedure.html</p>
<p># Create/Upgrade a Database</p>
<p>If this is your first install, create a database with:<br />
  initdb /usr/local/var/postgres -E utf8</p>
<p>To migrate existing data from a previous major version (pre-9.2) of PostgreSQL, see:</p>
<p>http://www.postgresql.org/docs/9.2/static/upgrading.html</p>
<p># Start/Stop PostgreSQL</p>
<p>If this is your first install, automatically load on login with:<br />
  mkdir -p ~/Library/LaunchAgents<br />
  cp /usr/local/Cellar/postgresql/9.2.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/<br />
  launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist</p>
<p>If this is an upgrade and you already have the homebrew.mxcl.postgresql.plist loaded:<br />
  launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist<br />
  cp /usr/local/Cellar/postgresql/9.2.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/<br />
  launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist</p>
<p>Or start manually with:<br />
  pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start</p>
<p>And stop with:<br />
  pg_ctl -D /usr/local/var/postgres stop -s -m fast</p>
<p># Loading Extensions</p>
<p>By default, Homebrew builds all available Contrib extensions.  To see a list of all<br />
available extensions, from the psql command line, run:<br />
  SELECT * FROM pg_available_extensions;</p>
<p>To load any of the extension names, navigate to the desired database and run:<br />
  CREATE EXTENSION [extension name];</p>
<p>For instance, to load the tablefunc extension in the current database, run:<br />
  CREATE EXTENSION tablefunc;</p>
<p>For more information on the CREATE EXTENSION command, see:</p>
<p>http://www.postgresql.org/docs/9.2/static/sql-createextension.html</p>
<p>For more information on extensions, see:</p>
<p>http://www.postgresql.org/docs/9.2/static/contrib.html</p>
<p># Other</p>
<p>Some machines may require provisioning of shared memory:</p>
<p>http://www.postgresql.org/docs/9.2/static/kernel-resources.html#SYSVIPC</p>
<p>To install postgresql (and ossp-uuid) in 32-bit mode:<br />
   brew install postgresql &#8211;32-bit</p>
<p>If you want to install the postgres gem, including ARCHFLAGS is recommended:<br />
    env ARCHFLAGS=&#8221;-arch x86_64&#8243; gem install pg</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/brew-install-postgres-9-2-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Request Server or Hostname Must Match Flask&#8217;s SERVER_NAME to Route Successfully</title>
		<link>http://blog.rootsmith.ca/uncategorized/request-server-or-hostname-must-match-flasks-server_name-to-route-successfully/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=request-server-or-hostname-must-match-flasks-server_name-to-route-successfully</link>
		<comments>http://blog.rootsmith.ca/uncategorized/request-server-or-hostname-must-match-flasks-server_name-to-route-successfully/#comments</comments>
		<pubDate>Wed, 19 Sep 2012 20:05:16 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=212</guid>
		<description><![CDATA[I ran into a stubborn little problem with an nginx, uWSGI, Flask stack. We needed to support sending requests to the application using either the FQDN (fully qualified domain name) or just the sub-domain name. For example, sending a GET request to the absolute domain name at http://myserver.mydomain.com/ vs. the relative domain name at http://myserver/. <a href='http://blog.rootsmith.ca/uncategorized/request-server-or-hostname-must-match-flasks-server_name-to-route-successfully/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I ran into a stubborn little problem with an nginx, uWSGI, Flask stack. We needed to support sending requests to the application using either the FQDN (fully qualified domain name) or just the sub-domain name. For example, sending a GET request to the absolute domain name at <code>http://myserver.mydomain.com/</code> vs. the relative domain name at <code>http://myserver/</code>. Both of these should work if you are within a network that can resolve myserver to <code>myserver.mydomain.com</code>.</p>
<p>The problem is that Werkzeug which handles Flask&#8217;s routing request URLs to views, is very particular. The request hostname must match the SERVER_NAME configuration in Flask. As a result, if you have the SERVER_NAME set to &#8216;myserver.mydomain.com&#8217; it will throw a 404 if you send your request to http://myserver/, even though the application successfully gets the request because the network, nginx and uWSGI are all smart enough to know that they are the same thing.</p>
<p>Digging through the Werkzeug source I found the following:</p>
<pre>
    if 'HTTP_X_FORWARDED_HOST' in environ:
        return environ['HTTP_X_FORWARDED_HOST']
    elif 'HTTP_HOST' in environ:
        return environ['HTTP_HOST']
    result = environ['SERVER_NAME']
    if (environ['wsgi.url_scheme'], environ['SERVER_PORT']) not \
       in (('https', '443'), ('http', '80')):
        result += ':' + environ['SERVER_PORT']
    return result
</pre>
<p>At first I was trying to set the <code>SERVER_NAME</code> WSGI param in nginx but as you can see from the above, it falls down through <code>HTTP_X_FORWARDED_HOST</code>, <code>HTTP_POST</code>, and then finally <code>SERVER_NAME</code>.</p>
<p>Here is the new server section of my nginx config:</p>
<pre>
    server {
        listen 80;

        server_name myserver.mydomain.com;
        charset utf-8;
        index index;

        location / {
            uwsgi_pass  unix:///tmp/uwsgi.sock;
            include     uwsgi_params;
            uwsgi_param SCRIPT_NAME '';
            uwsgi_param HTTP_HOST $server_name;
            uwsgi_intercept_errors on; # let nginx serve error_page
        }
    }
</pre>
<p>Now everything works. I can request using either the sub-domain or the FQDN.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/request-server-or-hostname-must-match-flasks-server_name-to-route-successfully/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Vim The Best Editor for Python</title>
		<link>http://blog.rootsmith.ca/uncategorized/making-vim-the-best-editor-for-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=making-vim-the-best-editor-for-python</link>
		<comments>http://blog.rootsmith.ca/uncategorized/making-vim-the-best-editor-for-python/#comments</comments>
		<pubDate>Fri, 14 Sep 2012 04:16:54 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=191</guid>
		<description><![CDATA[This is yet another outline of how to setup vim to be a world class editor for professional development. If done right, vim is more powerful, faster, and will make you more productive than any feature laden IDE. This repeats much of what can already be found on many sites on the internet but this <a href='http://blog.rootsmith.ca/uncategorized/making-vim-the-best-editor-for-python/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This is yet another outline of how to setup vim to be a world class editor for professional development. If done right, vim is more powerful, faster, and will make you more productive than any feature laden IDE.</p>
<p>This repeats much of what can already be found on many sites on the internet but this is my attempt at writing down the steps to setup vim for my liking so that I can repeat it. Also, this is very much a work in progress and a living document.</p>
<ul>
<li>install the <a href="https://github.com/b4winckler/macvim">latest of MacVim</a> or gvim if a Linux user (and ensure that python and ruby support is compiled in for later plugins by adding the following switches to configure: &#8211;enable-pythoninterp &#8211;enable-rubyinterp. MacVim will come with these out of the box.)</li>
<li><a href="https://github.com/tpope/vim-pathogen/">install pathogen</a> to manage all subsequent plugins<br />
Now you can just cd into .vim/bundle and clone things from git. For example cd ~/.vim/bundle<br />
git clone git://github.com/tpope/vim-fugitive.git</li>
<li>install <a href="https://github.com/tpope/vim-fugitive.git">fugative</a> for git integration</li>
<li>install <a href="https://github.com/wincent/Command-T.git">command-t </a>for easy file opening (notes: requires ruby support &#8211; see notes above. Also, once git cloned you must read the README.txt file because the files must be compiled. Finally, I find this to be a faster way to open files on disk than a filesystem explorer like NERDTree)</li>
<li><del>install <a href="https://github.com/mileszs/ack.vim.git">ack.vim</a> to have access to ack directly in vim</del> (see Ag below &#8230; it is superior)</li>
<li>install <a href="https://github.com/epmatsw/ag.vim.git">ag.vim</a> to have access to ag directly in vim (need to first install ag via brew install the_silver_searcher)</li>
<li>install vim-javascript for better auto indentation</li>
<li>install jslint.vim if you are doing javascript</li>
<li>install <a href="http://vim-taglist.sourceforge.net/">taglist.vim</a> (requires exuberant ctags &#8211; brew install ctags-exuberant &#8211; this will allow you to press ctrl-p to do command completion as well as :TlistToggle to get a code structure viewer &#8211; but I couldn&#8217;t get it to work)</li>
<li>install the colour scheme <a href="https://github.com/tpope/vim-vividchalk.git">vividchalk.vim</a> (a black background theme)</li>
<li>install the colour scheme <a href="https://github.com/vim-scripts/mayansmoke.git">mayansmoke</a> (a pale, less harsh on tired eyes theme)</li>
<li>install <a href="https://github.com/nvie/vim-flake8.git">flake8</a> for syntax checking and PEP8 gestapo-ing (note requires python support &#8211; see note above and you must first pip install flake8)</li>
<li>install <a href="https://github.com/Lokaltog/vim-powerline.git">powerline</a> for the most kick ass status line (must do brew install fontforge) &#8211; read the fontpatcher/README.rst file to get the proper font &#8211; note that I have had a hell of a time installing fontforge on OS X Mountain Lion. And if you want a super nice font try Source Code Pro. You can find a Powerline version of this font in github. It is an Adobe font and they give instructions on how to install on Mac OS X. On Linux just git clone the powerline compiled version from github into your ~/.fonts directory. You can find out the official name of it in Linux&#8217;s character map utility</li>
</ul>
<p>Overall this is a <a title="Best vim plugins for a polyglot developer" href="http://www.quora.com/Which-are-the-best-vim-plugins" target="_blank">good list</a> from over on Quora</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/making-vim-the-best-editor-for-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Definitely Not A Loser, Nor A Late Bloomer</title>
		<link>http://blog.rootsmith.ca/uncategorized/definitely-not-a-loser-nor-a-late-bloomer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=definitely-not-a-loser-nor-a-late-bloomer</link>
		<comments>http://blog.rootsmith.ca/uncategorized/definitely-not-a-loser-nor-a-late-bloomer/#comments</comments>
		<pubDate>Tue, 10 Jul 2012 20:23:08 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=184</guid>
		<description><![CDATA[After reading Dave McClure&#8216;s blog post, late bloomer, not a loser. (I hope), I couldn&#8217;t help but feel that it was a little like reading a supermodel complain about feeling fat and ugly. Nobody wants to hear a supermodel complain about feeling fat and ugly, with the exception of maybe other supermodels (hence Josh Stein&#8217;s <a href='http://blog.rootsmith.ca/uncategorized/definitely-not-a-loser-nor-a-late-bloomer/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>After reading <a href="http://en.wikipedia.org/wiki/Dave_McClure" title="Dave McClure">Dave McClure</a>&#8216;s blog post, <a href="http://500hats.com/late-bloomer">late bloomer, not a loser. (I hope)</a>, I couldn&#8217;t help but feel that it was a little like reading a supermodel complain about feeling fat and ugly. Nobody wants to hear a supermodel complain about feeling fat and ugly, with the exception of maybe other supermodels (hence <a href="https://twitter.com/dfjjosh">Josh Stein&#8217;s</a> <a href="https://twitter.com/dfjjosh/status/222001644810928130">tweet</a> of the post.)</p>
<p>I don&#8217;t know Dave McClure personally but wikipedia <a href="http://en.wikipedia.org/wiki/Dave_McClure" title="Dave McClure">describes him</a> as &#8220;a prominent angel investor based in the San Francisco Bay Area.&#8221; That description and the mere fact that Dave McClure <em>has</em> a wikipedia page suggests that he is a pretty damn successful guy. Therefore, his post bemoaning his lack of accomplishments comes across as disingenuous. Given his age, the post is obviously his reflection on the first half of his life and his admission that he has not lived up to his own internal expectations. I can respect that. He is my contemporary and I have had those very same feelings. But I found the tone of his post horribly off.</p>
<p>I am guessing that my net worth is considerably less than Dave&#8217;s and I would never write a post saying I have only made &#8220;a little bit of money.&#8221; Even at my net worth (read not zero) I know that I am extremely fortunate in comparison to the vast majority of people on this planet. But I don&#8217;t live in Silicon Valley. It must be hard to have perspective when your neighbours are Mark Zuckerberg and the like. Dave is still maintaining that he is <a href="https://twitter.com/davemcclure/status/222553081580224512">not rich</a> but I have a hard time believing him.</p>
<p>I don&#8217;t begrudge Dave his ambition and nor do I want him to &#8220;settle&#8221; for what he has already accomplished (which is a hell of a lot.) And I definitely don&#8217;t hate him. If he ever comes to Vancouver I would gladly buy him a beer (apparently he likes beer.)</p>
<p>I understand that great things only come from people pushing themselves to become great. We should all strive to be our very best but some perspective wouldn&#8217;t hurt either. Therefore, I can&#8217;t wish Dave luck. I would like to reserve my luck wishing to those who truly need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/definitely-not-a-loser-nor-a-late-bloomer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do you have a viable startup?</title>
		<link>http://blog.rootsmith.ca/uncategorized/do-you-have-a-viable-startup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=do-you-have-a-viable-startup</link>
		<comments>http://blog.rootsmith.ca/uncategorized/do-you-have-a-viable-startup/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 16:10:29 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[startups organizations]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=172</guid>
		<description><![CDATA[Here is a way to test if your startup&#8217;s idea/product is viable: - can you describe it one very short and succinct sentence? - can you describe the value it provides users/society in one very short succinct sentence? - stripped of all fluff (bells, whistles, and whiz-bang things that are purely there for marketing purposes) <a href='http://blog.rootsmith.ca/uncategorized/do-you-have-a-viable-startup/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Here is a way to test if your startup&#8217;s idea/product is viable:</p>
<p>- can you describe it one very short and succinct sentence?<br />
- can you describe the value it provides users/society in one very short succinct sentence?<br />
- stripped of all fluff (bells, whistles, and whiz-bang things that are purely there for marketing purposes) is it still valuable?<br />
- stripped of all fluff can you differentiate it from competitors? (again, in a very short, succinct sentence)</p>
<p>I am a believer in <a href="http://en.wikipedia.org/wiki/Minimum_viable_product" title="Minimum Viable Product" target="_blank">minimum viable product (MVP)</a>. Valuable ideas and or products can express themselves in minimal viable product form. Others can not. And that is it&#8217;s essence.</p>
<p>I have heard the argument that minimal products can not compete because, in general, the bar has been raised too high for web applications. The argument against MVP follows that a product must have polish to be successful. Yes, a product must have polish to be <em>widely</em> accepted, but what we are searching for is merely a <strong><em>viable</em></strong> product. This is the proof that it provides value. Therefore, don&#8217;t waste your time trying to build the <a href="http://en.wikipedia.org/wiki/Taj_Mahal" title="Taj Mahal" target="_blank">Taj Mahal</a> because you may very well just be <a href="http://en.wikipedia.org/wiki/Lipstick_on_a_pig" title="Lipstick on a Pig" target="_blank">putting lipstick on a pig.</a></p>
<p>Far too often people go about creating a startup simply because they want to create a startup, not because they actually think they have an idea that is viable. Now, I don&#8217;t actually have anything against this approach, and in fact, I encourage it if you have the time and have nothing to lose. However, do it to learn <em>how</em> to create a startup, not because you think you will become the next <a href="http://en.wikipedia.org/wiki/Mark_Zuckerberg" title="Mark Zuckerberg" target="_blank">Mark Zuckerberg.</a> And here is the formula:</p>
<ol>
<li>throw something against the wall</li>
<li>see if it sticks</li>
<li>goto 1</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/uncategorized/do-you-have-a-viable-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress on nginx</title>
		<link>http://blog.rootsmith.ca/php/wordpress-on-nginx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-on-nginx</link>
		<comments>http://blog.rootsmith.ca/php/wordpress-on-nginx/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 05:19:01 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=169</guid>
		<description><![CDATA[So I finally got around to moving my sandbox type stuff and my blog off of slicehost and onto linode. I rarely touch my blog and do anything with wordpress so it is always a bit of a chore to upgrade etc. &#8217;cause I&#8217;m treading on unfamiliar ground. Anyway, I thought I would give myself <a href='http://blog.rootsmith.ca/php/wordpress-on-nginx/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>So I finally got around to moving my sandbox type stuff and my blog off of slicehost and onto linode.  I rarely touch my blog and do anything with wordpress so it is always a bit of a chore to upgrade etc. &#8217;cause I&#8217;m treading on unfamiliar ground.</p>
<p>Anyway, I thought I would give myself a challenge and run wordpress behind <code>nginx</code>.  The formula is to proxy <code>nginx</code> to <code>php-cgi</code>.  This worked fine but was horribly unstable as the <code>php-cgi</code> process goes down quite often.  The problem was running <code>spawn-fcgi</code> from <code>init.d</code>.  It needed to be run from a proper process manager.  As luck would have it, I had <code>supervisord</code> already running to monitor <code>uwsgi</code>.</p>
<p>I wish I would have stumbled across <a href="http://agiletesting.blogspot.com/2010/06/setting-up-php5fastcgi-with-nginx.html" title="Setting Up php5-cgi" target="_blank">this post</a> from Grig Gheorghiu, as it would have saved me a lot of effort.  Funny how he is also a python guy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/php/wordpress-on-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>British Columbia Marijuana Grow Operations</title>
		<link>http://blog.rootsmith.ca/python/british-columbia-marijuana-grow-operations/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=british-columbia-marijuana-grow-operations</link>
		<comments>http://blog.rootsmith.ca/python/british-columbia-marijuana-grow-operations/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 05:15:32 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=162</guid>
		<description><![CDATA[Andy McKay linked to a bit of interesting data from his twitter account. I wanted to be able to visualize the data so I used it as an excuse to try out flask, a python micro web framework, and some other stuff. It was all a bit of a yack shave because I could have <a href='http://blog.rootsmith.ca/python/british-columbia-marijuana-grow-operations/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.agmweb.ca/blog/andy/" title="Andy McKay's Blog" target="_blank">Andy McKay</a> linked to a bit of interesting data from his <a href="https://twitter.com/#!/andymckay/status/117774833143660544" title="Surrey is a good place for a grow op" target="_blank">twitter account</a>.  I wanted to be able to visualize the data so I used it as an excuse to try out <a href="http://flask.pocoo.org/" title="Flask - A python micro framework" target="_blank">flask</a>, a python micro web framework, and some other stuff.  It was all a bit of a yack shave because I could have done the whole thing as a static page but what the hell.  It also led me to finally moving my blog off of slicehost and over to linode which of course led to an upgrade of wordpress which led to trying wordpress behind nginx and so on and so forth.  Such is the life of a techie.</p>
<p>Anyway without further ado, click through to see <a href="http://pystol.com">all locations in BC where a marijuana grow operation was found</a> by the police in the last year.  And here is the <a href="http://www.rcmp-grc.gc.ca/drugs-drogues/mgi-ircm/bc-eng.htm" title="Marihuana Grow Operations - British Columbia" target="_blank">raw data</a>.</p>
<p>The visualization shows a circle at the location and the size is proportional to how many plants were seized.  A scaling factor was applied to the circles so that they are still visible, and proportional, at all zoom levels.</p>
<p>Also, don&#8217;t be surprised if the whole thing comes crashing down because this was thrown together as an experiment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/python/british-columbia-marijuana-grow-operations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ImportError: cannot import name fixtag</title>
		<link>http://blog.rootsmith.ca/linux/importerror-cannot-import-name-fixtag/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=importerror-cannot-import-name-fixtag</link>
		<comments>http://blog.rootsmith.ca/linux/importerror-cannot-import-name-fixtag/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 20:33:41 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.rootsmith.ca/?p=159</guid>
		<description><![CDATA[Installing supervisor on Natty Nat will undoubtedly throw the error ImportError: cannot import name fixtag The root cause of this error is the python-meld3 library and the following import statement: from xml.etree.ElementTree import fixtag The problem has been fixed in version 0.6.7 of python-meld3. Therefore, before you install supervisor, do the following on the command <a href='http://blog.rootsmith.ca/linux/importerror-cannot-import-name-fixtag/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Installing supervisor on Natty Nat will undoubtedly throw the error <code>ImportError: cannot import name fixtag</code></p>
<p>The root cause of this error is the <code>python-meld3</code> library and the following import statement:</p>
<p><code>from xml.etree.ElementTree import fixtag</code></p>
<p>The problem has been fixed in version 0.6.7 of python-meld3.  Therefore, before you install supervisor, do the following on the command line as root:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">aptitude install python-meld3
pip install meld3==0.6.7</pre></div></div>

<p>The above will install version 0.6.5 of python-meld3 and then pip will upgrade it to the latest.  You can then install supervisor without any problems.</p>
<p>If you want you can <a href="https://bugzilla.redhat.com/show_bug.cgi?id=652890" title="Bug 652890" target="_blank">read the gory details</a> of the problem in python-meld3.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/linux/importerror-cannot-import-name-fixtag/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>mouseOver events in Selenium and jQuery hover</title>
		<link>http://blog.rootsmith.ca/javascript/mouseover-events-in-selenium-and-jquery-hover/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mouseover-events-in-selenium-and-jquery-hover</link>
		<comments>http://blog.rootsmith.ca/javascript/mouseover-events-in-selenium-and-jquery-hover/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 21:28:26 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://articles.rootsmith.ca/uncategorized/mouseover-events-in-selenium-and-jquery-hover</guid>
		<description><![CDATA[If you have created some client functionality that is triggered when the user moves the mouse over an element, you may run into trouble testing with Selenium&#8217;s mouseOver method. I recently implemented such a feature using jQuery&#8217;s hover event handler and pulled my hair out trying to test the functionality with Selenium. I went down <a href='http://blog.rootsmith.ca/javascript/mouseover-events-in-selenium-and-jquery-hover/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>If you have created some client functionality that is triggered when the user moves the mouse over an element, you may run into trouble testing with Selenium&#8217;s <code>mouseOver</code> method.</p>
<p>I recently implemented such a feature using jQuery&#8217;s <code>hover</code> event handler and pulled my hair out trying to test the functionality with Selenium.  I went down a complete rat hole trying trigger the event within selenium using the <code>getEval</code> method and passing in custom javascript code.  What a nightmare.  That is, until I really sat down and thought about it.</p>
<p>Remember that Selenium doesn&#8217;t actually control the pointer in the browser but drives the browser through javascript.  Therefore, unlike a true mouse event that may trigger a number of events, Selenium&#8217;s <code>mouseOver</code> just triggers <code>mouseover</code> on the element.  Now, if you have used jQuery&#8217;s <code>hover</code> then you are binding your functionality to <code>mouseenter</code> and <code>mouseleave</code> not <code>mouseover</code> and <code>mouseout</code>.</p>
<p>Therefore, if you wish to test with Selenium, do not use jQuery&#8217;s <code>hover</code> method and bind your functionality to <code>mouseover</code> and <code>mouseout</code>.</p>
<p>Note that many older browsers do not support <code>mouseenter</code> and <code>mouseleave</code> as this was introduced by Microsoft and was not immediately adopted by the others.  There is also a big difference in their behaviour and propagation in the event model.  <code>mouseover</code> and <code>mouseout</code> bubble up whereas <code>mouseenter</code> and <code>mouseleave</code> do not bubble up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rootsmith.ca/javascript/mouseover-events-in-selenium-and-jquery-hover/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
