January 31, 2007

Emacs Markdown Functions

Typo supports Markdown, which is super sweet. I far prefer it to Textile. The only problem with Typo is that I have yet to find a good Emacs XML-RPC mode/library that work with Typo, so I’ve decided to compose my blog entries in Emacs as Markdown and then add them to the blog when I’m done. This may have the added effect of making me think more about what I’m writing.

I didn’t find a good Markdown tool that works with Emacs, and all I really care about is being able to preview the HTML that it will output. The following will do just that:

(defun markdown-preview-buffer ()
  "Preview the current buffer as it will look when run through
markdown."
  (interactive)
  (let ((buf (get-buffer-create "<em>markdown-preview</em>")))
    (clear-buffer buf)
    (call-process-region (point-min) (point-max) "~/bin/markdown" nil buf nil)
    (browse-url-of-buffer buf)))</p>

<p>(defun clear-buffer (buf)
  "Clear a buffer"
  (save-excursion
    (set-buffer buf)
    (kill-region (point-min) (point-max))))

M-x markdown-preview-buffer will run the current buffer through markdown (assuming it’s installed in ~/bin/markdown and is executable) and open the resulting HTML in your default browser.

Edit: That’s much nicer with save-excursion and bare references to point-min and point-max.

January 30, 2007

Cool Music Tech

There’s a whole lot of very cool web music technology in the works right now. Services are popping up to facilitate tour tracking, music blog tracking and seamless music experiences. I don’t really have much to say (for now) but here’s a good list of some cool stuff.

  • Hype Machine – See what music all the cool kids are blogging about.
  • Tour Filter – Track the latest and greatest live shows in your area.
  • Archive.org Live Music Archive – Descended from the venerable etree, it seems these guys have something new every time I visit the site and an ever expanding hard drive.
  • XSPF Music Player – Not so much a web site as a tool used on music sites. Build a play list, point the player at it, listen.

Know of any other cool sites and tools? Toss ’em in the comments.

January 28, 2007

Hello Typo!

I’ve switched this blog to Typo. this is exciting and fun and it means that you can comment without waiting for me to read your email and add it to the post. It only took one day of that for me to get tired of it. All the old content is still here except for the few comments that were left; for that I apologize. But I won’t apologize for anything else! Ever!

January 27, 2007

Belief

I was listening to the BBC News Hour this morning. They were covering the recent Science report on fish stock depletion and, in the course of the report, interviewed a British fisherman about the report.

The question asked, of course, was “do you believe this report?” And the fisherman’s reply, of course, was, “no, we don’t believe the report.” With the use of the word believe all scientific research and logical analysis is thrown out the window. If we don’t believe the report it can’t possibly be true.

I know this has already been done to death – this is just truthiness in disguise – but it just astounds me that, on so many fronts, so many are able and willing to ignore hard numbers and logic to make themselves feel better.

Environmental issues are the most galling. Whether it’s global warming or fish stock depletion these are issues where it will do less harm to act in a cautionary manner and fix things now than it will be to sit and wait and see if the shit hits the fan. If we turn out to be wrong and global environmental collapse is not imminent we have not wasted money or time; our world will be a better place if we reduce emissions, utilize renewable energy and fish more responsibly.

In business, if your accountant told you the company would be bankrupt in a year, it would be foolhardy to spend as if that were not the case. Why, when our scientists (whose business it is to investigate the world and predict future trends) tell us the Earth will be bankrupt in 50 years, do we choose not to believe them?

January 27, 2007

500kV Switch

This video of a 500kV electrical switch opening in the middle of the Nevada desert is bad ass.

January 27, 2007

Amazon EC2

Amazon announced the beta of Amazon Elastic Compute Cloud (EC2) today; it’s pretty exciting. The basic premise of the service is that you can get any number of virtual machines and pay for what you use as far as the number of machines, disk space and bandwith go. I’m absolutely bursting with different ways to use this technology, from web hosting to streaming radio to batch processing to QA.

I signed up for an Amazon Web Services account today, hoping to play, even if only a little, with EC2, but the beta is full already. I am, however, on the list of people waiting for spots, and I’ll still have a chance to play with S3 (which I wrote about, if a bit tangentially, in the context of JungleDisk) in the mean time. Cool stuff is coming out of Amazon, cool stuff.

January 27, 2007

EC2 At Last

This morning I woke up to an email from Amazon. I finally have my EC2 account! Hooray for me. Now I just need to find out why making a large (greater than 60GB) S3FS freezes my machine.