Jason Bynum

January 9, 2012 at 3:50pm

Pow’s not responding and I think I might cry.

I love Pow. Seriously, I love it. It really is the easiest way to build Rails and Rack apps in OS X. The only thing* I don’t like about about Pow is when it doesn’t work. 

Has this happened to you? You are plugging along, knocking out your stories in Pivotal Tracker and you take a break or stop for the night. You come back to your computer in full mindset that the code you are about to write is going to save the world or make you a billion dollars (hopefully both). You craft some beautiful code, click refresh on your browser, and wait patiently to bask in your own glory only to be greeted by a timeout error. No matter what you do, you can’t get pow to respond. If you check the status, you get something like this

$ curl -H host:pow localhost/config.json

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>502 Proxy Error</title>

</head><body>

<h1>Proxy Error</h1>

<p>The proxy server received an invalid

response from an upstream server.<br />

The proxy server could not handle the request <em><a href="/config.json">GET&nbsp;/config.json</a></em>.<p>

Reason: <strong>Error reading from remote server</strong></p></p>

<hr>

<address>Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at pow Port 80</address>

</body></html>

Frustrating, right? Reboot, still not working! I can count the number of times this has happened by the self-inflicted cuts on my arm and hairless patches on my head. Is this your story? If so, fear not my friend. For the great Mike Sutton has solved this issue and incredible Matthew Ratzloff over at Built From Source wrote a nice little post about it. 

The basic gist is to save a shell script called “pow-restart” with the following contents and execute it whenever Pow stops responding. 

#!/bin/bash
# Restarts Pow when DNS fails to resolve
lsof | grep 20560 | awk '{print $2}' | xargs kill -9
launchctl unload ~/Library/LaunchAgents/cx.pow.powd.plist
launchctl load ~/Library/LaunchAgents/cx.pow.powd.plist

Huge thanks to both Mike and Matt for finding and posting this info. I owe you both a beer.

*There are actually of lot of things I don’t like. More on this later. 

January 7, 2012 at 6:04pm
Holding her head up! (Taken with instagram)

Holding her head up! (Taken with instagram)

November 15, 2011 at 6:46pm
Love.  (Taken with instagram)

Love. (Taken with instagram)

November 6, 2011 at 1:48pm

The quality of ideas seems to play a minor role in mass movement leadership. What counts is the arrogant gesture, the complete disregard of the opinion of others, the singlehanded defiance of the world.

— Eric Hoffer

October 7, 2011 at 4:22pm

He answered, ”I tell you, if these were silent, the very stones would cry out.”

Luke 19:40

July 20, 2011 at 10:36am

Clearing the Cutter in LaunchPad

Just installed OS X Lion and fired up LaunchPad only to have it’s sexiness ruined by tons of Windows apps from my Parallels installation. How did I get rid of it?

  1. Fire up Parallels.
  2. In the Finder bar, navigation to Devices > Sharing > Configure
  3. Select “Applications” from the left menu. 
  4. Uncheck the “Share Windows applications with Mac” box.
  5. Click OK.
  6. DONE!

You may need to logout of OS X or restart to have the changes take effect.

July 12, 2011 at 11:49pm

Tweet of the Day :: 07.12.2011 →

July 6, 2011 at 2:09am

But we can have no confidence that the Republicans will seize this opportunity. That’s because the Republican Party may no longer be a normal party. Over the past few years, it has been infected by a faction that is more of a psychological protest than a practical, governing alternative.

— The Mother of All No-Brainers: David Brooks

(Source: The New York Times)

June 28, 2011 at 10:10pm

Jest all you want, but I find it fascinating that a piece of video-editing software is the punchline of a late night joke.

June 27, 2011 at 1:38pm

I’m tumbling!

Call me sheep. I moving back to Tumblr.