<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>The Foos and The Bars</title><link href="/blog/" rel="alternate"></link><link href="/blog//feeds/all-en.atom.xml" rel="self"></link><id>/blog/</id><updated>2011-11-26T05:20:00-06:00</updated><entry><title>Static Sites on Heroku Cedar</title><link href="/blog//2011/11/26/static-sites-on-heroku-cedar.html" rel="alternate"></link><updated>2011-11-26T05:20:00-06:00</updated><author><name>A Developer</name></author><id>/blog//2011/11/26/static-sites-on-heroku-cedar.html</id><summary type="html">&lt;p&gt;Heroku's excellent &lt;a class="reference external" href="http://devcenter.heroku.com/articles/cedar"&gt;Cedar Stack&lt;/a&gt;
has first-class support for Python, Ruby, Node.js, Java, Clojure, and Scala applications.
Unfortunately, there's no obvious way to serve static sites without first
fronting them with a Rack or WSGI application.&lt;/p&gt;
&lt;p&gt;The Cedar stack has unofficial support for
&lt;a class="reference external" href="https://github.com/heroku/heroku-buildpack-python"&gt;Custom Build Packs&lt;/a&gt;,
which allow you to compile your own language runtime on top of Cedar.
My plan was to build an custom nginx build pack for Cedar, but that turned out
to be completely unnecessary.&lt;/p&gt;
&lt;p&gt;Did you you know that Cedar has full (unofficial)
support for PHP applications, fronted with Apache? When you push up a repository
with an &lt;tt class="docutils literal"&gt;index.php&lt;/tt&gt; file at the root, Apache and PHP are bundled into
your application at runtime.&lt;/p&gt;
&lt;div class="section" id="elegant-static-sites-on-cedar"&gt;
&lt;h2&gt;Elegant Static Sites on Cedar&lt;/h2&gt;
&lt;p&gt;First, lets turn your site into a PHP &amp;quot;application&amp;quot;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ touch index.php
&lt;/pre&gt;
&lt;p&gt;Next, we can fully disable Apache's PHP engine:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ echo 'php_flag engine off' &amp;gt; .htaccess
&lt;/pre&gt;
&lt;p&gt;When you push this up, you'll have a bare Apache instance serving up the
contents of your site to the world. Best yet, you can do all of the
&lt;a class="reference external" href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/"&gt;stupid .htaccess tricks&lt;/a&gt;
that you could on on any traditional shared hosting platform.&lt;/p&gt;
&lt;p&gt;It works great! This very website is served this way.&lt;/p&gt;
&lt;/div&gt;
</summary></entry><entry><title>I Use This</title><link href="/blog//2011/07/30/i-use-this.html" rel="alternate"></link><updated>2011-07-30T15:10:00-05:00</updated><author><name>A Developer</name></author><id>/blog//2011/07/30/i-use-this.html</id><summary type="html">&lt;p&gt;A while back, I published a post about my setup, inspired by the awesome
articles on the &lt;a class="reference external" href="http://usesthis.com/"&gt;UsesThis&lt;/a&gt; site.&lt;/p&gt;
&lt;p&gt;As times change, so does my toolset. So, here's a list of my latest
favorite things. I &lt;em&gt;love&lt;/em&gt; them, and think you should use them too.&lt;/p&gt;
&lt;div class="section" id="ep-io"&gt;
&lt;h2&gt;ep.io&lt;/h2&gt;
&lt;p&gt;Perfectly Pythonic WSGI Hosting.&lt;/p&gt;
&lt;p&gt;There are a number of new Heroku-like Python hosts out there, but most
of them leave a bad taste in my mouth. This is mostly because they only
support Django, and not generic WSGI (e.g. Flask apps).&lt;/p&gt;
&lt;p&gt;Ep.io supports any WSGI application. It charges based on usage and
offers a generous amount of free usage &lt;em&gt;per application&lt;/em&gt;. Redis support.
Cron jobs. Optional git/mercurial integration. The architecture and
configurations are &lt;em&gt;very&lt;/em&gt; elegant. I love it.&lt;/p&gt;
&lt;p&gt;I host a most of my open source applications, including this very
website, on ep.io. I couldn't be happier.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://ep.io"&gt;ep.io&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="gaug-es"&gt;
&lt;h2&gt;gaug.es&lt;/h2&gt;
&lt;p&gt;Google Analytics is an extremely power analytics platform that can be
used to drive important business decisions and analyze deep trends.&lt;/p&gt;
&lt;p&gt;I don't need any of that.&lt;/p&gt;
&lt;p&gt;I need realtime traffic information, visitor browsers and devices, and a
simple list of referral URLs.&lt;/p&gt;
&lt;p&gt;Check out &lt;a class="reference external" href="http://gaug.es"&gt;Gauges&lt;/a&gt;. Realtime, simple, and elegant
analytics. No domain limits. It's provided by a group of great guys that
are passionate about making the service as awesome as possible. It
really shows.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://gaug.es"&gt;gaug.es&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="dnsimple"&gt;
&lt;h2&gt;DNSimple&lt;/h2&gt;
&lt;p&gt;Stop using GoDaddy. Now. They have extremely misleading billing
practices, terrible ads, and — worst of all — one of the worst DNS
management interfaces on earth.&lt;/p&gt;
&lt;p&gt;DNSimple has the simplest and most elegant DNS management system I've
ever used. Everything just works —&amp;nbsp;instantly. One-click record templates
for GitHub Pages, Google Apps, etc.&lt;/p&gt;
&lt;p&gt;There's a small subscription fee, tiered by the number of hosted
domains. If you find yourself thinking, &amp;quot;Why would I pay for DNS
hosting?&amp;quot;: You get what you pay for.&lt;/p&gt;
&lt;p&gt;It doesn't matter where you register your domains, but I register all of
mine through DNSimple. The registration cost is a little high compared
to a few providers, but — again —&amp;nbsp;you really get what you pay for.&lt;/p&gt;
&lt;p&gt;I got a signed postcard from them in the mail last year, wishing me a
Happy New Year. These guys care.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="https://dnsimple.com/r/125ca47dda0551"&gt;DNSimple&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="sublime-text-2"&gt;
&lt;h2&gt;Sublime Text 2&lt;/h2&gt;
&lt;p&gt;It's time to face the facts: TextMate is dead. The author has been lying
to his loyal community for a long time now. It's time for us to move on.&lt;/p&gt;
&lt;p&gt;I looked for a worthy replacement for a long time. This wasn't an easy
task. I believe that I have tried literally every editor ever released
for every major operating system within the past 10 years. I'm really
picky about my development environment; It's part of who I am.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://www.sublimetext.com/2"&gt;Sublime Text 2&lt;/a&gt; is incredible.&lt;/p&gt;
&lt;p&gt;It offers TextMate theme and snippets support, extremely optimized
workflows, and a full internal Python API for writing plugins. Coupled
with &lt;a class="reference external" href="https://github.com/lunixbochs/sublimelint"&gt;SublimeLint&lt;/a&gt; and
&lt;a class="reference external" href="https://github.com/buymeasoda/soda-theme"&gt;Soda Theme Dark&lt;/a&gt;, it's
perfect.&lt;/p&gt;
&lt;p&gt;It's available for OS X, Linux, and Windows too.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://www.sublimetext.com/2"&gt;Sublime Text 2&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="readability"&gt;
&lt;h2&gt;Readability&lt;/h2&gt;
&lt;p&gt;Full disclosure: &lt;a class="reference external" href="http://kennethreitz.com/joining-arc90-readability.html"&gt;I work for
Readability&lt;/a&gt;.
However, that's completely irrelevant. Readability is easily one of my
favorite tools ever.&lt;/p&gt;
&lt;p&gt;If I land on an article that's either ugly or too long to read at the
moment, I hit ` in Chrome. I'm presented with a highly polished,
content-only version of the article with elegant typography.&lt;/p&gt;
&lt;p&gt;Top notch browser plugins. First-class Typography. Offline HTML5 apps
for every device I own. A daily digest of my articles, sent to my Kindle
automatically? Yes, please.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://readability.com"&gt;Readability&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="canon-35mm-f-1-4l"&gt;
&lt;h2&gt;Canon 35mm f/1.4L&lt;/h2&gt;
&lt;p&gt;One of the few things that gets me away from my machine is photography.
Check out &lt;a class="reference external" href="http://www.flickriver.com/photos/kennethreitz/"&gt;my Flickr
stream&lt;/a&gt;. It's very
much a hobby, but I quite enjoy it.&lt;/p&gt;
&lt;p&gt;My lens kit has gone through quite a few iterations. It took me a while,
but I'm finally got rid of my last zoom lens, and have moved on to all
primes. Zooms seem to suck creativity out of me. Constraints are good.&lt;/p&gt;
&lt;p&gt;My new favorite lens is the &lt;a class="reference external" href="http://www.amazon.com/Canon-35mm-1-4L-Angle-Cameras/dp/B00009R6WY"&gt;Canon EF 35mm
f/1.4L&lt;/a&gt;.
I'm blown away by this thing. It's exactly what I've been looking for. I
can't believe it hasn't been updated since 1992.&lt;/p&gt;
&lt;p&gt;I've noticed a bit of a fanastic subculture behind this lens since I got
it. If you ever take a look at the &lt;a class="reference external" href="http://www.flickriver.com/photos/whitehouse/popular-interesting/"&gt;White House's Flickr
Stream&lt;/a&gt;,
you'll see the excellent work of Pete Souza. He uses the 35L in almost
every indoor photo. Incredible.&lt;/p&gt;
&lt;p&gt;Before, I typically shot with my moderately telephoto &lt;a class="reference external" href="http://www.amazon.com/Canon-85mm-f1-2L-Lens-Cameras/dp/B000EW9Y4M"&gt;85mm
f/1.2L&lt;/a&gt;
(my photon vaccuum). I still use it on certain occasions, but the 35L is
really bringing my photography to a new level.&lt;/p&gt;
&lt;p&gt;The
&lt;a class="reference external" href="http://www.amazon.com/gp/product/B00009R6WY/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=bookforkind-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399373&amp;amp;creativeASIN=B00009R6WY"&gt;35L&lt;/a&gt;
&lt;em&gt;&amp;amp;&lt;/em&gt;
&lt;a class="reference external" href="http://www.amazon.com/gp/product/B000EW9Y4M/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=bookforkind-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399369&amp;amp;creativeASIN=B000EW9Y4M"&gt;85L&lt;/a&gt;
are an unstoppable duo.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="webfaction"&gt;
&lt;h2&gt;WebFaction&lt;/h2&gt;
&lt;p&gt;I've never been a fan of shared hosting at all. These guys proved me
wrong.&lt;/p&gt;
&lt;p&gt;They really know their stuff. Python is a true first-class citizen on
their boxes: 2.4, 2.5, 2.6, 2.7, 3.1, 3.2 are all available, with
most of the popular supporting libraries (PIL, etc), out of the box. One
click installers for WordPress and more with 100% perfect permissions
set. Nginx-fronted Apache, giving you the best of both worlds. A
standard account gets you user-level SSH access to the box. Awesome.&lt;/p&gt;
&lt;p&gt;If I need to host a PHP or static app, they're my first stop.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://www.webfaction.com?affiliate=kennethreitz"&gt;WebFaction&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="read-the-docs"&gt;
&lt;h2&gt;Read the Docs&lt;/h2&gt;
&lt;p&gt;A product of last year's DjangoDash, Read the Docs is the best Sphinx
documentation site around. It's &lt;a class="reference external" href="https://github.com/rtfd/readthedocs.org"&gt;open
source&lt;/a&gt; too.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://python-requests.org"&gt;python-requests.org&lt;/a&gt;,
&lt;a class="reference external" href="http://python-guide.org"&gt;python-guide.org&lt;/a&gt;, and
&lt;a class="reference external" href="http://tablib.org"&gt;tablib.org&lt;/a&gt; are all hosted on RTD. You should use
it too.&lt;/p&gt;
&lt;p&gt;[ &lt;a class="reference external" href="http://readthedocs.org/"&gt;Read the Docs&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="bonus-things"&gt;
&lt;h2&gt;Bonus Things&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://johnmacfarlane.net/pandoc/pandoc-1.8.2.dmg"&gt;Binary Pandoc Installer for OSX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/kennethreitz/osx-gcc-installer"&gt;Xcode-less GCC Installer for OSX&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</summary></entry><entry><title>A Limerick</title><link href="/blog//2011/06/13/a-limerick.html" rel="alternate"></link><updated>2011-06-13T01:00:00-05:00</updated><author><name>A Developer</name></author><id>/blog//2011/06/13/a-limerick.html</id><summary type="html">&lt;pre class="literal-block"&gt;
There was an old man from Nantucket
Who kept all his cash in a bucket,
His daughter, called Nan, ran away with a man,
And as for the bucket - Nantucket!
&lt;/pre&gt;
</summary></entry><entry><title>New Blog: Finally Static!</title><link href="/blog//2011/04/21/new-blog-finally-static.html" rel="alternate"></link><updated>2011-04-21T02:45:00-05:00</updated><author><name>A Developer</name></author><id>/blog//2011/04/21/new-blog-finally-static.html</id><summary type="html">&lt;p&gt;I've been wanting to convert my website from a WordPress-powered
application to a static one for a long time now. I tried a few different
systems, but nothing was flexible enough for my needs.&lt;/p&gt;
&lt;p&gt;I almost sat down and wrote something myself, but luckly I found
Alex Metaireau's incredible
&lt;a class="reference external" href="http://docs.notmyidea.org/alexis/pelican/"&gt;Pelican&lt;/a&gt; project. So, now
my website is statically generated with a combination of all my
favorite tools: ReStructured Text, Jinja2, Python, Git, and Jenkins.&lt;/p&gt;
&lt;p&gt;The move is far from perfect, but I'm glad I finally did it. All existing
comments are gone. There's no longer a mobile version. Many of the old
blog posts are malformed (and a big chunk should just be removed entirely).&lt;/p&gt;
&lt;p&gt;But, these things will happen in time. It feels good to start fresh.&lt;/p&gt;
</summary></entry><entry><title>Unix Exit Status Code Reference</title><link href="/blog//2010/07/13/unix-exit-status-code-reference.html" rel="alternate"></link><updated>2010-07-13T19:51:00-05:00</updated><author><name>A Developer</name></author><id>/blog//2010/07/13/unix-exit-status-code-reference.html</id><summary type="html">&lt;p&gt;I always find myself constantly Googling the list of unix status
codes (typically defined in &lt;tt class="docutils literal"&gt;sysexits.h&lt;/tt&gt;).&lt;/p&gt;
&lt;pre class="literal-block"&gt;
0 # successful termination 64 # base value for error messages
64 # command line usage error
65 # data format error
66 # cannot open input
67 # addressee unknown
68 # host name unknown
69 # service unavailable
70 # internal software error
71 # system error (e.g., can't fork)
72 # critical OS file missing
73 # can't create (user) output file
74 # input/output error
75 # temp failure; user is invited to retry
76 # remote error in protocol
77 # permission denied
78 # configuration error
&lt;/pre&gt;
</summary><category term="unix"></category></entry><entry><title>A Series of unfortunate blogs</title><link href="/blog//2010/05/09/a-series-of-unfortunate-blogs.html" rel="alternate"></link><updated>2010-05-09T08:46:00-05:00</updated><author><name>A Developer</name></author><id>/blog//2010/05/09/a-series-of-unfortunate-blogs.html</id><summary type="html">&lt;p&gt;I woke up this morning to discover that I had turned into a rather
large root vegetable, possibly a turnip or parsnip, it was hard to tell.&lt;/p&gt;
&lt;div class="section" id="what-happened-next"&gt;
&lt;h2&gt;What happened next&lt;/h2&gt;
&lt;p&gt;Reader, they pureed me!&lt;/p&gt;
&lt;/div&gt;
</summary></entry></feed>