Late Night Thinking

by Thomas L. Kula

Perl Multi-Line Regex and Line Breaks

After a co-worker asked for some help in matching and deleting from a file all occurances of: - delete: uid Our confusion stemmed from the fact that even with the /m flag to regular expressions, ^ and $ still only can anchor the beginning and end of a regex — to match internal line breaks you need '\n'. E.g. perl -p -i.orig -000 -e 's/\n-\ndelete: uid$//mg' file

Mini-review: They Might Be Giants "Join Us"

Just got the Internet Fan Club download for "Join Us", thought I'd do a mini-review of my first listening. Can't Keep Johnny Down: I can't wait to hear this in concert, because I bet it's going to be about 10 times as rockin' as it is here. Also, electric keyboard parts are screaming out to be a accordion. Cloisonné: Bonus points for using "sleestak". But didn't do much else for me.

Coffee Gravy

A while ago I came up with the idea of making a coffee gravy — not like red-eye gravy, which is basically ham drippings and coffee, but actual gravy. Basically, using a roux to thicken coffee to a gravy-like consistancy. Today I had a fortunate coincidence of events: I was at the Ugly Mug, needed to buy some beans for work, had some time to waste this afternoon and had my backup crappy bean grinder at home.

Couscous with poached eggs

Thanks to my boss Andrew for the idea for this one. Bring 1 cup of water to boil in a lidded bowl, dump in 1/3 cup couscous and some chopped celery leaves (any other kind of herb would probably work here, I just happened to have celery leaves on hand). Let it sit until all the water is absorbed, around five minutes or so. Add a pinch of salt, some pepper, drizzle on a bit of olive oil.

2011 Coffeeshop of Record Report

Ever since May of 2005 I've had the habit of designating a local coffeeshop as my "Coffeeshop of Record" — it's the place I always hang out at, and my favorite local caffeine establishment. Or, as I sometimes put it, "my drug dealers". Because I'm also that kind of person, I keep statistics of how much I spend there. Shortly after moving to Ypsilanti I designated the Ugly Mug Cafe as my CsoR.

Oatmeal!

Or porridge, as some folks might say. Melt one tsp butter in a pot until it is nice and foamy. Add 1-1/2 cups steel cut oats. Stir over medium high heat until the oatmeal smells nice and takes on some color. Add 3 cups of water, bring to boil, reduce heat to a simmer. Throw in a pinch of salt. Peel and chop up an apple, and throw that in.

Systems Thinking

A while back, some folks I know were talking about the difference between someone who is a computer administrator and someone who is a systems administrator. Basically concentrating on the differences in thinking necessary when you move from dealing only with a single, isolated machine to dealing with multiple systems, with parts that can interact in subtle and non-trivial ways. I think I've found a concrete example that demonstrates well this difference, and I found it this morning in the restroom just down the hall from my office.

My Life As A Wedding Witness

Every Wednesday, my boss and four of us in our group have what we call a "Small Group Meeting", basically a way of brainstorming and hashing out things that just don't work well in a discussion involving the number of people that make up our entire group. It is traditionally in a coffeeshop down the road from the office, so we can talk without getting interrupted by folks wandering into my boss' office or a meeting room.

Windows, ssh keys, forced commands and you

As part of the CIFS provisioning process at work we need to be able to set access control lists on the top-level directory of the shares we are offering to end users. After observing the horror that is Samba and beating it about for a bit, the next solution that presented itself was learning enough scripting to cause a Windows machine to do this for us. Eventually, enough Powershell knowledge manged to knock its way into my head (the best description I have for Powershell is to paraphrase what my friend Nick said about Google Mail the first time he used it, "

Quinoa with marinated artichoke hearts and roasted red peppers

Rinse well two cups of quinoa. Put that in a pan and toast it for a bit --- let all the water steam off and then let it go until you get a nice smell coming out of it. Add in one chopped onion, three cloves of garlic and four cups of vegetable broth. Bring to a boil and then simmer. While that's going on, drain the liquid from two jars of roasted red peppers and two jars of marinated artichoke hearts, reserving the liquid.