blag/posts/2014-02-06-hello-world.md

3.5 KiB

layout, title
layout title
post Hello, World (from Jekyll)

Here goes another migration of my sparse content from the past 8 years. This time, I'm giving up my Wordpress instance that I've migrated around 3 or 4 times (from wordpress.com, then Dreamhost, then Linode, then tortois.es), and completely failed to migrate this time (I neglected to back up Wordpress' MySQL tables). I still have an old XML backup, but it's such a crufty mess at this point that I'd rather start fresh and import in some old content.

Wordpress is a fine platform and it produces some beautiful results. However, I feel like it is very heavy and complex for what I need, and I have gotten got myself into many train-wrecks and rabbit-holes trying to manage aspects of its layout and behavior and media handling.

My nose is already buried in Emacs for most else that I write. It's the editor I work most quickly in. I'm already somewhat familiar with git. So, I am giving Jekyll a try. Having a static site pre-generated from Markdown just seems like it would fit my workflow better, and not require me to switch to a web-based editor. I'm going to have to learn some HTML and CSS anyway.

(I phrase this as if it were a brilliant flash of insight on my part. No, it's something I started in July and then procrastinated on until now, when my Wordpress has been down for months.)

A vaguely relevant issue just steered me to the existence of TRAMP which allows me to edit remote files in Emacs. I just did C-x C-f /ssh:username@whatever.com:/home/username from a stock Emacs installation, and now I'm happily editing this Markdown file, which is on my VPS, from my local Emacs. For some reason, I find this incredibly awesome, even though things like remote X, NX, RDP, and sshfs have been around for quite some time now. (When stuff starts screwing up, M-x tramp-clean-up-all-connection seems to help a bit.)

I collect lots of notes and I enjoy writing and explaining, so why don't I maintain a blog where I actually post more often than once every 18 months? I don't really have a good answer. I just know that this crosses my mind about once a week. But okay, Steve Yegge, you get your wish but only because I found what you wrote about C++ to be both funny and appropriate.

Here's a script I was using to convert links from some other failed-Markdown-conversion from earlier: {% highlight python %} import re, sys

def repl(m): return "%s" % (m.group(2), m.group(1))

urlRe = re.compile(r'<a href="([^"]+)">([^<]+)') for line in sys.stdin: n = 1 while (n > 0): (line, n) = urlRe.subn(repl, line) sys.stdout.write(line) {% endhighlight %}

It mostly just turns HTML links to Markdown ones. Simple, but I find it useful. Someone else probably knows a Python one-liner to do it. Whatever.

Test code stuff: {% gist 8874941 %}

To-do list items: