<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Fnord]]></title>
  <link href="http://fnord.phfactor.net/atom.xml" rel="self"/>
  <link href="http://fnord.phfactor.net/"/>
  <updated>2012-05-10T08:25:03-07:00</updated>
  <id>http://fnord.phfactor.net/</id>
  <author>
    <name><![CDATA[Paul Hubbard]]></name>
    <email><![CDATA[pfh@phfactor.net]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[PyCon 2012]]></title>
    <link href="http://fnord.phfactor.net/2012/03/16/pycon-2012/"/>
    <updated>2012-03-16T15:51:00-07:00</updated>
    <id>http://fnord.phfactor.net/2012/03/16/pycon-2012</id>
    <content type="html"><![CDATA[<p>Some notes and comments from my first time at <a href="http://us.pycon.org/">PyCon</a>, the Python software conference.</p>

<ul>
<li>It was huge - 2,300 attending, even though it was &#8220;capped&#8221; at 1,500. More would have liked to attend.</li>
<li>The on-site network worked very well, reliable and stable. Capped at 512KB/sec per person, which is fine. I tried out my LTE tether but didn&#8217;t need it.</li>
<li>The conference hotel was good, and it was nice to be able to walk back to my room if needed. 149/night is a very reasonable rate, and the room was nice. Good chair to sit in.</li>
<li>I attended two tutorials, which ran the day before the main conference. At $150 each I&#8217;m not sure I&#8217;d do so again; decent but not wow. The quality of the main talks is so high that the tutorials are just icing.</li>
<li>I think next year I&#8217;ll go for a code sprint instead. I&#8217;d really like to contribute to Python or some of the libraries I use and appreciate.</li>
<li>Overall, the conference felt like coming home. It&#8217;s odd, as I&#8217;ve been to quite a few conferences but this felt the most like my personality. Big expensive ones like Supercomputing are more about PR and sales, and even Software Development was kind of sterile and blah. PyCon felt like peers, getting together to hang out and do amazing stuff. And make no mistake, a lot of the people there are doing amazing and inspiring work.</li>
<li>Jobs - I didn&#8217;t know this going in, but of the 134 exhibitors/sponsors, it seemed like all of them were looking for Python hackers. I&#8217;m not looking, but it&#8217;s reassuring to know the market is there for the skills.</li>
<li>Very decent food for a convention this large.</li>
<li>I will go again, even if I have to pay my own way. Strongly recommended.</li>
</ul>


<p>And a few more specific notes and pointers:</p>

<ul>
<li>The <a href="http://openstreetmaps.org/">OpenStreetMap</a> project has advanced a huge amount. Check it out as a Google maps equivalent/replacement.</li>
<li>My deep thanks to the <a href="http://dropbox.com">Dropbox</a> folks for giving out 5GB at their hiring booth. I needed that!</li>
<li><a href="http://newrelic.com">NewRelic</a> looks awesome. Magic-level app analytics.</li>
<li>I&#8217;m already using <a href="http://disqus.com">Disqus</a> here and on <a href="http://watchotaku.com">WatchOtaku</a>, and stopped by to confirm with them that I had implemented it correctly there. Nice folks, they setup a board just for pycon.</li>
<li>Speaking of chat, once again IRC was helpful, I used <a href="http://colloquy.info/">Colloquy</a> to hang out in the #pycon channel.</li>
<li>I tried to take the &#8216;Google at PyCon&#8217; challenge but after passing the first level their email never made it to me. Weak.</li>
<li>I really need to try the <a href="http://pylonsproject.org">Pyramid</a> web framework. Talked a bit to the hackers and it sounds like a nice replacement for <a href="http://webpy.org">web.py</a> for the code I&#8217;m doing.</li>
<li>The <a href="http://aldebaran-robotics.com">NAO</a> robot demos were amazing, I wish I could afford one. Even at developer discount they&#8217;re 6k USD each.</li>
<li>The <a href="http://www.webcubecms.com">WebCube</a> platform might be nice; I have a friend or two needing sites that&#8217;d be well suited for this.</li>
<li>The new <a href="http://ipython.org/ipython-doc/rel-0.12/interactive/htmlnotebook.html">iPython notebook</a> looks astounding, but I wasted a few hours trying to get the stack of requirements installed to no avail. You have to install an entire Python distribution <a href="http://www.enthought.com/products/epd_free.php">EPD</a> to get it working.</li>
<li>I was impressed by <a href="http://web2py.com/">Web2py</a> but a lot of the Pythonistas were skeptical or dubious. Interesting.</li>
<li>Videos of all of the talks and posters are free to watch at <a href="http://pyvideo.org">PyVideo.org</a>.</li>
<li>Almost forgot <a href="http://www.picloud.com/">PiCloud</a>, a nifty-looking way to run Python with 2 lines of code. Up to 20 CPU hours per month for free, very much worth a try.</li>
</ul>


<p>For next year:</p>

<ul>
<li>I spent some airport time hacking up a quick Bootstrap/web.py app for signing up for an Ultimate game. I think it&#8217;d be great to have during PyCon, will see if I can make it happen. A bit daunting, between the logistics and not knowing anyone, but who knows.</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A decent boxed wine]]></title>
    <link href="http://fnord.phfactor.net/2012/02/29/a-decent-boxed-wine/"/>
    <updated>2012-02-29T09:22:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/29/a-decent-boxed-wine</id>
    <content type="html"><![CDATA[<p>As a followup to <a href="http://fnord.phfactor.net/2011/10/15/decent-wine-in-a-bag/">my previous post</a>,
I found this at the local Costco yesterday:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/02/29/IMG_0458.jpg" alt="wine box" /></p>

<p>2010 Bordeaux red, $25 for 3L. It&#8217;s actually pretty good, an everyday wine and quite drinkable.
For four bottles&#8217; worth the price is good, and if it keeps I&#8217;ll be happy. Unlike before, the spout
isn&#8217;t leaking, either.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Comments enabled on all posts]]></title>
    <link href="http://fnord.phfactor.net/2012/02/25/comments-enabled-on-all-posts/"/>
    <updated>2012-02-25T07:43:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/25/comments-enabled-on-all-posts</id>
    <content type="html"><![CDATA[<p>Another item off the to-do list - all posts here should now have comments enabled. A
bit of Perl:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>perl -pi -e 's/layout: post/layout: post\ncomments: true/g' *.markdown</span></code></pre></td></tr></table></div></figure>


<p>I think the <a href="https://github.com/thomasf/exitwp">exitwp</a> script that I used didn&#8217;t add the comments: true field.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Migrating away from Google]]></title>
    <link href="http://fnord.phfactor.net/2012/02/24/migrating-away-from-google/"/>
    <updated>2012-02-24T13:30:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/24/migrating-away-from-google</id>
    <content type="html"><![CDATA[<p>There&#8217;s an inherent tension when a company provides a free service: How do they
make money? Are <em>you</em> the product? Is it a <a href="https://en.wikipedia.org/wiki/Freemium">Freemium</a> model? Do they even have a plan?</p>

<p>If it&#8217;s free, they can always go out of business, change the terms, or generally do anything they want.
Those are your risks.</p>

<p>There has been, in the last couple of years, a recurring spate of news about Google that gives me
pause. <a href="https://en.wikipedia.org/wiki/Censorship_by_Google">Censorship in China</a>, the <a href="http://googleblog.blogspot.com/2012/01/search-plus-your-world.html">blending of Plus into search</a>, etc, etc.</p>

<p>The thing that tipped me into action is their awful new <a href="http://googleblog.blogspot.com/2012/01/updating-our-privacy-policies-and-terms.html">&#8216;privacy&#8217; policy</a>
(By the way, you should really <a href="https://www.eff.org/deeplinks/2012/02/how-remove-your-google-search-history-googles-new-privacy-policy-takes-effect">clear your Google history</a>
before that takes effect on March 1st!). Me no like.</p>

<p>It&#8217;s their company. They have to make a profit, and it&#8217;s their choice how they do so. From the
point of view of a random nerd, I strongly dislike the level of fine-grained data they will be
gathering and selling. I am choosing to look for alternatives, and I&#8217;m happy to pay for them.</p>

<p>Let me share what I&#8217;ve found so far. For the most part, I&#8217;ll just mention the ones I chose and not
try to enumerate all the alternatives.</p>

<h2>Search</h2>

<p>Still far and away the best product from Google, I must say. I&#8217;ve been using
the oddly named <a href="http://duckduckgo.com">DuckDuckGo</a> which I found via <a href="http://daringfireball.net/linked/2012/01/16/winer-bing">John Gruber</a>. It takes some
getting used to, but has some new features I like too. Using &#8216;!so&#8217; to search StackOverflow is handy,
as are the Python and Android shortcuts. I&#8217;m warming up to it.</p>

<h4>Search in Safari or other browsers</h4>

<p>If, as I recommend strongly, you are running <a href="http://glimmerblocker.org/">GlimmerBlocker</a>, then adding DDG to Safari
is pretty easy - see <a href="http://help.duckduckgo.com/customer/portal/articles/216447-safari">this page</a> for instructions.</p>

<p>Chrome or Firefox are also tweakable; see <a href="http://help.duckduckgo.com/customer/portal/articles/216447-safari">the same page</a></p>

<h4>Search on iPhone / iPad</h4>

<p>No easy way to replace Google with DDG here. DDG does have <a href="http://help.duckduckgo.com/customer/portal/articles/216419-apps">mobile search apps</a> for iOS and Android, but
it&#8217;s not integrated into Safari.</p>

<h4>Search on your blog</h4>

<p>If you use the search bar here on Fnord, as of today it&#8217;ll go via DDG. Kudos to them for having <a href="http://help.duckduckgo.com/customer/portal/articles/361829-octopress">Octopress instructions</a> - major nerd plus!
They also support other platforms, of course.</p>

<h2>RSS/Atom (Google Reader)</h2>

<p>There are several alternatives here. I found and recommend <a href="http://www.newsblur.com/">NewsBlur</a>, which
is Freemium, <a href="http://github.com/samuelclay">open source</a> and has an iPhone app. I simply exported my OPML from Google Reader, imported
it into NewsBlur and have never looked back. I paid for the Premium account, which is as I recall ~20/year; you set the donation amount.</p>

<p>Minuses:</p>

<ul>
<li>iPhone app is a bit crashy</li>
<li>No iPad app yet</li>
</ul>


<p>Overall - strongly recommended. I use the main site on the desktop and the iPhone app. Works great.</p>

<h2>Email</h2>

<p>I run an Exim-based mailserver here, though a few years ago I conceded the spam battle. My personal email
is now forwarded to <a href="http://www.spamcop.net/">SpamCop</a> for filtering. $30/year, fantastic. Never a single outage
or problem in three years now. I have a hybrid setup, where I archive messages to my IMAP server, but the inbox is on SpamCop.</p>

<h2>Blogs</h2>

<p>Depending on your level of techie interest, you can self-host as I do, use Github and Octopress, or one of the other
free platforms such as Tumblr, Posterous, WordPress.com and so on. I prefer to self-host, as that way I have my
data locally and complete control. Plus, it&#8217;s fun to do this stuff yourself!</p>

<p>If you do run WordPress, there are commercial services that&#8217;ll handle all the sysadmin work for you. It&#8217;s a pain
if your site gets popular.</p>

<h2>Analytics</h2>

<p>I paid for and like <a href="http://www.haveamint.com/">Mint</a>. You can see my stats <a href="http://www.phfactor.net/mint/">on this page</a>. The price is reasonable,
the install painless and the results decent. For my WatchOtaku site, I&#8217;ve been using <a href="http://getclicky.com/">Clicky</a>, as it&#8217;s a bit nicer but really
Mint would work there too. There are others; for my level of traffic and casual observation these both suffice.</p>

<h2>Code and project hosting</h2>

<p>Go <a href="http://github.com">Github</a>. Don&#8217;t even consider anything else. It&#8217;s <em>that</em> good.</p>

<p>Also works for <a href="http://phubbard.github.com">static pages like this one</a></p>

<p>If you need an in-house-hosted or FOSS solution, <a href="http://gitlabhq.com/">Gitlab</a> is pretty darn near a complete workalike.</p>

<h2>Maps and directions</h2>

<p><a href="http://www.openstreetmap.org/">OpenStreetMaps</a> is excellent. Good for GIS work too.</p>

<h2>Google Docs</h2>

<p>I used to use this more at UCSD, these days it&#8217;s a combination of IM, Email and the rare DOCX file. No suggestions,
other than to suggest using HTML for doc formatting; makes posting it easier anyway.</p>

<p>Maybe Dropbox?</p>

<h2>Google apps for your domain</h2>

<p>I use this a bit; Google is still doing the mail for WatchOtaku. I can live with this for now and will
migrate off if the account starts getting a lot of email; right now its about 1 per month and I can accept that. Since
that&#8217;s a domain-specific hobby/account/site, the analytics from it are gonna be bizarre.</p>

<h2>Conclusions</h2>

<p>Google has some excellent products and replacing them takes time and money. It&#8217;s worth it to me. I&#8217;d rather
spend a few bucks then be monetized, but of course YMMV.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Simple image uploads for Octopress]]></title>
    <link href="http://fnord.phfactor.net/2012/02/24/simple-image-uploads-for-octopress/"/>
    <updated>2012-02-24T11:47:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/24/simple-image-uploads-for-octopress</id>
    <content type="html"><![CDATA[<p>One of the features from Wordpress I&#8217;ve been missing is easy support for uploading and including
images. WP has a fancy GUI for this, and handles the uploads well.</p>

<p>So today did a hack while inspired. Shared as a gist on Github, this code:</p>

<ul>
<li>Makes the path YYYY/MM/DD, e.g. &#8216;2012/02/24&#8217;</li>
<li>Verifies that the directory created is writeable</li>
<li>Does an upload via the filesystem</li>
<li>Fetches the uploaded file via HTTP for an end-to-end check</li>
<li>Computes MD5 hashes of both to make sure it made it intact</li>
<li>Print out the full URL of the image, for easy use in your editor</li>
<li>Copies said URL into the copy &amp; paste buffer via pbcopy</li>
</ul>


<p>Usage is pretty basic:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>code/Image_uploader/upload.py Desktop/sorry.png
</span><span class='line'>http://fnord.phfactor.net/wp-content/uploads/2012/02/24/sorry.png</span></code></pre></td></tr></table></div></figure>


<p>In one step, you&#8217;ve uploaded the file and can go paste the URL into the editor!</p>

<p>I wanted to use scp, but was unable to find a way to create directories easily. It&#8217;s do-able, but
since I paid for ExpanDrive I&#8217;m not averse to using it. Here&#8217;s the code in case you want it:</p>

<div><script src='https://gist.github.com/1903244.js?file='></script>
<noscript><pre><code>#!/usr/bin/env python

&quot;&quot;&quot;
Idea - image uploader for Octopress.

Given a filename (list later), we want to
- make the filename url-friendly (maybe replace spaces with dashes or just urlencode it)
- Create a directory on the server in the form {base}/YYYY/mm/dd/{filename}
- copy it up
- Do a URL get and md5-sum to verify success
- Print out full and relative URLs for copying into post
- Put full URL into copy buffer for editor

Requirements and notes:
 - Destination filesystem mounted at SCP_DEST (I use ExpanDrive for this)
 - BASE_URL set to the root URL corresponding the SCP_DEST

I tried to implement this using scp, but there seems to be no simple way to make directories.

&quot;&quot;&quot;

from datetime import date
import logging as log
from os import makedirs, access, W_OK
from os.path import basename
from shutil import copyfile
import sys
import hashlib
from urllib import urlretrieve
import subprocess

# Remote base directory and corresponding URL
SCP_DEST = '/Volumes/Images'
BASE_URL = 'http://fnord.phfactor.net/wp-content/uploads'

# We will use a directory per day, to minimize the risk of duplicate files and slow directory ops
now = date.today()
REM_PATH = '/%4d/%02d/%02d' % (now.year, now.month, now.day)

def make_dir():
    dstr = SCP_DEST + REM_PATH
    log.debug(dstr)
    try:
        makedirs(dstr)
    except OSError, oe:
        if oe.errno == 17:
            log.info('Destination already exists, no worries')
        else:
            log.exception()
            raise oe
    return dstr

def print_args():
    print('\n\nSyntax: %s filename\n' % sys.argv[0])

def rewrite_local_filename(src_filename):
    # TODO urlencode?
    return src_filename

def filename_to_url(src_filename):
    return BASE_URL + '%s/%s' % (REM_PATH, basename(src_filename))

def get_hash(filename):
    md = hashlib.md5()
    md.update(open(filename).read())
    return md.hexdigest()

def compare_hashes(src_filename, dest_url):
    log.debug('Computing local hash...')
    local_hash = get_hash(src_filename)
    log.debug('Local hash ' + local_hash)

    log.debug('Fetching image from ' + dest_url)
    fn, headers = urlretrieve(dest_url)
    log.debug('Computing hash...')
    rem_hash = get_hash(fn)
    log.debug('Remote hash: ' + rem_hash)
    if local_hash == rem_hash:
        log.info('Hashes match, successful upload and download')
        return dest_url

    log.critical('Hash mismatch, upload failed')
    return None

def run_it(src_file):

    dest_dir = make_dir()
    # Verify
    if not (access(dest_dir, W_OK)):
        log.critical('Destination directory &quot;%s&quot; is not writeable, cannot continue' % dest_dir)
        exit(1)

    local_fn = rewrite_local_filename(src_file)
    dest_fn = dest_dir + '/' + basename(local_fn)

    log.info('Copying &quot;%s&quot; to &quot;%s&quot;...' % (local_fn, dest_fn))
    try:
        copyfile(local_fn, dest_fn)
    except OSError, oe:
        log.exception('Error copying file to server')
        raise oe

    dest_url = filename_to_url(dest_fn)
    final_url = compare_hashes(dest_fn, dest_url)
    if final_url:
        log.info(final_url)
        &quot;&quot;&quot;
        Data into clipboard for editor pasting - trick for feeding stdin found at
        http://livingcode.org/tag/python.1.html
        &quot;&quot;&quot;
        clipboard = subprocess.Popen('pbcopy', stdin=subprocess.PIPE)
        clipboard.stdin.write(final_url)

    return final_url


if __name__ == '__main__':
    log.basicConfig(level=log.ERROR, format='%(asctime)s %(levelname)s [%(funcName)s] %(message)s')
    if len(sys.argv) != 2:
        print_args()
        exit(1)

    print run_it(sys.argv[1])
</code></pre></noscript></div>


<p>Gotta love Python. And Github. And Octopress.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Aetna #fail]]></title>
    <link href="http://fnord.phfactor.net/2012/02/24/aetna-number-fail/"/>
    <updated>2012-02-24T11:20:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/24/aetna-number-fail</id>
    <content type="html"><![CDATA[<p>Yesterday I got an email from <a href="https://member.aetna.com/">Aetna</a>:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/02/24/aetna.png" alt="aetna snap" /></p>

<p>It suggests I complete thier HRA (Health risk assessment). This is something I found useful
while at UCSD, so I click the link, sign in to my account, and promptly get this:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/02/24/sorry.png" alt="fail" /></p>

<p>&#8230;which has to be one of the least useful dialog boxes I&#8217;ve ever seen. At a guess, the email
was form-generated, and my current employer lacks the HRA feature. But WTF, Aetna? Shouldn&#8217;t
you, you know, check first?</p>

<p>Yeesh.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The diminished value of IEEE and ACM subscriptions]]></title>
    <link href="http://fnord.phfactor.net/2012/02/24/the-diminished-value-of-ieee-and-acm-subscriptions/"/>
    <updated>2012-02-24T09:42:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/24/the-diminished-value-of-ieee-and-acm-subscriptions</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been a member of <a href="http://www.ieee.org">IEEE</a> and <a href="http://www.acm.org/">ACM</a> since 1997, back when I was an undergrad. For a while
I did some volunteer work for IEEE (for their <a href="http://www.ieee.org/membership_services/membership/gold/index.html">GOLD program</a>) though I quit in
frustration after a short time.</p>

<p>Anyway, yesterday I got an email from the IEEE reminding me that my email alias, phubbard@computer.org, was
going to expire unless I renewed my membership here soon. Which lead me to think a bit and ask a simple question:</p>

<blockquote><p>What am I getting from professional memberships and is it worth the cost?</p></blockquote>

<p>After all, IEEE is about $200 per year and ACM is ~$100; are they worth it?</p>

<p>It used to be that professional societies provided human networking, training, insurance plans, and publications.
These days, with LinkedIn, various websites and such, the only service I actually <em>use</em> is the email alias,
and it&#8217;s not like that&#8217;s of great value to me.</p>

<p>A couple of bullet points on the resume, meh. &#8220;Member of IEEE and ACM&#8221; has never gotten a comment.</p>

<p>Let&#8217;s not even <em>mention</em> the free magazines you get. They&#8217;re worthless, full stop.</p>

<p>I suspect that a lot of societies, both fraternal and professional, are going to have to
reinvent their utility in the age of the Internet. The old value propositions no longer hold, and
they need to find new ways to be useful. For me, as a working developer, IEEE and ACM no longer
make the cut. Here&#8217;s hoping I have reason to reconsider some day.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Added email subscriptions to the site]]></title>
    <link href="http://fnord.phfactor.net/2012/02/24/added-email-subscriptions-to-the-site/"/>
    <updated>2012-02-24T09:13:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/24/added-email-subscriptions-to-the-site</id>
    <content type="html"><![CDATA[<p>If you look in the upper right next to the search area, there&#8217;s a new icon that looks like this:</p>

<p><img src="http://fnord.phfactor.net/images/email.png" alt="email icon" /></p>

<p><a href="http://feedburner.google.com/fb/a/mailverify?uri=phfactor/rzbg&amp;amp;loc=en_US">Click it</a> and you can subscribe to daily updates via email, implemented via Feedburner. I know that some
folks used to read the site that way, so I&#8217;m pleased to have it working on Octopress.</p>

<p>If you want to set it up on your Octopress site, there&#8217;s two steps. You have to setup Feedburner
with your RSS or Atom feed, then go to the &#8216;Publicize&#8217; tab and activate email. Then take the HTTP URL
they give you and enter it into the _config.yml:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>subscribe_email: http://feedburner.google.com/fb/a/mailverify?uri=phfactor/rzbg&amp;loc=en_US</span></code></pre></td></tr></table></div></figure>


<p>Leave a comment if you have any problems, or email me - the feed now includes my email address.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Adding Disqus to Confluence]]></title>
    <link href="http://fnord.phfactor.net/2012/02/15/adding-disqus-to-confluence/"/>
    <updated>2012-02-15T13:28:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/15/adding-disqus-to-confluence</id>
    <content type="html"><![CDATA[<p>I&#8217;m trying to get non-spammy commenting working on <a href="http://watchotaku.com">my Confluence site</a> and
it&#8217;s a pain in the ass. The native solution is CAPTCHA-based, and that&#8217;s been
defeated by spammers.</p>

<p>I have a semi-solution using (as with Fnord) Disqus. Some notes for other folks attempting this:</p>

<ol>
<li>You have to use the <a href="http://docs.disqus.com/developers/universal/">raw Javascript functions of Disqus</a></li>
<li>On Confluence, go into Site admin / Theme / Layout editor / Page footnotes</li>
<li>Change Options to &#8216;Velocity then raw HTML&#8217;</li>
<li>Change the shortname to that of your site</li>
</ol>


<p>Here&#8217;s mine so far, with the short name munged:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>&lt;div id="disqus_thread"&gt;&lt;/div&gt;
</span><span class='line'>&lt;script type="text/javascript"&gt;
</span><span class='line'>    var disqus_shortname = 'CHANGEME'; // required: replace example with your forum short name
</span><span class='line'>
</span><span class='line'>    (function() {
</span><span class='line'>        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
</span><span class='line'>        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
</span><span class='line'>        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
</span><span class='line'>    })();
</span><span class='line'>&lt;/script&gt;
</span><span class='line'>&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
</span><span class='line'>&lt;a href="http://disqus.com" class="dsq-brlink"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;</span></code></pre></td></tr></table></div></figure>


<p>This seems to almost work, but the variables that tell Disqus what page it is seem to be unreachable.
Normally, you set</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>disqus_url
</span><span class='line'>disqus_identifier</span></code></pre></td></tr></table></div></figure>


<p>but I can&#8217;t tell how to read those. I&#8217;ve tried (from <a href="https://developer.atlassian.com/display/CONFDEV/Confluence+Objects+Accessible+From+Velocity">these docs</a>)</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$req
</span><span class='line'>$req.contextPath</span></code></pre></td></tr></table></div></figure>


<p>but those are not found.</p>

<p>Syntax was</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>var disqus_identifier = $req.contextPath;</span></code></pre></td></tr></table></div></figure>


<p>which produces an error visible in the Safari error console about req not being found.</p>

<p>I also tried (from <a href="http://confluence.atlassian.com/display/DOC/Guide+to+User+Macro+Templates">these docs</a>)</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$content
</span><span class='line'>$content.getEntity().getRequestUrl()</span></code></pre></td></tr></table></div></figure>


<p>but even content is not found. Perhaps some syntax error with the Velocity engine stuff, but the mixture
of Velocity and Javascript is very poorly documented. I was unable to find anyone else using Disqus with Confluence,
so if you have any tips do say so here!</p>

<p>At present, it&#8217;s almost working. The page portion loads, the Disqus portal seems happy, but due to
the lack of URL is causing comments to not load on the page they should be attached to.</p>

<p><strong>Update 3/10/12</strong>: I talked to one of the Disqus hackers at the PyCon convention, and he confirms that this approach works fine. If no URL or ID is set, Disqus sniffs the URL and comments will follow it as long as the URL is constant. Excellent.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New CSL Arduino posting]]></title>
    <link href="http://fnord.phfactor.net/2012/02/10/new-csl-arduino-posting/"/>
    <updated>2012-02-10T10:29:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/10/new-csl-arduino-posting</id>
    <content type="html"><![CDATA[<p>A couple of quick notes - at the suggestion of a friend, I&#8217;ve written some posts for <a href="http://citizenscientistsleague.com/2012/02/09/getting-the-arduino-software-and-hardware-working-first-in-a-series/">the Citizen Scientists League</a> on
the Arduino weather station. Code, setup, circuitry, Pachube interface and such. I&#8217;m curious to see how the response is there, as they probably get more readers than I do here.</p>

<p>Secondly, a quick tweak to Octopress - when you create a new post using rake, I added calls to add the post to git and fire up the editor, as those are what I&#8217;d do next anyway. Here&#8217;s the snippet from the Rakefile:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
</span><span class='line'>desc "Begin a new post in #{source_dir}/#{posts_dir}"
</span><span class='line'>task :new_post, :title do |t, args|
</span><span class='line'>  raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
</span><span class='line'>  mkdir_p "#{source_dir}/#{posts_dir}"
</span><span class='line'>  args.with_defaults(:title =&gt; 'new-post')
</span><span class='line'>  title = args.title
</span><span class='line'>  filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
</span><span class='line'>  if File.exist?(filename)
</span><span class='line'>    abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
</span><span class='line'>  end
</span><span class='line'>  puts "Creating new post: #{filename}"
</span><span class='line'>  open(filename, 'w') do |post|
</span><span class='line'>    post.puts "---"
</span><span class='line'>    post.puts "layout: post
</span><span class='line'>comments: true"
</span><span class='line'>    post.puts "title: \"#{title.gsub(/&/,'&amp;')}\""
</span><span class='line'>    post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
</span><span class='line'>    post.puts "comments: true"
</span><span class='line'>    post.puts "categories: "
</span><span class='line'>    post.puts "---"
</span><span class='line'>  end
</span><span class='line'>  # pfh 2/10/12
</span><span class='line'>  system "git add #{filename}"
</span><span class='line'>  system "edit #{filename}"
</span><span class='line'>end</span></code></pre></td></tr></table></div></figure>


<p>One more note - if you use zsh, you have to escape the square brackets. Here&#8217;s the syntax when I created this post:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake new_post\["New CSL Arduino posting"\]</span></code></pre></td></tr></table></div></figure>


<p>Mildly annoying.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New site for used car shopping]]></title>
    <link href="http://fnord.phfactor.net/2012/02/07/new-site-for-used-car-shopping/"/>
    <updated>2012-02-07T09:40:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/07/new-site-for-used-car-shopping</id>
    <content type="html"><![CDATA[<p>Found this via Hacker News:</p>

<p><img src="http://www.phfactor.net/fnord-images/autoglance.jpg" alt="" /></p>

<p>It&#8217;s a new site with an interesting presentation of the data. Price bands, uses model generation and not production year by default, and pulls data from other sites. Worth a try if you&#8217;re in the market for a used car.</p>

<p><a href="http://autoglance.com">AutoGlance</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Adding site stats via Mint]]></title>
    <link href="http://fnord.phfactor.net/2012/02/05/adding-site-stats-via-mint/"/>
    <updated>2012-02-05T08:38:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/05/adding-site-stats-via-mint</id>
    <content type="html"><![CDATA[<p>Several years ago I bought a license for the <a href="http://haveamint.com/">Mint analytics software</a>.
It&#8217;s self-hosted, no data sharing (which is my main qualm with Disqus) and you can see the output
<a href="http://www.phfactor.net/mint/">here any time you want</a>.</p>

<p>I just added it to Octopress, so the data will be worthless for a while.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Adding comments via Disqus]]></title>
    <link href="http://fnord.phfactor.net/2012/02/05/adding-comments-via-disqus/"/>
    <updated>2012-02-05T08:05:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/05/adding-comments-via-disqus</id>
    <content type="html"><![CDATA[<p>I decided to give <a href="http://disqus.com/">Disqus</a> a try for comments. You can read more about it
<a href="https://en.wikipedia.org/wiki/Disqus">on Wikipedia</a>. The short version is that it&#8217;s a freemium
service, with the first paid tier starting at a staggering $300 per <em>month</em>. So yeah, free version
it is, until Octopress adds plain-Jane Akismet support.</p>

<h3>LSI update</h3>

<p>I <em>thought</em> I had generated native code, but after a solid ten hours of cranking I killed it. So no
latent semantic analysis for us, yet. Do, uh, leave me a comment if you have an idea!</p>

<p>In fact, please leave a comment and let me know how you like Disqus. If people hate it and want it gone,
I would understand.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[LSI and rb-gsl]]></title>
    <link href="http://fnord.phfactor.net/2012/02/01/lsi-and-rb-gsl/"/>
    <updated>2012-02-01T16:19:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/01/lsi-and-rb-gsl</id>
    <content type="html"><![CDATA[<p>So I&#8217;m spelunking through <a href="https://github.com/mojombo/jekyll/wiki/Configuration">the Octopress docs</a> and
find a flag for &#8216;related posts&#8217;.</p>

<p>In _config.yml, set</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>lsi: true</span></code></pre></td></tr></table></div></figure>


<p>&#8230;and watch your laptop turn into a smoldering heap of rubble. My</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake generate</span></code></pre></td></tr></table></div></figure>


<p>is still cranking, fans roaring, as it tries to generate related posts. It does helpfully say</p>

<blockquote><p>Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/</p></blockquote>

<p>But <a href="http://rb-gsl.rubyforge.org/">rb-gsl</a> is Ruby on top of <a href="http://www.gnu.org/software/gsl">GSL</a>, hmm. GSL compiles and installs no prob, but rb-gsl dies:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>gem install gsl</span></code></pre></td></tr></table></div></figure>


<p>yields lots of compiles then</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>gcc -I. -I/Users/hubbard/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/hubbard/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/hubbard/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_NARRAY_H  -I/Users/hubbard/.rvm/gems/ruby-1.9.2-p290/gems/narray-0.6.0.1/. -I/Users/hubbard/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/x86_64-darwin11.2.0 -I/Users/hubbard/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -Wall -I../include  -I/usr/local/include  -o matrix_complex.o -c matrix_complex.c
</span><span class='line'>matrix_complex.c:1525: error: conflicting types for âgsl_matrix_complex_equalâ
</span><span class='line'>/usr/local/include/gsl/gsl_matrix_complex_double.h:227: error: previous declaration of âgsl_matrix_complex_equalâ was here
</span><span class='line'>make: *** [matrix_complex.o] Error 1
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>Gem files will remain installed in /Users/hubbard/.rvm/gems/ruby-1.9.2-p290/gems/gsl-1.14.7 for inspection.
</span><span class='line'>Results logged to /Users/hubbard/.rvm/gems/ruby-1.9.2-p290/gems/gsl-1.14.7/ext/gem_make.out.</span></code></pre></td></tr></table></div></figure>


<p>Drat. No fix yet.</p>

<p><em>Update</em>: Fix is to <a href="https://github.com/romanbsd/rb-gsl/issues/2">use v1.14</a> of GSL, not 1.15. Cranking now&#8230;</p>

<p><em>Update 2/5/12</em>: Compiled, but still unusable. Killed it after ten hours.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Moving to Octopress]]></title>
    <link href="http://fnord.phfactor.net/2012/02/01/moving-to-octopress/"/>
    <updated>2012-02-01T12:24:00-08:00</updated>
    <id>http://fnord.phfactor.net/2012/02/01/moving-to-octopress</id>
    <content type="html"><![CDATA[<h3>TL;DR</h3>

<p>Fnord is now running on <a href="http://octopress.org/">Octopress</a>. Should be faster and more stable. Enjoy.</p>

<h3>Why Octopress?</h3>

<p>When I started Fnord back in 2005, WordPress was the hot ticket. Well supported, lots of add-ons and themes, and most importantly a Debian package. Since then, the ongoing upkeep has been a bit of a hassle, I&#8217;ve <a href="http://fnord.phfactor.net/2007/08/25/fnord-updates-downtime-themes/">gotten hacked once</a> and also just have the itch to try something else. The PHP in WordPress has too many fiddly bits, and these days something as simple as a free WordPress theme can get you hacked.</p>

<p>It&#8217;s time to move on.</p>

<p>My first impulse was to move to <a href="http://www.atlassian.com/software/confluence/">Confluence</a>. I use that for <a href="http://watchotaku.com">WatchOtaku</a>, where the combination of blog+wiki is perfect. I <a href="https://github.com/phubbard/wp2confluence">created a project</a> and did some hacking, but the HTML parsing had too many edge cases. I should have used <a href="http://www.crummy.com/software/BeautifulSoup/">BeautifulSoup</a> or similar instead of trying to parse it myself; lesson learned.</p>

<p>Sometime later I read several posts about the advantages of a static site: they are super efficient to serve, fast under load and much harder to hack. I spent some time trying to make <a href="http://the.taoofmac.com/space/HomePage">Rui Carmo&#8217;s</a> code work, but that was a pain and the docs were poor.</p>

<p>Then I read <a href="http://mattgemmell.com/2011/09/12/blogging-with-octopress/">this post by Matt Gemmell</a> and its link to the key missing piece, <a href="https://github.com/thomasf/exitwp">exitwp</a>. Boom!</p>

<p>So I went with <a href="http://octopress.org/">Octopress</a>. Killer support for mobile and such, designed for programmers, plugins, nice fonts, twitter and github integration, etc, etc. I&#8217;m having fun, and the results look good so far.</p>

<p>Most importantly, Octopress is <em>fun</em>. I blog because I want to, and having a platform that encourages that is a major plus.</p>

<h3>Why Not Octopress?</h3>

<p>There are some drawbacks. It&#8217;s definitely harder to get working, oriented as it is towards software developers. Ruby, git, Markdown, rsync, Apache config; all pretty geeky. On the flip side, that niche appeal should make it less attractive towards spammers.</p>

<p>No nifty iOS app for blogging. That I will miss.</p>

<p>MarsEdit works <a href="https://github.com/danimal/octomars">with a bit of effort</a>.</p>

<h3>Comments, Categories and email subscriptions: missing features</h3>

<ol>
<li>One key feature I want was the dropdown list of categories. I&#8217;m trying to figure out how to replicate that here.</li>
<li>As for comments, to be honest I get about 1 real comment per month here, and several per day of varying spam. So I have no comments in place, and am not sure if I want them at all.</li>
<li>I have a few folks subscribed via email, using a wordpress plugin. I&#8217;ll see what I can do there.</li>
<li>I need to decide on stats &amp; analytics and perhaps add Mint to the header. Or getclicky; I like that too.</li>
</ol>


<h3>A Note For Others</h3>

<p>As noted on <a href="https://github.com/imathis/octopress/issues/144">this page</a>, you need set a couple of environment variables before running rake to generate the site:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>export LC_CTYPE=en_US.UTF-8
</span><span class='line'>export LANG=en_US.UTF-8</span></code></pre></td></tr></table></div></figure>


<p>Otherwise you get errors like this:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>## Generating Site with Jekyll
</span><span class='line'>unchanged sass/screen.scss
</span><span class='line'>Configuration from /Users/hubbard/build/octopress/_config.yml
</span><span class='line'>Building site: source -&gt; public
</span><span class='line'>/Users/hubbard/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:29:in `read_yaml': invalid byte sequence in US-ASCII (ArgumentError)</span></code></pre></td></tr></table></div></figure>


<p>Overall, Octopress is a huge win. Strongly recommended, and I plan to move the other blogs here over as time permits.</p>

<p>As part of the move, the entire site, with configuration and posts, <a href="git@github.com:phubbard/fnord.git">is public on github</a>. I hesitated a long time over this, but really? The site is public, the config holds no secrets, and it might help someone else get going. Enjoy!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[More on the firewall]]></title>
    <link href="http://fnord.phfactor.net/2012/01/27/more-on-the-firewall/"/>
    <updated>2012-01-27T16:02:52-08:00</updated>
    <id>http://fnord.phfactor.net/2012/01/27/more-on-the-firewall</id>
    <content type="html"><![CDATA[<ol>
<li><p>Just added the Magic Anti-Spam Firewall rule: Block inbound email if it comes from a Windows box. I have high hopes for this one&#8230;</p></li>
<li><p>OSX VPN working</p></li>
<li><p>Still working on VPN setup for iPhone and iPad based on <a href="http://doc.pfsense.org/index.php/Mobile_IPsec_on_2.0">this tutorial.</a></p></li>
<li><p>Added packet shaping for BitTorrent and it made an enormous difference. You can&#8217;t even tell a transfer is happening now! Perfect.</p></li>
</ol>


<p>It&#8217;s great. I continue to wish I&#8217;d gotten it sooner.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Why I love my new firewall]]></title>
    <link href="http://fnord.phfactor.net/2012/01/22/why-i-love-my-new-firewall/"/>
    <updated>2012-01-22T15:57:16-08:00</updated>
    <id>http://fnord.phfactor.net/2012/01/22/why-i-love-my-new-firewall</id>
    <content type="html"><![CDATA[<p>As a late Christmas present, I got my <a href="http://fnord.phfactor.net/2008/11/17/why-cant-i-find-this-firewall/">long-awaited</a> <a href="http://store.netgate.com/Netgate-m1n1wall-2D3-2D13-Red-P218C83.aspx">Netgate 2D3 firewall</a>:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/m1n1wall-2D13-red-system.jpg" alt="firewall" /></p>

<p>My previous firewall was the Cisco/Linksys RV042, a entry-level business unit that worked quite well for years here.</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/unnamed.jpg" alt="Unnamed" /></p>

<p>There were a few things I wanted that the RV042 couldn&#8217;t do:</p>

<p>Better handling of bit torrent. Nothing better for ISOs! The RV042 choked under, I think, large numbers of open TCP connections. Hard to tell if the limitation was CPU or memory or what, which leads to…
Better instrumentation, visibility and metrics. I want to be able to see how it&#8217;s performing and if I&#8217;m up against limits
Better filtering and traffic handling.
Stretch goal: Block all inbound mail connections from any machine running MS Windows. Invariable botnet spam, and one of the niftier tricks possible with OpenBSD and pf.
Turn-key-grade. I&#8217;ve less time to DIY these days, so I needed something good to go out of the box.</p>

<p>Running <a href="http://www.pfsense.org/">pfsense</a> 2.0, the new firewall is superb beyond my expectations. The web-based GUI is fantastic, the 500Mhz CPU and 256MB of memory handle more traffic quite ably, and the sheer <em>depth</em> of functionality present is almost daunting. This wee beastie is astounding. Here are some bits I&#8217;ve liked so far:</p>

<p>RRD graphs for CPU, memory, TCP state tables, rules traffic, etc, etc. Updated via AJAX, no less.
Nice dashboard showing status and traffic at a glance.
It ships with nanoBSD installed twice, two partitions on the 4GB compact flash card. The idea is that, if you hose the firewall, you can boot into the second partition and be back up quickly. Haven&#8217;t tried that, but I love the no-moving-parts flash storage.
The 2D3 version gives me an extra ethernet port, for later expansion.
I got the HiFn crypto accelerator, which can do 35MB/sec of AES128.
Good support for Apple - OpenVPN for laptops, and IPsec for iDevices.
Nice list subscriptions, so I&#8217;ve subscribed to <a href="http://doc.pfsense.org/index.php/IP_Blocklist">IP-based blacklists</a> for compromised hosts, ad servers, spammers and the link.
Transparent HTTP filtering with squid and squid guard. I could also use this for caching if I wanted, but for now it&#8217;s an easy way to block domains like 2o7.net and the like.</p>

<p>So here are some RRD graphs for a monster bit torrent test, around 200-400 peers.</p>

<p>Traffic:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.12.35-PM.png" alt="Screen Shot 2012 01 22 at 3 12 35 PM" /></p>

<p>TCP states, peaking around 3,000:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.11.54-PM.png" alt="Screen Shot 2012 01 22 at 3 11 54 PM" /></p>

<p>Traffic: Red is upload, set to a 2.0 sharing ratio:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.11.20-PM.png" alt="Screen Shot 2012 01 22 at 3 11 20 PM" /></p>

<p>The important one, CPU usage:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.11.35-PM.png" alt="Screen Shot 2012 01 22 at 3 11 35 PM" /></p>

<p>So, roughly speaking, the 20Mbit peak took about half the CPU with the current minimal rules and fire walling. That&#8217;s not astounding, but I suspect and hope that I can tune it better. Next up, I&#8217;m going to try the packet shaping to see what effect that has. Right now, ICMP goes to hell:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.13.03-PM.png" alt="Screen Shot 2012 01 22 at 3 13 03 PM" /></p>

<p>I&#8217;ve done a simple test with the OpenVPN, which works though I had to buy the Viscosity app to make it work. ($5). Need to get iOS working and see how well that works, that&#8217;ll be nice to have for the trip to PyCon in March.</p>

<p>Here&#8217;s a shot of the web interface:</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/Screen-Shot-2012-01-22-at-3.14.59-PM.png" alt="Screen Shot 2012 01 22 at 3 14 59 PM" /></p>

<p>(Yep, I named it &#8216;fratboy.&#8217; My old firewall was &#8216;nail.&#8217; The theme is &#8216;things that get hammered.&#8217; I still think it&#8217;s funny.)</p>

<p>Other things to look forward to:</p>

<p>Full IPv6 support (Hi, BenC!)
Operating-system-based filtering
Adding a 2-line LCD screen, I want a traffic barograph, and the 2D3 has a serial port I can use.</p>

<p>Overall? For $300 it&#8217;s a bit steep, but frankly I now regret having bought two RV042s; shoulda gone here years ago. It out-features commercial routers up to two or three thousand bucks, and does so with silence and ~4 watts of power. Yay!</p>

<p>Strongly recommended.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New firewall router!]]></title>
    <link href="http://fnord.phfactor.net/2012/01/13/new-firewall-router/"/>
    <updated>2012-01-13T15:53:08-08:00</updated>
    <id>http://fnord.phfactor.net/2012/01/13/new-firewall-router</id>
    <content type="html"><![CDATA[<p><a href="http://fnord.phfactor.net/wp-content/uploads/2012/01/m1n1wall-2D13-red-system.jpg"><img src="http://fnord.phfactor.net/wp-content/uploads/2012/01/m1n1wall-2D13-red-system.jpg" alt="" /></a>
My <a href="http://store.netgate.com/Netgate-m1n1wall-2D3-2D13-Red-P218C83.aspx">Netgate 2D3</a> arrived and is installed - more on this later, it&#8217;s a nano-BSD box, no moving parts, 2-3W power and full pf onboard with awesome web GUI, hardware (HiFN) crypto accelerator, and tons of capacity to do filtering, packet scrubbing and much much more.</p>

<p>I am in heaven. Highly recommended.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Other reasons to miss Argentina]]></title>
    <link href="http://fnord.phfactor.net/2011/12/29/other-reasons-to-miss-argentina/"/>
    <updated>2011-12-29T15:24:47-08:00</updated>
    <id>http://fnord.phfactor.net/2011/12/29/other-reasons-to-miss-argentina</id>
    <content type="html"><![CDATA[<p>Amazing beef. This was a rare treat, a full scale home BBQ at the home of Natalia&#8217;s parents.</p>

<p>Check out this home grilling setup: coals on the left, 5 feet or so of grilling area.</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2011/12/P1000433.jpg" alt="P1000433" /></p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2011/12/P1000444.jpg" alt="P1000444" /></p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2011/12/P1000441.jpg" alt="P1000441" /></p>

<p>Now I&#8217;m all hungry again.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Skylight/stairwell]]></title>
    <link href="http://fnord.phfactor.net/2011/12/29/skylightstairwell/"/>
    <updated>2011-12-29T15:19:05-08:00</updated>
    <id>http://fnord.phfactor.net/2011/12/29/skylightstairwell</id>
    <content type="html"><![CDATA[<p>Buenos Aires, 2007.</p>

<p><img src="http://fnord.phfactor.net/wp-content/uploads/2011/12/P1000361.jpg" alt="P1000361" /></p>
]]></content>
  </entry>
  
</feed>

