<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <link>http://mikewatkins.ca/tags/technical/</link>
  <atom:link href="http://mikewatkins.ca/tags/technical/feeds/rss" type="application/rss+xml" rel="self"/>
  <lastBuildDate>Thu, 26 Nov 2009 04:03:14 GMT</lastBuildDate>
  <title>mike watkins dot ca</title>
  <description>XML Feed for mike watkins dot ca</description>
  <language>en</language>
  <generator>Parlez/0.1</generator>
<item>
  <title>FreeBSD VPS</title>
  <link>http://mikewatkins.ca/2009/11/26/freebsd-vps/</link>
  <description><![CDATA[
<div class="document">
<p>Over the past nine months I've been leasing a <a class="reference external" href="http://freebsdvps.com/">FreeBSD VPS</a> (Virtual Private Server) to supplement my own hardware and I've just realized that the virtual machine hasn't caused me any (more) grey hair or other anguish in all that time.  In my books vendors that save hair and brain cells deserve at least a passing mention.</p>
<p>At present I'm using one FreeBSD VPS for staging Python web apps and hosting a couple of pro bono sites. I quite frequently refer people to more full-service shared hosting firms such as WebFaction (even my brother has an account there) but personally I prefer managing the entire box - virtual or not - myself.</p>
<p>As I'd like to turn off some aging servers of my own, I'm hoping that virtualization from firms like ARP Networks, or on grander scale like Google or Amazon's cloud services, will save me spending some funds on equipment leases. I've tried a few &quot;virtual&quot; server providers over the years but I do believe this is the first time I've passed on a recommendation here in these pages.</p>
<p>What I like:</p>
<ul class="simple">
<li>OS support: FreeBSD, OpenBSD, and most Linux distributions</li>
<li>Decent multi-homed bandwidth with redundancy and plenty of peering agreements turned up; data center is in LA; quite good network access to Asia, Australia</li>
<li>IPv6 support</li>
<li>IP accessible / out-of-band console access</li>
<li>Configure, build and install your own world and kernel if you like</li>
<li>Great performance, terrific even if you measure performance per dollar. I can churn out &gt; 1000 requests per second with a trivial test page with a single DB lookup, which is a darn sight better than some of my own ageing hardware is able to do.</li>
</ul>
<p>What I wish they offered:</p>
<ul class="simple">
<li>a Canadian datacenter too!</li>
</ul>
<p>The virtualization technology involves KVM (not Xen or OpenVZ) and I find that the resource allocation is very fair indeed. 768MB RAM / 20GB disk / 100GB bandwidth - all this and I get stability too for $20 USD a month.</p>
<p>There are plenty of really cheap virtual server offerings out there, but not very many stable yet inexpensive operations. ARP Networks is certainly one of the latter.</p>
<p>FreeBSDvps.com / <a class="reference external" href="http://OpenBSDvps.net/">OpenBSDvps.net</a> will both lead you to <a class="reference external" href="http://arpnetworks.com/vps">ARP Networks</a> which is the love child of Garry Dolley. Garry not only knows what he is doing, he actually appears to enjoy managing server and network hardware.</p>
<p>Everyone appreciates reliable hardware and networks, but I think the service offering will appeal most to those who can competently manage a server from the command line. ARP Networks' target market appears to be <em>people who know what they are doing</em>, which is good company to keep.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:749</guid>
  <pubDate>Thu, 26 Nov 2009 04:03:14 GMT</pubDate>
  <category>python</category>
  <category>technical</category>
</item>
<item>
  <title>Bing Goes Google</title>
  <link>http://mikewatkins.ca/2009/10/19/bing-goes-google/</link>
  <description><![CDATA[
<div class="document">
<p>Yesterday my wife was chatting with my pre-teen boys about the difference between Google, FireFox, Internet Explorer and other internet nouns which sometimes get used as verbs.</p>
<p>She learned from our kids that our school board has new computers configured to use <a class="reference external" href="http://www.bing.com/">Bing</a>, Microsoft's <a class="reference external" href="http://en.wikipedia.org/wiki/Bing_(search_engine)">latest entry</a> in the search engine field.</p>
<p>Guess what our kids do with it?</p>
<p>They search for <a class="reference external" href="http://www.google.ca/">Google</a>!</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:733</guid>
  <pubDate>Mon, 19 Oct 2009 23:32:59 GMT</pubDate>
  <category>humour</category>
  <category>technical</category>
</item>
<item>
  <title>Testing, testing, one two three</title>
  <link>http://mikewatkins.ca/2009/08/30/testing-testing-one-two-three/</link>
  <description><![CDATA[
<div class="document">
<p>To real people - do not use this email address. Automated mail harvesters will pick this up and start sending spam to it fairly quickly; I'm curious to see how long before I receive the first message. This post published 08:47 on August 30 2009.</p>
<p><a class="reference external" href="mailto:badmail&#64;mikewatkins.ca">badmail&#64;mikewatkins.ca</a></p>
<p>I did this a few years ago and it took less than eight hours, and to this day I still receive tons of spam to that address (all of it forwarded to Spamcop).</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:717</guid>
  <pubDate>Sun, 30 Aug 2009 15:47:38 GMT</pubDate>
  <category>technical</category>
</item>
<item>
  <title>Fake Classmates, Facebook, Bank of America SPAM</title>
  <link>http://mikewatkins.ca/2009/03/14/fake-classmates-facebook-bank-of-america-spam/</link>
  <description><![CDATA[
<div class="document">
<p>There's a bad spam / malware (bad software) attack going on lately on the
internet - if you ever get an email from what appears to be a company or
organization that encourages you to download software, do not do it.</p>
<p>Follow this link to F-Secure.com (these are the people who write Shaw Secure for Canadian subscribers of Shaw).</p>
<p><a class="reference external" href="http://www.f-secure.com/weblog/archives/00001625.html">http://www.f-secure.com/weblog/archives/00001625.html</a></p>
<blockquote>
&quot;The type of spam runs we saw late last year (Obama and BofA) are starting to pick up again in volume. We've seen Classmates being used as a theme and two days ago it was fake Facebook messages. Today it's back to fake Bank of America certificates.&quot;</blockquote>
<p>Note  the level of trickery the bad guys are going to - that graphic image looks quite convincing. Imagine your less technical friends and relatives - how would they treat the message? Help them learn what to do.</p>
<p>When in doubt, chuck it out.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:707</guid>
  <pubDate>Sat, 14 Mar 2009 22:15:19 GMT</pubDate>
  <category>spam</category>
  <category>technical</category>
  <category>virus</category>
</item>
<item>
  <title>Reducing RAM resource usage on a VPS</title>
  <link>http://mikewatkins.ca/2009/03/10/reducing-ram-resource-usage-on-a-vps/</link>
  <description><![CDATA[
<div class="document">
<p>Here are some miscellaneous notes as I tweak a new virtual private server (VPS). It's a time of fear and wonder as I'm leaving FreeBSD's ample and soft bosom for the as yet unknown pleasures to be found in the arms of my new Debian lover.</p>
<dl class="docutils">
<dt>HTTP Daemon:</dt>
<dd><p class="first">Problem? I think it's self evident.  Yes, I know you can tune Apache and yes, I've been down that road before myself, but nothing I've done to tune Apache beats a simple <tt class="docutils literal"><span class="pre">lighttpd</span></tt> implementation, at least not with my application stack.</p>
<p>Solution: Uninstall Apache. Install <tt class="docutils literal"><span class="pre">lighttpd</span></tt>.</p>
<p>As a bonus, <a class="reference external" href="http://www.lighttpd.net/">lighttpd</a> supports SCGI (and FCGI) natively (to my knowledge, another popular lightweight httpd - <a class="reference external" href="http://nginx.net/">nginx</a> - does not support SCGI natively although contribs are available) which gives you deployment options for a variety of <a class="reference external" href="http://www.djangoproject.com/">popular</a> and <a class="reference external" href="http://www.mems-exchange.org/software/qp/">not so popular</a> Python web application frameworks.</p>
<p>Incidentally, QP deployed with SCGI (whether via <tt class="docutils literal"><span class="pre">lighttpd</span></tt> or Apache <tt class="docutils literal"><span class="pre">httpd</span></tt>) provides a nice combo that would be compatible with a multi-user shared hosting environment.</p>
<p class="last">One of these days I'll get off my but and migrate my weblog over, and enable comments here in doing so, in order that I can satisfy a selfish desire to ask the <em>lazy web</em> if anyone has worked with a reasonable webmail application developed in Python. I'd really like to avoid supporting PHP in the future and at this point I only support PHP for a webmail application.</p>
</dd>
</dl>
<dl class="docutils">
<dt>rsyslogd</dt>
<dd><p class="first">This daemon appears to be the default system logging daemon on Debian; for some reason it uses many times more RAM than the default FreeBSD syslogd, even when it isn't actually doing any remote logging.</p>
<p class="last">Solution: Add a call to <tt class="docutils literal"><span class="pre">ulimit</span> <span class="pre">-s</span> <span class="pre">128</span></tt> in <tt class="docutils literal"><span class="pre">do_start()</span></tt> in <tt class="docutils literal"><span class="pre">/etc/init.d/rsyslog</span></tt> before the daemon is started to reduce the stack size.</p>
</dd>
<dt>DNS</dt>
<dd><p class="first"><tt class="docutils literal"><span class="pre">bind9</span></tt> is a huge monster, something not often needed for a VPS or dedicated server that might need to also be an authoritative name server for a few domains. I'm sure there is some tweaking that can be done to reduce its footprint (no threads?) but for a clean break lets try another.</p>
<p class="last">Solution: <a class="reference external" href="http://www.maradns.org/">MaraDNS</a>. Simple to configure (not that <tt class="docutils literal"><span class="pre">bind</span></tt> is all that hard, but some complain just the same), fast, and small. Config file uses Python syntax (n.b. use &quot;somevalue&quot; rather than single quotes 'some value').</p>
</dd>
</dl>
<p><strong>Total savings so far</strong>: 80 - 120MB (more if one factors in Apache), which is pretty substantial given many low end VPS accounts start at 64 - 128MB of RAM allocation.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:700</guid>
  <pubDate>Wed, 11 Mar 2009 03:03:38 GMT</pubDate>
  <category>debian</category>
  <category>python</category>
  <category>technical</category>
  <category>vps</category>
</item>
<item>
  <title>Time to Move, Random Observations</title>
  <link>http://mikewatkins.ca/2009/03/10/time-to-move-random-observations/</link>
  <description><![CDATA[
<div class="document">
<div class="section" id="looking-forward-to-python-3">
<h2>Looking Forward To Python 3</h2>
<p>In my <a class="reference external" href="http://mikewatkins.ca/rawtech.html">tech feed</a> today I noted Thomas Guest <a class="reference external" href="http://wordaligned.org/articles/perl-6-python-3">sticking to his new year commitment</a> to publish Python 3.x compatible <a class="reference external" href="http://wordaligned.org/articles/ordered-sublists-a-brute-force-approach">code examples</a>. I hope this becomes something of a meme and becomes more and more common in the <em>pythonosphere</em>.</p>
</div>
<div class="section" id="on-the-move">
<h2>On The Move</h2>
<p>I'm decommissioning an older server I have co-located in New Jersey so over  the next week or so I'll be moving my non-commercial sites and applications to a <a class="reference external" href="http://fsckvps.com/">Virtual Private Server</a> (VPS).  I'm hoping to deploy all apps on the VPS using &gt;= Python 3.1 (alpha, beta, released) alone.</p>
<p>Thanks to <a class="reference external" href="http://pypi.python.org/pypi?:action=browse&amp;c=533&amp;show=all">QP</a> having already been released on Python 3 this won't be terribly difficult although as most of the applications are document centric, a workaround for <tt class="docutils literal"><span class="pre">docutils</span></tt> is inevitable for the time being as much of the content on the pro bono sites and applications I host lives in ReST format.</p>
<p><a class="reference external" href="http://www.freewisdom.org/projects/python-markdown/">Markdown</a> (the freewisdom.org version, not the ActiveState produced <a class="reference external" href="http://code.google.com/p/python-markdown2/">markdown2</a> code) on the other hand is already more or less serviceable under Python 3 after some <a class="reference external" href="http://docs.python.org/library/2to3.html">2to3</a> incantations.</p>
</div>
<div class="section" id="debian-freebsd-but-enough">
<h2>Debian != FreeBSD but ~ Enough</h2>
<p>After many years of running a FreeBSD-only shop at home and at work this move has more or less forced me to gain some deeper Linux knowledge. In this case I elected to have the VPS decked out with Debian 5.</p>
<p>While it is refreshing to explore a new OS environment just to see the differences, I do miss FreeBSD on the box, particularly the FreeBSD ports system, and I'll no doubt continue to trip on on the file system <tt class="docutils literal"><span class="pre">hier</span></tt> differences but I'll live I guess.</p>
<p>One aspect of running a VPS as opposed to a dedicated server is that you tend to need to be more circumspect about RAM usage. The default install of <tt class="docutils literal"><span class="pre">bind9</span></tt> consumed a huge amount of ram which for what the VPS needs to deliver is just plain silly. So a query for &quot;python bind alternative&quot; drove me to choose another name daemon.</p>
<p><a class="reference external" href="http://www.maradns.org/">MaraDNS</a> turns out to be a nicely lightweight authoritative and recursive DNS that uses far less machine resources than <tt class="docutils literal"><span class="pre">bind</span></tt> does. It seems to be a good alternative for a box which needs to serve up a few dozen or hundred records rather than tens of thousands, and it might even be a good choice for the latter too.</p>
<p>The config file uses Python syntax but that's as far as the Python &quot;integration&quot; goes. I like its &quot;template&quot; and &quot;default&quot; approach; I had a fairly swift looking <tt class="docutils literal"><span class="pre">bind</span></tt> setup which used include files but the MaraDNS config is even simpler - one template file serves all. Nice.</p>
</div>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:699</guid>
  <pubDate>Tue, 10 Mar 2009 20:20:37 GMT</pubDate>
  <category>debian</category>
  <category>freebsd</category>
  <category>python</category>
  <category>technical</category>
</item>
<item>
  <title>Google Chrome</title>
  <link>http://mikewatkins.ca/2009/01/14/google-chrome/</link>
  <description><![CDATA[
<div class="document">
<p>Ever since <a class="reference external" href="http://www.google.com/chrome">Google Chrome</a> (a web browser which like Firefox is Open Source) first came out in beta I've been using it. I'd only intended to check it out but by the end of the day I had made it my default web browser. Firefox and Chrome are the only browsers I recommend for use on Windows.</p>
<p>This <a class="reference external" href="http://blogoscoped.com/google-chrome/">cartoon series on Google Chrome</a> is a slightly technical presentation on what sets the Chrome web browser apart. Your time for a quick glance will be rewarded even if  you aren't a geek, if only to admire the artistry.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:685</guid>
  <pubDate>Wed, 14 Jan 2009 17:38:23 GMT</pubDate>
  <category>technical</category>
  <category>web</category>
</item>
<item>
  <title>Python 3 System Side Effects</title>
  <link>http://mikewatkins.ca/2008/12/04/python-3-system-side-effects/</link>
  <description><![CDATA[
<div class="document">
<p>Heads up to package maintainers and Unix/Linux users: Depending on your system's package system you may run into problems like this build problem on <a class="reference external" href="http://freebsd.org/">FreeBSD</a>, should you make Python 3 your base install of Python:</p>
<pre class="literal-block">
$ portmaster -B firefox3
 |snip|
 /usr/local/bin/python ../toolkit/xre/make-platformini.py --print-buildid &gt; buildid
   File &quot;../toolkit/xre/make-platformini.py&quot;, line 15
     print datetime.now().strftime('%Y%m%d%H')
                  ^
 SyntaxError: invalid syntax
 gmake[3]: *** [export] Error 1
 gmake[3]: Leaving directory `/usr/ports/www/firefox3/work/mozilla/config'
 gmake[2]: *** [export_tier_base] Error 2
 gmake[2]: Leaving directory `/usr/ports/www/firefox3/work/mozilla'
 gmake[1]: *** [tier_base] Error 2
 gmake[1]: Leaving directory `/usr/ports/www/firefox3/work/mozilla'
 gmake: *** [default] Error 2
 *** Error code 2

 Stop in /usr/ports/www/firefox3.
 *** Error code 1
</pre>
<p>I must admit I'd not thought of FreeBSD's ports system as being vulnerable to Python 3 changes, but of course &quot;scripting&quot; languages like Python (and Ruby and Perl and ...) are heavily used by thousands of package distributions.</p>
<p>The simple fix: Keep the 2.x line of Python on yours systems...  <tt class="docutils literal"><span class="pre">../bin/python</span></tt> will just have to point to 2.x for the time being.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:672</guid>
  <pubDate>Thu, 04 Dec 2008 15:56:29 GMT</pubDate>
  <category>freebsd</category>
  <category>python</category>
  <category>technical</category>
</item>
<item>
  <title>Telus loses customer</title>
  <link>http://mikewatkins.ca/2007/12/08/no-pots-here/</link>
  <description><![CDATA[
<div class="document">
<p>As of Tuesday, we'll bring to an end our decades-old relationship with <a class="reference external" href="http://promo.telus.com/ldplans/indexbc.html">Telus</a>. There'll no longer be a POTS (Plain old telephone system) line (with its defacto <a class="reference external" href="http://about.telus.com/publicpolicy/basic_ld_canada_us_bc.html">negative option billing</a>) hooked up to our home and office.</p>
<p>Why? Simply put, there is better value, and service, <a class="reference external" href="http://www.shaw.ca/en-ca/ProductsServices/DigitalPhone/Default.htm">elsewhere</a>.</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:492</guid>
  <pubDate>Sat, 08 Dec 2007 01:43:09 GMT</pubDate>
  <category>technical</category>
</item>
<item>
  <title>Pro Bono</title>
  <link>http://mikewatkins.ca/2007/04/13/pro-bono/</link>
  <description><![CDATA[
<p>This week I worked on a number of pro-bono projects.</p>

<p>Today I revamped the Douglas Elementary and Annex <a href="http://douglas.aucontraire.net/">Parent Advisory Council</a> web site. I&#8217;m using it and other pro-bono sites to refine a suite of <span class="caps">CSS</span> templates that will be used in some other application work I am doing.</p>

<p>Earlier in the week, working with <a href="http://fsssbc.org/">Families for School Seismic Safety</a>, I customized a bulk email routine to send out a <a href="http://fsssbc.org/campaigns/20070411/fsss_update_part1.html">package</a> of nicely formatted <a href="http://fsssbc.org/campaigns/20070411/fsss_update_part2.html">emails</a> to parents and politicians.</p>

<p>Along the way I found and resolved a bug in how I&#8217;d been handling multipart/mixed multipart/alternative email messages (html/text mail with file attachments). I ended up rewriting my old <code>mimetools</code> based code using the newer <code>email</code> package which made the task very straightforward.</p>
]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:453</guid>
  <pubDate>Sat, 14 Apr 2007 04:14:00 GMT</pubDate>
  <category>technical</category>
</item>
</channel></rss>
