<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Kehn</title>
    <subtitle>Programming &amp; Interests</subtitle>
    <link href="/atom.xml" rel="self" />
    <link href="/" />
    <id>http://joshuakehn.com/</id>
    <updated>2012-04-03T17:51:31.007-04:00</updated>
    <author>
        <name>Joshua Kehn</name>
        <email>josh.kehn@gmail.com</email>
    </author><entry><title>OWS on Brooklyn Bridge</title><link href="http://joshuakehn.com/2012/4/3/OWS-on-Brooklyn-Bridge.html" /><id>/2012/4/3/OWS-on-Brooklyn-Bridge.html</id><updated>2012-04-03T16:18:11.007-04:00</updated><content type="html"><![CDATA[<p>A selection of photos from the <a href="http://occupywallst.org/article/april-1-march-commemorate-brooklyn-bridge-action/">April 1<sup>st</sup> March</a>.</p>

<p><a href="http://www.flickr.com/photos/joshkehn/6895971488/" title="Masked"><img src="http://farm8.staticflickr.com/7239/6895971488_b60edfdf38_z.jpg" alt="Masked protester" id="flickr_img:masked" title="Masked" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/6895972846/" title="Question Everything"><img src="http://farm8.staticflickr.com/7182/6895972846_4d42c18b68_z.jpg" alt="Sign saying Question Everything" id="flickr_img:question" title="Question Everything" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/6895977644/" title="Venterans Marching"><img src="http://farm8.staticflickr.com/7236/6895977644_4619c7cb91_z.jpg" alt="Protesters marching" id="flickr_img:marching" title="Veterans Marching" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/6896002602/" title="Police Scooters"><img src="http://farm8.staticflickr.com/7212/6896002602_826b6e5b98_z.jpg" alt="Line of police scooters." id="flickr_img:police" title="Police Scooters" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/6896006016/" title="Moving Forward"><img src="http://farm8.staticflickr.com/7197/6896006016_afff54b967_z.jpg" alt="Moving forward." id="flickr_img:moving" title="Moving Forward" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/7042106643/" title="Angry Pacifist"><img src="http://farm8.staticflickr.com/7182/7042106643_c2e618c862_z.jpg" alt="Angry Pacifist." id="flickr_img:pacifist" title="Angry Pacifist" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/7042110379/" title="Press"><img src="http://farm8.staticflickr.com/7048/7042110379_0799befb7b_z.jpg" alt="Press" id="flickr_img:press" title="Press" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/7042116713/" title="Granny Peace Brigade"><img src="http://farm8.staticflickr.com/7191/7042116713_6276ee2997_z.jpg" alt="Granny Peace Brigade" id="flickr_img:granny" title="Granny Peace Brigade" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/7042117651/" title="Unmasked"><img src="http://farm8.staticflickr.com/7196/7042117651_055d894f2e_z.jpg" alt="Unmasked Protester" id="flickr_img:unmasked" title="Unmasked" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/6896035588/" title="Peace Jester"><img src="http://farm8.staticflickr.com/7212/6896035588_d5d9c64800_z.jpg" alt="Peace Jester" id="flickr_img:jester" title="Peace Jester" /></a><br/>
<a href="http://www.flickr.com/photos/joshkehn/7042138321/" title="Fist Pump"><img src="http://farm8.staticflickr.com/7221/7042138321_e3cf78a35f_z.jpg" alt="Fist Pump" id="flickr_img:fist" title="Fist Pump" /></a> </p>

<p><span style="float: right; margin-right: 20px; padding-left: 10px; padding-bottom: 10px;"><a href="http://www.flickr.com/photos/joshkehn/6896029548/" title="99%"><img src="http://farm8.staticflickr.com/7114/6896029548_9646595092_z.jpg" alt="99%" id="flickr_img:99" title="99%" /></a></span>
The rest of the pictures are in my <a href="http://www.flickr.com/photos/joshkehn/sets/72157629330202148/">Occupy Wall St. Flickr Set</a>.</p>
<!-- Picture links -->
]]></content></entry><entry><title>Grails in Production</title><link href="http://joshuakehn.com/2012/2/9/Grails-in-Production.html" /><id>/2012/2/9/Grails-in-Production.html</id><updated>2012-02-09T23:45:00.007-05:00</updated><content type="html"><![CDATA[<p>There are a few <em>gotcha&#8217;s</em> when deploying a Grails war in a container like Tomcat.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">1</a> Most commonly are issues with <code>stacktrace.log</code>. Second most common are issues with file based db&#8217;s.</p>

<h3 id="settingstacktrace.log">Setting <code>stacktrace.log</code></h3>

<p>Open up <code>grails-app/conf/Config.groovy</code>. If you haven&#8217;t edited it at all there should be a commented out block called <code>appenders</code>. Uncomment that and set it to the following:</p>

<pre><code>appenders {
    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
    file name: 'stacktrace', file: &quot;/var/log/tomcat6/stacktrace.log&quot;
}
</code></pre>

<p>By default Grails tries to create a <code>stacktrace.log</code> file in the directory it is executed in, which is won&#8217;t have permission to do unless you&#8217;ve overridden the permissions (not recommended). Here an appender named <code>stacktrace</code> is defined and mapped to a file in a directory that it will be able to write to.</p>

<h3 id="settinguph2">Setting up H2</h3>

<p>Grails now uses <a href="http://grails.org/plugin/h2">H2</a> for it&#8217;s in-memory and default database. If you&#8217;ve kept H2 around in production as a file based db then you need to put that in another location it can actually access.</p>

<p>Open up <code>grails-app/conf/DataSource.groovy</code>. In your <code>environments.production.dataSource</code> block set the url property like so:</p>

<pre><code>url = &quot;jdbc:h2:file:/usr/local/grailsdb;MVCC=TRUE&quot;
</code></pre>

<p>You can change the path or name to whatever you like, point is it isn&#8217;t left as the default which means it will try to create it in a directory it won&#8217;t have permission to use.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>I use Tomcat, your usage will vary. <a href="#fnref:1" title="return to article" class="reversefootnote">&#160;&#8617;</a></p>
</li>

</ol>
</div>

]]></content></entry><entry><title>Yeti</title><link href="http://joshuakehn.com/2012/2/6/Yeti.html" /><id>/2012/2/6/Yeti.html</id><updated>2012-02-06T17:07:28.007-05:00</updated><content type="html"><![CDATA[<p><a href="https://twitter.com/#!/joshkehn/status/165962435004604416">I recently picked up</a> a <a href="http://www.bluemic.com/yeti/">Yeti</a>. I&#8217;m planning on doing some voiceover / screen cast type stuff and maybe a podcast or two. After adding a <a href="https://twitter.com/#!/joshkehn/status/166563390532235264">shock mount</a> I decided the most convenient thing to record would be a quick typing session with my <a href="http://joshuakehn.com/2011/11/8/New-Keyboard.html">awesome tactile keyboard</a>, which everyone <a href="https://twitter.com/#!/theSlipp/status/133976240028778497/">loves so much</a>.</p>

<p><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F35745661&amp;auto_play=false&amp;show_artwork=false&amp;color=545ce7"></iframe></p>

<figure>
<img src="http://i.imgur.com/sR4AN.jpg" alt="Yeti in a shock mount" id="flickryeti" />
<figcaption>Yeti in a shock mount</figcaption></figure>

]]></content></entry><entry><title>HTTPS Now Available</title><link href="http://joshuakehn.com/2012/2/1/HTTPS-Now-Available.html" /><id>/2012/2/1/HTTPS-Now-Available.html</id><updated>2012-02-01T20:25:16.007-05:00</updated><content type="html"><![CDATA[<p>I&#8217;ve enabled HTTPS on my server, and while it&#8217;s not &#8220;real&#8221; (self-signed) certificate, my <a href="https://www.gandi.net/">domain registrar</a> is issuing a correct one soon. I&#8217;ve also updated the URL structures on my generator to point without specifying the protocol or domain. This means that when you visit <a href="https://joshuakehn.com/">https://joshuakehn.com</a> all links pointing to other posts, the home page, etc, will point to the secured version. I can&#8217;t vouch for any old self referring links as those are linked directly in the file, but I&#8217;ll update those where necessary when I find them.</p>

<h3 id="whyhttps">Why HTTPS?</h3>

<p>I believe in offering more options to users. HTTPS uses <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security">Transport Layer Security</a> to provide end-to-end encryption for all content served from my server off of the domain. Anyone who wishes to practice web anonymity can do so. How much use this will be is questionable, as I don&#8217;t have any personalized content, no cookies, no login, nothing persisted on my server unique to users. When (and if) I role out anything that requires a login HTTPS will always be an option. Privacy is not a liberty I believe should be denied, especially when it&#8217;s so damn easy to set up a security certificate and add that to Apache.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">1</a></p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>There will be an article about this later. <a href="#fnref:1" title="return to article" class="reversefootnote">&#160;&#8617;</a></p>
</li>

</ol>
</div>

]]></content></entry><entry><title>Changing the Paradigm</title><link href="http://joshuakehn.com/2012/1/27/Changing-the-Paradigm.html" /><id>/2012/1/27/Changing-the-Paradigm.html</id><updated>2012-01-27T16:27:14.007-05:00</updated><content type="html"><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/hkPvSCq5ZXk" frameborder="0" allowfullscreen></iframe></p>

<blockquote>
<p>Spot-on.Brilliant observations by <a href="http://sirkenrobinson.com/skr/">Sir Ken Robinson</a>. You might have seen this before.</p>
</blockquote>

<p><cite>Source: <a href="http://52tiger.net/we-penalize-kids-from-getting-distracted-from-boring-stuff-at-school/">52tiger</a></cite></p>

<p>I couldn&#8217;t agree more.</p>
]]></content></entry><entry><title>Fry &amp; Laurie</title><link href="http://joshuakehn.com/2012/1/24/Fry-Laurie.html" /><id>/2012/1/24/Fry-Laurie.html</id><updated>2012-01-24T16:52:03.007-05:00</updated><content type="html"><![CDATA[<blockquote class="bigquote">
&#8220;Forget the past. There&#8217;s nothing there. Not even memories. Just a road you never traveled unwinding backwards to a place you never came from.&#8221;
</blockquote>

<p><cite>&mdash;Stephen Fry on <a href="http://quietube2.com/v.php/http://www.youtube.com/watch?v=GVbBU4rlNnE">A Bit of Fry and Laurie</a></cite></p>
]]></content></entry><entry><title>Why No Blackout?</title><link href="http://joshuakehn.com/2012/1/20/Why-No-Blackout.html" /><id>/2012/1/20/Why-No-Blackout.html</id><updated>2012-01-20T15:49:12.007-05:00</updated><content type="html"><![CDATA[<p>On Wednesday dozens of site owners <a href="http://latimesblogs.latimes.com/technology/2012/01/sopa-blackout-who-is-joining-the-protest.html">blacked out their websites</a> in protest of the <a href="http://en.wikipedia.org/wiki/SOPA">Stop Online Piracy Act</a> (SOPA) and <a href="http://en.wikipedia.org/wiki/PROTECT_IP_Act">Protect IP Act</a> (PIPA). Entire ecosystems like <a href="http://wordpress.com/">Wordpress</a>, <a href="https://www.tumblr.com/">Tumblr</a>, and <a href="http://www.flickr.com/">Flickr</a> offered blackout options for individual&#8217;s content allowing thousands more to join the protests against the pending legislation. Legislation that could fundamentally change how we use the internet. Some of the really scary stuff like root level DNS blocking is already removed, but plenty still remains to be scared of.</p>

<p>Sounds grand, why not join in?</p>

<p>First, I&#8217;m not a dedicated resource like Wikipedia or a well known ecosystem like Reddit or Tumblr. The impact would have been small and hindered more than helped raise awareness for the issues at hand. The small amount of traffic I do get is highly focused towards technology-aware people. They already know about SOPA and don&#8217;t need additional encouragement from me to contact their representatives and raise an issue.</p>

<p>Second, I believe that something needs to change the net. Be it SOPA, PIPA, or some new unknown that comes out of a government. I was secretly hoping that the <a href="http://en.wikipedia.org/wiki/Golden_Shield_Project">Great Firewall of China</a> would bring about some redundancy and distributed nature to the web but it hasn&#8217;t. The same <a href="http://en.wikipedia.org/wiki/Root_name_server">root name server</a> system administered by the same ICANN committee structured according to the same <a href="http://tools.ietf.org/html/rfc1035">1987 RFC specification (1035)</a> is in place and well-oiled. The machine is still running vulnerably and no one <strong>gets it</strong>.</p>

<p>Lets look at a case study of two companies both built around the same idea of peer-to-peer file sharing. Napster used a centralized system to manage all the peers and connections between peers. BitTorrent used a distributed protocol that employed decentralized trackers to manage peers and allowed the peers to make connections between themselves. The tracker never sees one byte of content and the torrent information itself can be shared between trackers to gain more users.</p>

<p>The story of Napster&#8217;s rise and fall is well documented. It is responsible for spawning networks like Gnutella, eDonkey, and clients such as LimeWire<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">1</a>. These networks still exist, but their quality is dubious at best and a criminal honeypot at worst.</p>

<p>BitTorrent has gone on to prosper with advances like <a href="http://en.wikipedia.org/wiki/Distributed_hash_table">distributed hash tables</a> and <a href="http://en.wikipedia.org/wiki/BitTorrent_protocol_encryption">encryption</a>. [In]famous trackers like <a href="http://thepiratebay.se/">ThePirateBay.org</a> still live on in safe harbor countries having loose IP laws. The protocol itself has even found value outside of piracy as a method to deliver high-volume files easily using methods like <a href="http://en.wikipedia.org/wiki/BitTorrent_(protocol)#Web_seeding">HTTP Seeding</a> to augment the peer sharing aspect.</p>

<p>Taking charge of your own environment is not a crime. It&#8217;s like creating your own postal system. It will take some work to get a common language but the end result is a stable system that is virtually immune to attacks on the system as a whole because you have many flexible pieces working together. There are no weak links.</p>

<p>The future is distributed. It is not built on global awareness of all systems at all times. It accounts for failures and downtime. It allows people to remix and distribute not according to who came first but <em>who is the best</em>. This system is not easily susceptible to external fuckary. It&#8217;s a network that peers with reluctance rather than openly to everyone.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>The LimeWire client has been <a href="http://joshuakehn.com/2010/10/27/LimeWire-Closes-Shop.html">shut down since October 2010</a>. <a href="#fnref:1" title="return to article" class="reversefootnote">&#160;&#8617;</a></p>
</li>

</ol>
</div>

]]></content></entry><entry><title>IFTTT - Internet Goodness</title><link href="http://joshuakehn.com/2012/1/9/IFTTT-Internet-Goodness.html" /><id>/2012/1/9/IFTTT-Internet-Goodness.html</id><updated>2012-01-09T20:52:05.007-05:00</updated><content type="html"><![CDATA[<p>I&#8217;ve known about <a href="http://ifttt.com/">ifttt</a> for a few months, but never really thought it could be useful. Most of my daily work is already automated through various <a href="https://github.com/joshkehn/--bin">bin scripts</a> and some server side cron jobs. What I didn&#8217;t immediately see is how incredibly <em>polished</em> ifttt is.</p>

<p>The service starts off with a simple concept. If <strong>this</strong> then <strong>that</strong>. It&#8217;s simplicity is rivaled only by something like <a href="http://www.iawriter.com/">iA Writer</a>. There are no other configurable options outside what is offered in <strong>this</strong> and <strong>that</strong>. </p>

<h3 id="channels">Channels</h3>

<p>The <strong>this</strong> and <strong>that</strong> concepts are implemented by way of <a href="http://ifttt.com/channels">channels</a>. Here is what I&#8217;ve connected to so far:</p>

<ul>
<li>Date &amp; Time</li>
<li>Email</li>
<li>Feed</li>
<li>Flickr</li>
<li>Foursquare</li>
<li>Instagram</li>
<li>Phone Call</li>
<li>SMS</li>
<li>Tumblr</li>
<li>Twitter</li>
<li>Weather</li>
</ul>

<p>Every channel offers unique <strong>triggers</strong> and <strong>actions</strong>. <strong>Triggers</strong> are <strong>this</strong>. They are monitored when you create a <strong>task</strong>. <strong>Actions</strong> are <strong>that</strong>. They are executed with a specific trigger. You can create multiple tasks to emulate multiple actions performed on a trigger.</p>

<h3 id="tasks">Tasks</h3>

<figure>
<img src="http://i.imgur.com/CZC6u.png" alt="IFTTT Task List" id="tasklist" />
<figcaption>IFTTT Task List</figcaption></figure>



<p>Tasks simply combine a trigger and an action to perform when that trigger happens. You can enable or disable tasks with a simple click. All tasks are created through the same <em>if <strong>this</strong> then <strong>that</strong> fashion</em>. First you select the channel you would like to pick a trigger from. Then you define a channel you would like to pick an action from. The simple user flow is great. </p>

<h3 id="recipes">Recipes</h3>

<p>Recipes are tasks that can be setup and shared with friends or found publicly. The service simply substitutes your channel information in and starts you off with the recipe for a task. All of this is customizable as well. I started with the <a href="http://ifttt.com/recipes/12708">Archive my tweets to Google Calendar</a> recipe and switched the Google Calendar channel to email so I can back them up all my tweets through email.</p>

<h3 id="featurewishlist">Feature Wishlist</h3>

<ol>
<li><p>Allow multiple accounts per channel. Currently you can only have a single account on any channel at any time. This means that to connect two Twitter accounts I need to create another ifttt account. Not a huge hassle, but switching is annoying especially if you want to make use of separate accounts on other services like Gmail.</p></li>
<li><p>Expand <strong>this</strong> to include multiple channel filters. Something like if <strong>8:00AM EST</strong> and <strong>Rain predicted</strong> then <strong>SMS alert</strong>. It&#8217;s often ambiguous about <strong>when</strong> the action will trigger and more importantly <strong>how often</strong>. Say I create a trigger to tweet something when the forecast for tomorrow dips below freezing<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">1</a>. What if the forecast fluctuates during the day? Will 30F to 35F to 28F produce two tweets at 30F and 28F? Allow things like this to be time constrained would be great, but chaining the triggers together would be the ideal solution.</p></li>
<li><p>The corollary of #2 is to expand <strong>that</strong> to include multiple actions. This would create more of a rule style setup. If <strong>[conditions]</strong> then <strong>[actions]</strong>. </p></li>
<li><p>Add more custom channels. Allow developers to make HTTP calls or call a trigger remotely. I would love to link my server&#8217;s to ifttt so I get custom SMS or email alerts. </p></li>
</ol>

<p>I&#8217;ve only been using ifttt for a few hours and already I&#8217;ve created five tasks. The service is simple. It&#8217;s easy for anyone to go in and create their own ifttt&#8217;s. I can&#8217;t wait to see what they do next.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>This task is already in place. <a href="#fnref:1" title="return to article" class="reversefootnote">&#160;&#8617;</a></p>
</li>

</ol>
</div>

]]></content></entry><entry><title>New Year - 2012</title><link href="http://joshuakehn.com/2012/1/1/New-Year-2012.html" /><id>/2012/1/1/New-Year-2012.html</id><updated>2012-01-01T19:36:50.007-05:00</updated><content type="html"><![CDATA[<p>2011 was quite the year. The <a href="http://joshuakehn.com/2011/2/4/iPhone-4-on-Verizon.html" title="iPhone 4 on Verizon">iPhone came to Verizon</a> early in the year, and later included Sprint with the <a href="http://www.apple.com/pr/library/2011/10/04Apple-Launches-iPhone-4S-iOS-5-iCloud.html" title="Apple PR for iPhone 4S, iOS 5, and iCloud">release of the iPhone 4S</a>. <a href="http://joshuakehn.com/2011/3/1/collabraCode.html" title="collabraCode();"><code>collabraCode();</code> made it&#8217;s debut</a> and had a successful pilot class. I started a <a href="http://joshuakehn.com/2011/5/10/New-Job-ngmoco-and-Freeverse.html" title="ngmoco:) and Freeverse">new job at Freeverse</a> and <a href="http://joshuakehn.com/2011/7/21/Static-File-Blogging.html" title="Static File Blogging">restructured my blog again</a>. Steve Jobs <a href="http://joshuakehn.com/2011/8/24/Steve-Jobs-Resigns.html">resigned</a> and then <a href="http://www.apple.com/stevejobs/" title="Remembering Steve Jobs">passed away</a> two short months later. A <a href="http://joshuakehn.com/2011/12/13/TextMate-2-Alpha.html" title="TextMate 2 Alpha Released">famous piece of vaporware</a> was released.</p>

<p>That&#8217;s a busy year.</p>
]]></content></entry><entry><title>Dux Released</title><link href="http://joshuakehn.com/2011/12/19/Dux-Released.html" /><id>/2011/12/19/Dux-Released.html</id><updated>2011-12-19T19:05:06.007-05:00</updated><content type="html"><![CDATA[<p>I decided that <a href="https://github.com/joshkehn/dux">dux</a> was good enough to publish. Go check it out.</p>

<h3 id="basicusage">Basic Usage</h3>

<p>At it&#8217;s core dux is a flexible container that accepts drop in functionality that can be executed from a common command line interface. Adding new commands or extending others is straight forward and simple. This is a very different mindset from build oriented tools like <a href="https://github.com/jcoglan/jake">jake</a> or <a href="http://ant.apache.org/">ant</a>. These tools focus on files, directories, and processing. dux is a simple command line utility that wraps logging and option parsing so it can be extended by other commands. </p>

<p>Let&#8217;s start off with a very simple example of how to use dux. </p>

<pre><code>var dux = require('dux');

dux.commands.add('say', function () {
    dux.logger.info('Saying ' + this.args.join(' '));
});

dux.start();
</code></pre>

<p>Executing this command is as simple as throwing it at as an argument.</p>

<pre><code>$ node example.js say Hello World!
info:     Welcome to Dux
info:     It works if it ends with Dux ok
info:     Executing command path say Hello World!
info:     Saying Hello World!
info:     Dux ok
</code></pre>

<p>You can add a <a href="http://en.wikipedia.org/wiki/Shebang_(Unix)">shebang</a> to the top of the file and give it executable permissions to clean up the execution.</p>

<pre><code>$ ./example.js say Hello World!
info:     Welcome to Dux
info:     It works if it ends with Dux ok
info:     Executing command path say Hello World!
info:     Saying Hello World!
info:     Dux ok
</code></pre>

<h3 id="influence">Influence</h3>

<p>I took a lot of influence from <a href="https://github.com/nodejitsu/jitsu">jitsu</a> and <a href="http://npmjs.org/">npm</a>. The stylized cli logging and exit conditions are especially useful when writing an application. This repackaging allows anyone to build their own npm or jitsu style tool, without the overhead of logging and command usage.</p>
]]></content></entry></feed>
