my point of view (programming stuff mostly)

Migrate Posterous Blog to Jekyll

Posterous is set to shut down on April 30th. For the past month, I’ve been dreading the move from Posterous to whatever.

Today I bit the bullet and decided to migrate my Posterous blog to Jekyll. There are many reasons I chose Jekyll – independence from free hosted services is probably the biggest reason.

I chose to use Octopress, which extends Jekyll with a set of sane defaults and a good structure for customizing layout, CSS, etc.

To migrate the Posterous blog posts, first I downloaded an archive from the Posterous website. Inside the downloaded zip file, there is a wordpress_export_1.xml file, which Jekyll knows how to import.

Lastly, I chose to download all Posterous-hosted images, because I expect that Twitter might not host Posterous assets on Amazon S3 forever. Better safe than sorry. Here is the script that I used to do that work:

Yay, now my blog isn’t at the mercy of big corporations deciding how to make more money. Never mind that I just embedded a Gist above :-)

Note: I later realized all the images were in the original zip file I downloaded from Posterous. But odly, the filenames were a bit different and the wordpress xml file didn’t link to them.

Super Simple Clipboard History for Linux.

I recently switched from Gnome to i3 on my main laptop. So far, I'm enjoying the simplicity of piecing together my own desktop environment from small, specialized tools.

One thing I missed from Gnome was my clipboard history tool, Gpaste. I've come to expect that my previous dozen or more clipboard copies are a keystroke or two away and not lost forever.

While tweaking my i3 setup, I realized it would be possible to replicate some or even all of the functionality of GPaste using simple unix tools:

  • Ruby (could be another scripting language, or just Bash script, but I'm more familiar with Ruby)
  • xclip
  • dmenu

An hour or so later, I had this:

Upon startup, my .xinitrc file starts up clipd, which checks the clipboard every second for a new string. (Note, this only works for textual data at the moment.) It stores the last 100 unique items in the .clipboard-history file in my home directory.

The other piece to this is my .i3/config file, which has a keybinding for win+v.

This opens up dmenu with all the available clips. Once a selection is made via dmenu, the clip is stored in the clipboard for pasting the usual way.

It's not overly clever or advanced, but it seems to work.

Happy hacking!

Tulsa Hackathon Kick-off

So far the Tulsa Hackathon, an all-night programming drive benefiting needy Tulsa non-profits, is going underway and going well.

We had an excellent catered meal, project presentations were made, and teams have been formed. People seem to be figuring out team member responsibilities and getting started on the various projects.

I’ll write a couple more blog posts as the night progresses. Here are pics thus far:

Hacking Well Underway

The Tulsa Hackathon is steaming ahead. The night is still young!

People have gone from standing to sitting, staring intently at backlit screens and making things happen.

Here are some more pics…

New Blog About Church Software

Oh Good Lord in heaven, forgive me: I've started a new blog.

Many of you know I've long had a passion for churches and the software they use. I have plans to challenge the notion of what good church software should be doing. I have ideas for making better tools to aid management, shepherding and engagement.

I want desperately to sit down and just start hacking on a new product, but the older and wiser part of me (I did just turn 30 this year, you know) understands that I should have a plan, or at least, you know, a clue about what I'm going to do.

I hope to make the blog a place where I publicly share my ideas and opinions and get my assumptions tested a bit. I don't pretend to know everything about making great church software, but I like to think I am in a unique position, being both a long-time, committed volunteer in a strong church, a decent engineer, and a geek who can communicate (maybe :-).

So, lacking further ado, I present to you: Church.IO

If you're a church volunteer, minister, or geek, please stay tuned and let me know your thoughts. And subscribe!

jQuery Template Attribute Language

Introducing jqtal, my tiny jQuery plugin that provides a different way of doing client side HTML templating.

jqtal is different because it is a part of and lives alongside the HTML itself. An example might help:


The plugin uses HTML5 data- attributes to embed data necessary for content insertion. Whereas in a normal template language, you might have something like:

<input name="first_name" value=""/> jqtal, you do this instead:

<input name="first_name" data-val="first_name"/>

Now isn't that pretty!!!?

I'll leave explanation of all the syntax to the fairly extensive README. Go check it out.

Of course, there's nothing new under the sun, and indeed this idea is stolen shamelessly from Zope's TAL (Template Attribute Language) that I used back in the day. In fact, it was one of the few things I actually liked about Zope.

I hope you enjoy it too!

Backbone.js Talk at TulsaWebDevs May Meeting

Hey friends, I wanted to let you know I will be giving a presentation on Backbone.js at the next TulsaWebDevs meet-up.

For any of you using more than the tiniest amount of JavaScript in your web-based applications, Backbone.js may be something to consider. Backbone brings structure and organization to the client-side that we've long had in MVC frameworks on the server. Here are some benefits:
  • Stores data in specialized data "models" instead of directly on the DOM.
  • "Views" give you good separation of presentation from the data layer.
  • "Controllers" map url hash fragments to discreet actions.
  • Very lightweight, less than 10kb.
  • Doesn't assume much about your UI or your backend data store.
I'll be walking through a sample app and demonstrating use with Rails as a backend (or you can be easily use the server framework of your choice). I'll also give an overview of Underscore.js, a related product of the guys at DocumentCloud, used within Backbone.

You do not have to be a JavaScript whiz kid to need something like Backbone. If your last bit of JavaScript reminded you of a dish from Spaghetti Warehouse, then Backbone may be for you!

TulsaWebDevs next meeting will be on Monday, May 9th at the Tulsa Collaboratorium at 6pm. Hope to see you there!

Update: The meeting was awesome last night -- our largest meeting to date -- 14 people! Surprisingly, I think most people enjoyed my presentation and incoherent rambling.

You can view the source code for Crk and my Backbone.js slides.

Red Dirt Ruby Conference II

Red Dirt Ruby Conference in nearby Oklahoma City was even better this year than last year, and that’s saying a lot.

The format of RDRC is unlike any other conference I’ve attended. The key difference: each speaker (excepting keynote speakers) only talks for 18 minutes and that’s it.

Speakers are grouped, four at a time, into a theme. This year’s themes (for day one, which is all I was able to attend) were Ruby Implementations, Rails 3 Extensions, Rails Redux, and JavaScript. So in all, I saw 16 presentations in a single day, plus keynotes!

For us with A.D.D. fueling our disorder with wifi-enabled laptops at hand, coercing presenters to condense their subject matter down to a mere 18 minutes is like switching from a charter bus to high-speed rail – you get to the destination considerably faster. As @JEG2 put it, if a speaker can’t get to the point in 18 minutes, then they won’t in an hour either.

Keynote speaker Aaron Patterson (@tenderlove) gave an entertaining and honest look into the core of Rails development, and the challenges that go with it. I don’t envy his position on the core team.

Dr. Nic Williams (@drnic) gave a compelling call to action for people to join or start Ruby user groups in their communities. Dr. Nic’s style is disarming and delightful alternating with hysterical and off-the-wall. Looking around the room, I saw few if any laptops open during his speech.

The best of the 18-minute talks were about alternative Ruby implementations Rubinius and MacRuby, Rails plugins OmniAuth, Haml and Sass, and finally JavaScript alternative CoffeeScript. But by far the best regular talk was from Jeff Casimir, titled “Fat Models Aren’t Enough.” Jeff’s speaking style was engaging and provocative – so much that he received more than one middle finger from the audience! But it was all in good fun, and that brings me to my most favorite part of the conference…

The fun. RDRC is upbeat, energetic, and just plain fun. People are just friendlier in Oklahoma than some other places I’ve been (even if those same people came from the other places, it seems). RDRC makes me proud to be an Okie.

After the day was done, many of the conference goers packed into a hotel suite and started hacking. This was the icing on the cake for me, because I met many amazing people who do creative work everyday. Inspiring stuff.

Thanks to James Edward Gray II and his wife Dana, and to the army of people I’m sure it took to pull this off. See you guys next year!