Brandon Bohling
[lines are forming]

Network Throttle for iOS Development

by Brandon Bohling — tags: technology, link

All iOS developers must know about this handy-dandy tool by Mike Schrag:

speedlimit is a Leopard [works on Lion too] preference pane for limiting your network bandwidth to one of a couple different speeds—768k DSL, Edge, 3G, and Dialup. This is really handy for testing your iPhone app under normal Edge network conditions in the iPhone Simulator. The new version allows you to restrict the slowdown to only a specific set of hosts.

SpeedLimit screenshot

Jekyll Link Posts with Keyboard Maestro

by Brandon Bohling — tags: technology

This has been a big week of knocking down the Jekyll publishing barriers. Automating the Jekyll publishing process was the first big one. As I stated in that post, it still is not perfect, but much, much better than the default Jekyll behavior. Next, I tweaked Jekyll so I could publish link posts, but what good is that feature unless I can publish them lickety-split? Luckily I remembered that Ben Brooks posted on this topic recently (turns out it was just over a year ago).

This is the macro I came up with taking Ben’s lead:

Keyboard Maestro Macro for Link Posts

The Workflow

When I am viewing a web page in Safari that I want to link to I do the following:

  1. Highlight any text I want to quote.
  2. Hit my Keyboard Maestro hot key to launch the Link Post macro

That is it. After using the above 2 steps I got the following link post start for my first link post, How to find the hidden files on Mac OS X:

Sample Output from Keyboard Maestro Link Post Macro

Again, this is not perfect. Currently the macro is for Safari only. I also use Google Chrome (though mostly for Flash-based sites) so I need to create a Chrome-specific macro. Or better yet (if possible), tweak the macro to copy the relevant info of whichever browser is in the foreground. Hopefully someone much smarter than me will post a solution. Let the online discussions begin!

Link Posts with Jekyll

by Brandon Bohling — tags: technology, link

Now that I have Jekyll publishing automated, why not do link posts? For one, Jekyll does not support link posts out of the box. However, Tuan Anh figured out how to tweak Jekyll to support link posts: Posting Link Post in Jekyll by Tuan Anh Tran.

This is the code I used to modify my post.html file (in the _layouts directory):

{% if page.link %}  
<h2><a href="{{ page.link }}">{{ page.title }}</a></h2>  
{% else %}  
<h2> {{ page.title }} </h2>  
{% endif %}

NOTE: I had to use page.link where Tuan Anh used: page.post-link (in their code).

Unfortunately, clicking the title on the homepage still goes to a permalink on my site. It is not until one visits the actual, individual (link) post when the title is hyperlinked to the source. This is due to Jekyll not knowing the internals of any post when generating the homepage. Still, I thank Tuan Anh for the tip and will use it often!

Automating Jekyll

by Brandon Bohling — tags: technology

March 06, 2012, marked the one year anniversary of this site being driven by Jekyll. I will not rehash my reasonings here as I explained myself already in the Text File Revolution post, but I do want to reflect for a moment…

Since switching to Jekyll I have written a mere 28 times; a personal worst in my 9 years of blogging1. I would love to blame it on a busy life2, but that is a cop-out. Instead I will blame it on the small, publishing barrier associated with using Jekyll. While it only took a couple of minutes to publish a post there, were just enough steps to make the thought of writing less appealing. That is why I worked out a better (but not perfect) workflow.

Automating Jekyll with Automator

Like any other technical issue, there are many solutions. Admittedly the solution below is far from perfect, but it is an incremental improvement over the default Jekyll behavior, but it does greatly reduce the barrier of publishing posts on the Jekyll platform.

I decided to use a built-in tool provided by Mac OS X, Automator. I know true Mac geeks leverage Automator’s power quite frequently. I, on the other hand, have only used it a handful of times. Here is how I used Automator.

Automator Folder Action

  1. Fire up Automator
  2. Create a new “Folder Action”
  3. Use rsync to download my current published content (always backup, right?)
  4. Compress the published content
  5. Use rsync to publish new content
  6. Save the workflow

Below is a screenshot of the Automator workflow:

Automator Workflow for Jekyll

Implementing the Folder Action

Now you have to setup the folder to use the folder action:

  1. Using Finder, navigator to the folder containing your post folder
  2. Right-click on the post folder and select Services -> Folder Actions Setup…
  3. Select the script you created with Automator

Setting up Folder Action

What this does is set up a folder watcher for the post folder. Anytime a file is added it will execute the script that was created using Automator.

New Workflow

What does my workflow look like now? Unfortunately this workflow requires me to have Jekyll running on one of my systems at all times. I am OK with this since I have chosen not to use GitHub for my deployment. Also, I am unable to install incron on my server to have a fully automated publishing solution. Lucky for me, my iMac is almost always running anyway.

  1. Make sure the Jekyll server is running (do this initially and periodically)
  2. Write my post (saving it anywhere but in my post folder with the Folder Action enabled)
  3. When finished save to my post folder
  4. Within a few seconds my post is published

This new, automated workflow allows me now to write posts on my iOS devices. No, it is far from perfect, but the barrier to write has just been lowered significantly.

Areas for Improvement

So how do I want to improve my workflow?

  1. Have the Automator workflow (folder action) run Jekyll so I do not have to always have Jekyll running
  2. OR setup my server hosting this site to watch the Dropbox folder (again, I do not believe my ISP allows for this)
  3. Figure out a more efficient way to preview posts. Currently I have a separate Jekyll site for previewing. This means I have a second folder action watching the preview folder. This works just fine, but I have to imagine there is a better way.

In a few months I will provide an update on how things are going. Just in the last few days I have already increased my post count, but we all know how new-and-shiny-objects get a lot of attention at first. I do have another workflow improvement, but I will save that for another post.

Feel free to share your feedback. Like my photography workflow, I am always trying to improve my blogging efficiency.


  1. Another recent anniversary. March 03, 2003, was my first blog post using dasBlog written by Clemens Vasters.

  2. Father of a 5 year old boy, changed jobs, new puppy, travel, …

How to “View Source” from Safari on an iPad or iPhone

by Brandon Bohling — tags: technology, link

How to “View Source” from Safari on an iPad or iPhone from Ole Michelsen:

  1. Add this (or any other) page as a bookmark
  2. Then click here to see the bookmarklet code and Select All → Copy
  3. Now edit that same bookmark, paste the code you just copied into the URL and name it something like “View Source”

This will most certainly be used. Thanks Ole!

← older archive