<?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>Brandon Sterne</title>
	<atom:link href="http://brandon.sternefamily.net/posts/feed/" rel="self" type="application/rss+xml" />
	<link>http://brandon.sternefamily.net/posts</link>
	<description>The Whole Brevity Thing</description>
	<lastBuildDate>Fri, 13 Aug 2010 18:25:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Jetpack: Unread Messages in Gmail App Tab</title>
		<link>http://brandon.sternefamily.net/posts/2010/08/jetpack-unread-gmail-favicon/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/08/jetpack-unread-gmail-favicon/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 18:20:05 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=395</guid>
		<description><![CDATA[One of the new features in Firefox 4 is the App Tab which lets users persist a tab that they use continuously. Firefox shrinks the tab down to just the favicon and places it in a special area for these tabs which generally aren&#8217;t closed by the user. The feature is great, but one of [...]]]></description>
			<content:encoded><![CDATA[<p>One of the new features in <a href="http://www.mozilla.com/en-US/firefox/beta/">Firefox 4</a> is the <a href="http://blog.mozilla.com/faaborg/2010/07/28/app-tabs-in-firefox-4-beta-2/">App Tab</a> which lets users persist a tab that they use continuously.  Firefox shrinks the tab down to just the favicon and places it in a special area for these tabs which generally aren&#8217;t closed by the user.  The feature is great, but one of the side effects is that Gmail App Tabs don&#8217;t show anymore the part of the <code>&lt;title></code> that indicates unread messages.</p>
<p>That&#8217;s where my new <a href="https://jetpack.mozillalabs.com/">Jetpack</a> (a cool new, lightweight (and secure!) way to write <a href="https://addons.mozilla.org/">Add-ons</a>) comes in.</p>
<p>Go install <a href="https://addons.mozilla.org/en-US/firefox/addon/216008/">Unread Gmail Favicon</a> from AMO and the favicon for that tab will indicate the number of unread messages when you have them like so:</p>
<p class="center"><a href="https://addons.mozilla.org/en-US/firefox/addon/216008/"><img src="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/08/app-tab-closeup.png" alt="" title="Gmail Unread Favicon" width="185" height="139" class="aligncenter size-full wp-image-394" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/08/jetpack-unread-gmail-favicon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hacked my DEF CON 18 badge</title>
		<link>http://brandon.sternefamily.net/posts/2010/07/hacked-my-def-con-18-badge/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/07/hacked-my-def-con-18-badge/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 00:11:40 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=366</guid>
		<description><![CDATA[I was only able willing to stay for part of the first day of DEF CON this year, but I&#8217;m glad I did. One of the things they&#8217;ve done for the last five years or so is put microcontrollers in the badges, and put in little Easter eggs for people to search for. This year&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I was only <del datetime="2010-07-30T23:36:03+00:00">able</del> willing to stay for part of the first day of <a href="http://www.defcon.org/html/defcon-18/dc-18-index.html">DEF CON</a> this year, but I&#8217;m glad I did.  One of the things they&#8217;ve done for the last five years or so is put microcontrollers in the badges, and put in little Easter eggs for people to search for.  This year&#8217;s had a Ninja Party mode which was locked by default, but you could unlock it by placing a series of 15 tumblers in the correct position.</p>
<p>They published the source code for the badges on the CD they gave out at registration (so perhaps I&#8217;m stupid for loading the CD on my laptop rather than smart for reverse engineering the badge).  I opened up DC18_Badge.c and, searching for &#8220;Ninja&#8221; (the code was commented nicely), quickly found the following two C functions:</p>
<pre class="brush: cpp; gutter: false">
/**************************************************************/
/* NINJA ROUTINES
/**************************************************************/

int dc18_ninja_validate(uint32_t val)
{
    uint16_t a, b;

    a = (uint16_t)(val &#038; 0xfff);
    b = (uint16_t)(val >> 12);

    if((a ^ b) == 0x916)
    {
        return 1;
    }
    return 0;
}

// encode tumbler states into 24-bit value
uint32_t dc18_encode_tumblers(tumbler_state_type *tumblers)
{
    uint32_t x = 0, j = 1;
    uint16_t i;

    for(i = 0; i < TUMBLERS_PER_IMAGE; i++)
    {
        x += tumblers[i] * j;
        j *= 3;
    }

    return x;
}
</pre>
<p>So the trick was to find the number that made <code>(a ^ b) == 0x916</code> and then figure out the tumbler positions to represent that number.  I wrote two small Python functions to automate those tasks.  To find the number that would unlock Ninja Mode, I wrote this loop.  I added a print statement to show how far into the search we were, thinking it might take some time to find it, but it popped out 6423 in no time at all:
<pre class="brush: python; gutter: false">while 1:
	a = i &#038; 0xfff
	b = i >> 12
	if i % 10000 == 0:
		print "# a: %d, b: %d, i: %d" % (a, b, i)
	if a ^ b == 0x916:
		print "DONE: %d" % (i)
		break
	i += 1

DONE: 6423
</pre>
<p>Now all that was left was to figure out the tumbler positions to represent 6423.  Clearly, <code>dc18_encode_tumblers</code> tells us how to do that.  I whipped up this little function to convert the tumbler positions to a decimal number:</p>
<pre class="brush: python; gutter: false">def enc_tumblers(tum):
	x = 0; j = 1;
	for i in range(15):
		x += tum[i] * j
		j *= 3
	return x

>>> enc_tumblers([1,1,1,1,1,2,2,2,0,0,0,0,0,0,0])
6439
</pre>
<p>I was going to write another loop to increment the tumbler array I was passing to <code>enc_tumblers</code>, but my first guess was so close that I just manually entered the settings until I found the winning configuration:</p>
<pre class="brush: python; gutter: false">>>> enc_tumblers([0,2,2,0,1,2,2,2,0,0,0,0,0,0,0])
6423
</pre>
<p>Once I had the configuration, I put the tumblers in the appropriate positions: 0 - up, 1 - middle, 2 - down.  After that, well, I guess I'm a ninja now:</p>
<p><a href="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/07/def-con.jpg"><img src="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/07/def-con.jpg" alt="" title="Ninja Party Unlocked" width="80%" class="aligncenter size-full wp-image-380" /></a><br />
<script type="text/javascript" src="/posts/syntax/src/shCore.js"></script><br />
<script type="text/javascript" src="/posts/syntax/scripts/shBrushCpp.js"></script><br />
<script type="text/javascript" src="/posts/syntax/scripts/shBrushPython.js"></script></p>
<link rel="stylesheet" type="text/css" href="/posts/syntax/styles/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/posts/syntax/styles/shThemeDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all()</script></p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/07/hacked-my-def-con-18-badge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress CSP Plugin</title>
		<link>http://brandon.sternefamily.net/posts/2010/05/wordpress-csp-plugin/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/05/wordpress-csp-plugin/#comments</comments>
		<pubDate>Fri, 28 May 2010 18:41:30 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Web Security]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=350</guid>
		<description><![CDATA[My implementation of the Content Security Policy server logic for WordPress is now available as a WordPress Plugin. Fig.1 &#8211; CSP configuration page making a policy recommendation. Fig. 2 &#8211; New panel in media uploader allows direct creation of script files in the uploads directory.]]></description>
			<content:encoded><![CDATA[<p>My implementation of the Content Security Policy server logic for WordPress is now available as a <a href="http://wordpress.org/extend/plugins/content-security-policy/">WordPress Plugin</a>.</p>
<p class="center"><a href="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/05/screenshot-1.png"><img src="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/05/screenshot-1-300x234.png" alt="" title="CSP Policy Recommendation" width="300" height="234" class="aligncenter size-medium wp-image-352 noborder" /></a></p>
<p class="small center">Fig.1 &#8211; CSP configuration page making a policy recommendation.</p>
<p class="center"><a href="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/05/screenshot-2.png"><img src="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/05/screenshot-2-300x234.png" alt="" title="New Script File via Editor" width="300" height="234" class="aligncenter size-medium wp-image-353 noborder" /></a></p>
<p class="small center">Fig. 2 &#8211; New panel in media uploader allows direct creation of script files in the uploads directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/05/wordpress-csp-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing Links</title>
		<link>http://brandon.sternefamily.net/posts/2010/05/sharing-links/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/05/sharing-links/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:23:50 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=320</guid>
		<description><![CDATA[a.bookmarklet { text-decoration: none; border: 1px solid #bbb; margin: 1em; padding: .5em; -moz-border-radius: .5em; -webkit-border-radius: .5em; } Sometimes I make a tool that I use for a while and then wonder if it&#8217;s something others will find useful too. Here&#8217;s one of them&#8230; For a while I was sharing links on my home page by [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
a.bookmarklet {
  text-decoration: none;
  border: 1px solid #bbb;
  margin: 1em;
  padding: .5em;
  -moz-border-radius: .5em;
  -webkit-border-radius: .5em;
}
</style>
<p style="margin:0 2em"><em>Sometimes I make a tool that I use for a while and then wonder if it&#8217;s something others will find useful too.  Here&#8217;s one of them&#8230;</em></p>
<p>For a while I was sharing links on my home page by linking to the feed of stories I&#8217;ve <a href="http://www.reddit.com/user/jackthecoiner/liked/">upvoted on Reddit</a>, but that has become less satisfying as Reddit dumbs itself down each day (the same thing that happened to Digg a few years earlier).  I decided to make my own link-sharing program that I could use by just clicking a <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> whenever I was on a page I wanted to share.</p>
<p>It is a very simple program that stores the links in a flat text file and uses <a href="http://www.w3.org/TR/cors/#access-control-allow-origin-response-hea">CORS</a> to allow the bookmarklet to POST data to it from across domains.  You can put the files in a directory on your server and use this simple bookmarklet to share links:</p>
<p style="margin:1em; font-size:80%">Drag this to your bookmarks toolbar: <a href='javascript:var shareUrl = "http://your.server/share/index.php"; var pw = "p@ssword";  function createXHR() {   if (window.XMLHttpRequest)     return new XMLHttpRequest();   else if (window.ActiveXObject)     return new ActiveXObject("Microsoft.XMLHTTP");   else     return null; }  var text = prompt("Enter Link Text", document.title); var url = window.location.href; var params = "text=" + escape(text) + "&#038;url=" + escape(url) + "&#038;pw=" + pw;  var http = createXHR(); http.open("POST", shareUrl, true); http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); http.onreadystatechange = handleResponse; http.send(params);  function handleResponse() {   if (http.readyState == 4 &#038;&#038; http.status == 200) {     var response = http.responseText;     if (response.length)       alert(response);   } }' class="bookmarklet">Share This</a></p>
<div class="middleBlock">
<p>You can check out the <a href="/files/share/index.txt">server code</a> or the <a href="/files/share/bookmarklet.js">bookmarklet source</a>, or you can download the <a href="/files/share.zip">zip archive</a> and extract the files on your server.</p>
</div>
<p>When you fetch the server script with GET you get back a <a href="/share/index.php?format=json">JSON</a> or <a href="/share/index.php?format=rss">RSS</a> feed depending on the <code>format</code> parameter you pass.</p>
<p>Make sure the password in the bookmarklet stays synced with the password in the server file and change them to something secure.</p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/05/sharing-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beyond Facebook</title>
		<link>http://brandon.sternefamily.net/posts/2010/05/beyond-facebook/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/05/beyond-facebook/#comments</comments>
		<pubDate>Sat, 15 May 2010 22:01:38 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Privacy]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=274</guid>
		<description><![CDATA[<p>I'm finding it very gratifying that, at a time when I've personally reached my limit regarding Facebook's general disregard for privacy (I'm in the process of deleting my profile), many other people are finding themselves at the same place.  The issue, in fact, has hit the <a href="http://news.google.com/news?q=facebook+privacy">mainstream</a>.  So much so, that plenty of <a href="http://www.wired.com/epicenter/2010/05/facebook-rogue/">other</a> <a href="http://calacanis.com/2010/05/12/the-big-game-zuckerberg-and-overplaying-your-hand/">writers</a>, more capable than myself, have raised their voices on this issue.  I think it's fantastic that more people are being exposed, in many cases for the first time, to privacy-related issues and I'm sure many of those people will inform themselves and ultimately reach the same conclusion that I have: that <strong>no company should control the way we connect and share information with each other on the Web</strong>.  Plus, this lets me forgo writing in detail about what's wrong with Facebook, and instead focus on how to move beyond walled gardens...</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finding it very gratifying that, at a time when I&#8217;ve personally reached my limit regarding Facebook&#8217;s general disregard for privacy (I&#8217;m in the process of deleting my profile), many other people are finding themselves at the same place.  The issue, in fact, has hit the <a href="http://news.google.com/news?q=facebook+privacy">mainstream</a>.  So much so, that plenty of <a href="http://www.wired.com/epicenter/2010/05/facebook-rogue/">other</a> <a href="http://calacanis.com/2010/05/12/the-big-game-zuckerberg-and-overplaying-your-hand/">writers</a>, more capable than myself, have raised their voices on this issue.  I think it&#8217;s fantastic that more people are being exposed, in many cases for the first time, to privacy-related issues and I&#8217;m sure many of those people will inform themselves and ultimately reach the same conclusion that I have: that <strong>no company should control the way we connect and share information with each other on the Web</strong>.  Plus, this lets me forgo writing in detail about what&#8217;s wrong with Facebook, and instead focus on how to move beyond walled gardens.</p>
<p>I will say, though, that if you are still informing yourself on the state of affairs, please take a moment to read:</p>
<ul>
<li>The NY Times on the (IMO, deliberately) overly complex <a href="http://www.nytimes.com/interactive/2010/05/12/business/facebook-privacy.html?src=tp">privacy controls provided by Facebook</a>.</li>
<li>The EFF on the gradual <a href="http://www.eff.org/deeplinks/2010/04/facebook-timeline">erosion of Facebook&#8217;s privacy policy</a>.</li>
</ul>
<p>What is clearly needed is an open, distributed platform on which to share and connect with friends in a way that is congruent with each individual&#8217;s personal need for privacy and security.  I think the Web itself, with the help of existing and emerging technologies, and the agreement on some basic protocols, can be that platform.</p>
<p>I am not sure yet how I can best contribute to this movement, but I am passionate about it and will look to help out in whatever way I can.  I have started to consider properties of the new system that will be necessary for its success.  So far those include:</p>
<ol>
<li><strong>Simplicity</strong> &#8211; Facebook is popular for a reason: it provides a simple interface and a centralized place to connect with your friends and to have rich experiences.  Any potential replacement needs to be equally simple to use.  The need for server or software configuration of any kind is a non-starter.</li>
<li><strong>Portability</strong> &#8211; Your data is yours.  It should go with you wherever you decide your profile should live, whether it&#8217;s on your own server or on a hosted solution.  I&#8217;m a pretty big fan of <a href="http://wordpress.org">WordPress</a>.  A decent analogy is that your profile (blog, in this context) belongs to you whether you host it in your own domain or on <a href="http://wordpress.com">wordpress.com</a>.  Should you decide to move that profile, the host should have no claims on your profile or any data contained therein.</li>
<li><strong>Discoverability</strong> &#8211; Once we&#8217;re all hosting our profiles (effectively our online identity) across autonomous networks, it is important that we be able to find and connect with our friends.  This will require a directory system not unlike the <a href="http://en.wikipedia.org/wiki/Web_of_trust">web of trust</a> first proposed by Zimmermann with the introduction of <a href="http://en.wikipedia.org/wiki/Pretty_Good_Privacy">PGP</a>.  Users should be easily able to connect with their friends based on names or other identifiers without manually searching across disparate networks.</li>
<li><strong>Confidentiality</strong> &#8211; What right does the host of your profile have to view the communications between you and your friends?  Users should easily be able to hide their messages for retrieval only by specific friends or groups.  Strong <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">crypto</a> should be neatly enabled while individual users should require no knowledge of cryptography whatsoever.</li>
</ol>
<p>There may be many more desirable properties for this new system.  I can&#8217;t wait to hear what you all have to say.</p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/05/beyond-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing file extensions with sed</title>
		<link>http://brandon.sternefamily.net/posts/2010/05/removing-file-extensions-with-sed/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/05/removing-file-extensions-with-sed/#comments</comments>
		<pubDate>Wed, 12 May 2010 16:48:22 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=232</guid>
		<description><![CDATA[<p>I need the following sed one-liner periodically, and I thought it was useful enough to share here.  Other versions I've seen chopped off everything after the first dot, which doesn't work for files with a dot in the basename.  This one does:</p>
<pre class="brush: bash; gutter: false">sed s/\.[^\.]*$//</pre>
<p>Sample Usage:</p>
<pre class="brush: bash; gutter: false">bsterne@zodiac:~$ ls /video &#124; sed s/\.[^\.]*$// &#124; head -n5
2001: A Space Odyssey
40 Year Old Virgin, The
9
A Bronx Tale
A Clockwork Orange</pre>

<script type="text/javascript" src="/posts/syntax/src/shCore.js"></script>
<script type="text/javascript" src="/posts/syntax/scripts/shBrushBash.js"></script>
<link rel="stylesheet" type="text/css" href="/posts/syntax/styles/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/posts/syntax/styles/shThemeDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all()</script>]]></description>
			<content:encoded><![CDATA[<p>I need the following sed one-liner periodically, and I thought it was useful enough to share here.  Other versions I&#8217;ve seen chopped off everything after the first dot, which doesn&#8217;t work for files with a dot in the basename.  This one does:</p>
<pre class="brush: bash; gutter: false">sed s/\.[^\.]*$//</pre>
<p>Sample Usage:</p>
<pre class="brush: bash; gutter: false">bsterne@zodiac:~$ ls /video | sed s/\.[^\.]*$// | head -n5
2001: A Space Odyssey
40 Year Old Virgin, The
9
A Bronx Tale
A Clockwork Orange</pre>
<p><script type="text/javascript" src="/posts/syntax/src/shCore.js"></script><br />
<script type="text/javascript" src="/posts/syntax/scripts/shBrushBash.js"></script></p>
<link rel="stylesheet" type="text/css" href="/posts/syntax/styles/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/posts/syntax/styles/shThemeDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all()</script></p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/05/removing-file-extensions-with-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wildflower Triathlon 2010</title>
		<link>http://brandon.sternefamily.net/posts/2010/05/wildflower-triathlon-2010/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/05/wildflower-triathlon-2010/#comments</comments>
		<pubDate>Tue, 04 May 2010 15:32:35 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Sports]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=227</guid>
		<description><![CDATA[I completed my first triathlon this weekend! I raced in Sunday&#8217;s Wildflower Olympic Distance Triathlon and placed 85th out of 224 in my age group. I was very happy with my performance and met or exceeded all my goals for the race. It was an awesome experience all the way around. The environment is fun [...]]]></description>
			<content:encoded><![CDATA[<p>I completed my first triathlon this weekend!  I raced in Sunday&#8217;s <a href="http://www.tricalifornia.com/index.cfm/WildFlower2010-course_descriptions_olympic_international.htm">Wildflower Olympic Distance Triathlon</a> and placed <a href="http://raceresults.eternaltiming.com/index.cfm/20100501_AVIA_Wildflower_Triathlons_and_Festival.htm?Fuseaction=Results&#038;Class=Olympic+Distance~M30-34">85<sup>th</sup> out of 224</a> in my age group.  I was very happy with my performance and met or exceeded all my goals for the race.</p>
<p>It was an awesome experience all the way around.  The environment is fun and festive with live music and food and race equipment vendors, all the athletes and volunteers are super supportive of each other, and the rush of finally getting to the finish line was indescribable.  I&#8217;m hooked, for sure.</p>
<p align="center"><a href="http://sternefamily.net/photos/main.php?g2_itemId=8965"><img alt="" src="http://sternefamily.net/photos/main.php?g2_view=core.DownloadItem&#038;g2_itemId=8966&#038;g2_serialNumber=2" title="Wildflower" class="aligncenter" style="width:40%;border:0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/05/wildflower-triathlon-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress and Content Security Policy</title>
		<link>http://brandon.sternefamily.net/posts/2010/04/wordpress-and-content-security-policy/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/04/wordpress-and-content-security-policy/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 03:54:15 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Security]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=198</guid>
		<description><![CDATA[Lately, I have been implementing the server logic for <a href="http://people.mozilla.org/~bsterne/content-security-policy/">Content Security Policy</a> in <a href="http://wordpress.org/">WordPress</a>.  Today, I posted my first <a href="http://core.trac.wordpress.org/attachment/ticket/10237/csp-wip-v1.patch">patch to WordPress</a>, still a work in progress, which adds an administration panel for configuring CSP.  One of the features I'm rather happy with is "Suggest Policy", which analyzes the content in the user's blog and recommends a policy based on the content types and sources it finds.</p>]]></description>
			<content:encoded><![CDATA[<p>Lately, I have been implementing the server logic for <a href="http://people.mozilla.org/~bsterne/content-security-policy/">Content Security Policy</a> in <a href="http://wordpress.org/">WordPress</a>.  I was very pleased to see that the WordPress community opened up the <a href="http://core.trac.wordpress.org/ticket/10237">tracking bug</a> for this feature around the time we first <a href="http://blog.mozilla.com/security/2009/06/19/shutting-down-xss-with-content-security-policy/">blogged</a> about it.  One of the neat things about working for Mozilla is that contributions to other important <a href="http://www.catb.org/~esr/open-source.html">open source projects</a> are treated as valid, valuable uses of our time.</p>
<p>Today, I posted my first <a href="http://core.trac.wordpress.org/attachment/ticket/10237/csp-wip-v1.patch" style="font-weight:600">patch to WordPress</a>, still a work in progress, which adds an administration panel (see below) for configuring CSP.  One of the features I&#8217;m rather happy with is &#8220;Suggest Policy&#8221;, which analyzes the content in the user&#8217;s blog and recommends a policy based on the content types and sources it finds.</p>
<p class="center"><a href="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/04/Picture-3.png"><img src="http://brandon.sternefamily.net/posts/wp-content/uploads/2010/04/Picture-3-300x206.png" alt="" title="CSP in WordPress" style="width:50%" class="aligncenter size-medium wp-image-217" /></a></p>
<p>Next I&#8217;ll be working on moving the remaining <a href="https://wiki.mozilla.org/Security/CSP/Spec#No_inline_scripts_will_execute">inline script</a> into external script files.  Stay tuned for further updates!</p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/04/wordpress-and-content-security-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growing Veggies at Home</title>
		<link>http://brandon.sternefamily.net/posts/2010/04/growing-veggies-at-home/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/04/growing-veggies-at-home/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 03:59:09 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Making]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=165</guid>
		<description><![CDATA[Last year, I built some <a href="http://en.wikipedia.org/wiki/Sub-Irrigated_Planter">sub-irrigated planters (SIP)</a> using the excellent <a href="http://greenroofgrowers.blogspot.com/2008/07/how-make-two-bucket-sub-irrigated.html">2-bucket design</a> from Green Roof Growers.  The concept is based on the commercial product, <a href="http://www.earthbox.com/index.php">Earthbox</a>, but costs far less to build at home.]]></description>
			<content:encoded><![CDATA[<div class="middleBlock">
<p><b>Update: 2010-06-20</b></p>
<p>The planters are doing great so far.  I love how the squash and zucchini put up the giant sun catching leaves and send the vines bubbling over and onto the ground.</p>
<p class="center"><a href="http://sternefamily.net/photos/main.php?g2_itemId=8980"><img src="http://sternefamily.net/photos/main.php?g2_view=core.DownloadItem&#038;g2_itemId=8980&#038;g2_serialNumber=1" alt="In progress..." style="width:50%;border:0"/></a></p>
</div>
<p>Last year, I built some <a href="http://en.wikipedia.org/wiki/Sub-Irrigated_Planter">sub-irrigated planters (SIP)</a> using the excellent <a href="http://greenroofgrowers.blogspot.com/2008/07/how-make-two-bucket-sub-irrigated.html">2-bucket design</a> from Green Roof Growers.  The concept is based on the commercial product, <a href="http://www.earthbox.com/index.php">Earthbox</a>, but costs far less to build at home.  The basic idea is that the plants wick up just the right amount of water from the reservoir underneath.  The design includes drainage holes at the top of the reservoir that prevent over watering, so it&#8217;s really easy to keep keep plants happy using this system.  They really seem to thrive when they can drop their roots down through the screen and into the water below.</p>
<p class="center"><a href="http://sternefamily.net/photos/main.php?g2_itemId=6557"><img src="http://sternefamily.net/photos/main.php?g2_view=core.DownloadItem&#038;g2_itemId=6559&#038;g2_serialNumber=2" alt="Completed planter" style="width:50%;border:0"/></a></p>
<p>Last year we had cherry tomatoes and some <a href="http://sternefamily.net/photos/main.php?g2_itemId=6554">mixed greens</a>, which were delicious but seemed to really attract a lot of aphids.  This year I added a third SIP and we&#8217;ve planted heirloom tomatoes and cucumbers:</p>
<p class="center"><a href="http://sternefamily.net/photos/main.php?g2_itemId=8864"><img src="http://sternefamily.net/photos/main.php?g2_view=core.DownloadItem&#038;g2_itemId=8865&#038;g2_serialNumber=2" alt="Tomatoes and cucumbers" style="width:50%;border:0"/></a></p>
<p>&#8230;as well as some snap peas that are doing really well so far:</p>
<p class="center"><a href="http://sternefamily.net/photos/main.php?g2_itemId=8868"><img src="http://sternefamily.net/photos/main.php?g2_view=core.DownloadItem&#038;g2_itemId=8869&#038;g2_serialNumber=2" alt="Snap peas" style="width:50%;border:0"/></a></p>
<p>I also built the wooden boxes the planters are sitting in to give them a nicer aesthetic and to protect them from the sun.  This project has been really fun and is part of a larger effort on my part to <a href="/posts/category/making/">make things</a> myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/04/growing-veggies-at-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A-Star (A*) Algorithm in Python &#8211; Update</title>
		<link>http://brandon.sternefamily.net/posts/2010/01/a-star-a-algorithm-in-python-update/</link>
		<comments>http://brandon.sternefamily.net/posts/2010/01/a-star-a-algorithm-in-python-update/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 17:04:38 +0000</pubDate>
		<dc:creator>bsterne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://brandon.sternefamily.net/posts/?p=160</guid>
		<description><![CDATA[Since there have been many requests over the years for the source code referenced in my A-Star (A*) Algorithm post, I decided to share it. I did a bit of refactoring too, as I have learned some neat things about Python in the years since I wrote that post, like list comprehensions. A cautionary note [...]]]></description>
			<content:encoded><![CDATA[<p>Since there have been many requests over the years for the source code referenced in my <a href="/posts/2005/02/a-star-algorithm-in-python/">A-Star (A*) Algorithm</a> post, I decided to share it.  I did a bit of refactoring too, as I have learned some <a href="/posts/2006/11/8-reasons-why-python-rocks/">neat things about Python</a> in the years since I wrote that post, like <a href="http://docs.python.org/tutorial/datastructures.html#list-comprehensions">list comprehensions</a>.</p>
<p>A cautionary note to undergrad CS students (who I can only assume are the requestors): CS professors are pretty good at catching cheaters, so learn from others&#8217; code, but write your own.</p>
<div class="middleBlock center">
<p>Source: <a href="/files/astar.txt">astar.py</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://brandon.sternefamily.net/posts/2010/01/a-star-a-algorithm-in-python-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
