Skip to content

<3 sed

I wrote a fun sed script today:

sed -E -n -e ':t ; s/(.{21})(.*)/\\bf\{\1\}\n\2/ ; p ; s/\\bf\{(.*)\}\n.*/\1/ ; h ; :q { n ; G ; s/(.{21})(.*)\n\1/\2/ ; tp ; s/(.+)\n.*/\1/ ; bt} ; :p { P ; bq }'

Short, but effective. Can you figure out what it does?

(solution after the break)

Continue reading ‘<3 sed’ »

Link: PHP sucks

One of my co-workers wrote up this gem on why PHP sucks. I don’t agree with his points (having a “development server” isn’t an important or even particularly useful feature of a framework, much less a language; prepared statements aren’t the pinnacle of SQL), but he does do a good job of showing off some of PHP’s more spectacular failings.

I’m naming all of my PHP functions __lambda_object now.

(yes; I do appreciate the irony of linking to his post from a PHP site)

Debt Free Since 2012

As of today, February 10, 2012, I am now officially debt-free. I decided to use my tax refund to pay off the rest of my student loans, which have been sucking down thousands of dollars a month since I graduated. Here are the results:

Yep. It took a few days longer than expected, because Sallie Mae is terrible at ACH. And, of course, their obnoxious rounding means that at some point in the next six months, I’m going to get a cheque from Sallie Mae for 80¢ (presumably plus 6.8% interest). But it’s pretty nice to be free…

This is going to be the worst post ever for attracting spam-bots, isn’t it?

My Storage Problem

Storage is cheap, or so we’re told. Amazon will sell me storage for $0.055/GB/month in the cloud; 3.5″ hard drives are hovering around $0.06/GB. However, my laptop has a little 250GB SATA drive that is (a) slow and (b) getting full. So I desire to replace it with a fast little SSD. But that raises the question of what to do with my stuff. I’m asking you, Internet. Details below the fold.

Continue reading ‘My Storage Problem’ »

60,000 scrobbles

I used to post these on Facebook as Notes, but since the Timeline refactor, I frankly have no idea how to use Notes; so I guess I’ll just post on my own blog. I use last.fm (me) to track my music-listening habits (and sometimes for other things). As of some time recently, I’ve passed 60,000 scrobbled plays since 2006. Yay!

Here’s a graph I made (click for ps version; gnuplot continues to be the best thing ever):

Cheers, all.