Tips, Journal, UnixNovember 6, 2009 3:35 pm

Two pieces of advice on FreeRADIUS.

  1. Keep up with new versions. There are improvements in each version, so don’t just copy over the same config files: make those changes in the new files so you keep up with the times.
  2. If you’re starting with a fresh install, don’t jump in and make changes right away. Test the freshly installed server first to be sure it works. Make a change, then restart the server to be sure it still works. Another change, another restart, another test. Debug mode -XXX is your friend.

And I finally eliminated a FreeRADIUS warning I saw while in debug mode. This warning is very common now because FreeRADIUS has been upgraded internally but not all of the sample files have been tidied up to reflect the improvement (see my recommendations above!). In debug mode, you might see Info: [ldap] WARNING: Deprecated conditional expansion ":-". See "man unlang" for details and man unlang wasn’t particularly enlightening on first pass since it wasn’t obvious until I read this post by Mr. FreeRADIUS himself where he explains why this change is A Good Thing. The key is to use more percents and more braces. The line that causes the error for ldap is in the modules/ldap file:
filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
It needs to updated like so:
filter = "(uid=%{%{Stripped-User-Name}:-%{User-Name}})"

This worked to eliminate the warning before I ditched LDAP because it wasn’t matching what I needed.

Cooking, JournalOctober 29, 2009 9:15 pm

Well, I just tried a Krups coffee grinder to turn flax seeds into flax seed meal, and it works! Fast too! One tablespoon of flax seeds turned into two tablespoons of meal, so that’s an easy conversion to remember. I wish I had thought to use when I mixed the spices (coarse sea salt, dried rosemary from my bush, and coarsely ground black pepper) for my chicken florentine by hand with mortar and pestle. If the Krups can pulverize rosemary too, that would be awesome! I bet it can. I like the flavor of rosemary (in moderation), but I don’t like finding little sticks of rosemary in my food.

At first I tried to use it like my food processor, where five two-second bursts yield better results than one ten-second burst, but since I want the flax seed finely pulverized, the continuous run (instead of short bursts) is more effective. It’s not hard at all to clean with a paper towel either.

Child, JournalOctober 28, 2009 7:47 pm

This morning I was struck by how some of the … ah … college experience does prepare you for life. There’s the experience of hugging toilet, as I was doing this morning. Only this time, as a parent, I was hugging my small child with tummy hurting sitting on the toilet to go poop. When he doesn’t feel well, he can get a hug anywhere. And all-nighters? That’s obvious to anyone who’s had a sick kid. And here I thought I had outgrown my days of hugging the toilet!

JournalOctober 26, 2009 10:43 am

The (comfy slacker) knit pants I’m wearing today have vertical-entry on-seam pockets. I’ve got nothing against on-seam pockets, except these are also short, shallow pockets that aren’t deep enough. And when I say my pockets aren’t deep enough, I mean that my cell phone and my keys have fallen out! Worse yet, I even lost my building-entry badge that I clipped to the pocket because the pockets are so shallow that the bottom of the pocket pushed on the clip until it popped off!

These pants may be comfortable, but I don’t think I’ll keep them too long, at least not as wear-to-work on meeting-free days.

If these pockets had a horizontal entry, items wouldn’t fall out so easily. If these pockets were deeper, again it wouldn’t be a problem because the opening would again be above the stuff stored in the pocket. But short vertical pockets are truly dangerous because it’s so tempting to use your pockets as, well, pockets to store essential items, and this short-vertical configuration kicks out everything.

Bad, bad pockets.

Tips, Child, Toddler, JournalOctober 24, 2009 1:26 pm

At Karston’s preschool, the teachers carefully dash out the name for each child to trace on the daily artwork. Tedious! Karston is learning to write his name, and I’d love to build on that at home, but I know I’m not going to draft all this tracing for him when I’m sure there’s a font for it … I found free trace fonts @ fontspace.com with the Print Clearly and Trace fonts. Much better!

Cooking, Recipe, Journal, AllergiesOctober 23, 2009 7:04 pm

I looked at The Post-Punk Kitchen for a butter or margarine to oil conversion (1/2 cup/1 stick of those to 1/3 cup oil). Also, when I use Ener-G Egg Replacer, I use the whisk attachment on my mixer to whip it into a meringue-like froth before using it, and I’ve never noticed the chalk-y taste. Another tip is that chocolate chips don’t “stick” to oil batters, so use fewer than in the chips-laden original. I also replace brown sugar with slightly less white sugar and a dollop of molasses. So here’s what I did:

1 1/2 Tbs Ener-G egg replacer
2 Tbs water
1/2 tsp vanilla extract
whisk into a froth (several minutes)
1/3 cup canola oil
3/4 cup brown sugar
mix
7/8 cup flour
1/2 tsp baking soda
1/2 tsp salt
mix
preheat oven to 325 °F
1 cup oatmeal mix (batter will now be getting stiff)
1/2 cup (3 oz) chocolate chips mix
  lightly grease cookie sheet
put cookie batter on cookie sheet
bake 8-12 minutes at 325 °F

I either left the cookies in too long (the kids were wild), or I need to drop the temperature to 300 °F for the oil substitution. Or perhaps I should use a combination of apple sauce (to hold moisture) and oil (to transport yummy flavor)? OK, this is still a work in progress, but completely edible as is too. The cookies also wanted to stick to the pan, so I either should have removed them sooner or I should have greased the cookie sheet. But still mighty tasty! These are my favorite cookies …

Project, JournalOctober 16, 2009 1:02 pm
Running anaconda 11.4.1.62, the MythDora system installer - please wait...
/usr/bin/python: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
install exited abnormally [1/1]
disabling swap...
unmounting filesystems...
	/mnt/runtime done
	disabling /dev/loop0 LOOP_CLR_FD failed: 6
	/proc done
	/dev/pts done
	/sys done
	/mnt/stage2 done
sending termination signals...done
sending kill signals...done
you may safely reboot your system

My current theory as to why I can’t install MythDora from DVD or CD or LiveCD is that I have bad burns from OS X. Maybe it doesn’t set all the right “bootable DVD” signals so that something (including libpython) isn’t extracted or mounted at boot. I believe the error message because I can’t find libpython when I mount the image in OS X.

The other possible theory is that the hardware I’m using is just that screwy. Linux is strongest on slightly older hardware (so that someone has written the drivers for it), so I asked for a cast-off. This cast-off, it was finally admitted to me, is unwanted because it was not stable as a Windows XP box. I’ve got another cast-off (same reason, but different-enough hardware to try again) to try.

Argh.

Tips, Journal, CodeOctober 15, 2009 2:38 pm

Today I learned two tricks for the replace() function in Javascript.

  1. Use $? for the found pattern, and
  2. use (parentheses) within your regular expression if you want to refer to what it matched by $number in the replacement.

I needed the sub-string ‘.A.‘ to be zero-padded into ‘.0A.‘ instead. However, I wasn’t positive enough that the only character that needed zero-padding would be an A, so I wanted to match the general case of any single character between dots.

So that means I could match any single character between dots and give a long-winded message: output = input.replace(/\.(.)\./g, "replace> $& <replace "); or more to the point: output = input.replace(/\.(\w)\./g, ".0$1.");

I can use either ‘.‘ (traditional Unix regexp for a single character) or ‘\w‘ (PCRE for any non-whitespace character) to match A with my expected input.

Project, JournalOctober 8, 2009 11:38 am

I mentioned it again Tuesday, Lifehacker Wednesday … I can confidently say that replacing a television subscription service with what you can legally view online is no longer in the “early adopter” range. There’s still plenty of room to build your own (say if you want HD more than AppleTV), so it’s not “commodity” yet either, but the bleeding edge bled elsewhere.

Tips, Project, JournalOctober 5, 2009 10:08 am

So we’ve been thinking that, for as little as we watch TV, the cable bill is rather high. However, we want HD (but now there’s significantly more free HD available), and we need a DVR. I might miss some of the cable channels if I’m sick and at home, but that doesn’t happen often enough to plan for it. I think we could watch over-the-air with a side of Netflix and be perfectly happy. However, I’ll have to roll a DVR replacement because the children expect their shows now, with fast forward and rewind. (Bill Cosby said parents don’t want justice, they want quiet, and we’ve learned how right he is! If we want to eat breakfast without children climbing all over us, that episode of Super Why or Imagination Movers or Mickey Mouse Clubhouse sounds pretty tempting. If they don’t talk to the TV, we turn it off as soon as we inhale our food. Usually, however, they interact with the show and we’re not disappointed with the educational opportunity while we eat in peace and quiet.) Super Why is on PBS so we can watch it over-the-air, and Disney has episodes online and seasons on Netflix. It will take some juggling, but I think we can go without cable. I’m planning a gentle, gradual, slow transition, though.

So that means the first piece of hardware is something to send HD signals to a home-grown DVR. I thought this would be very confusing, a wide field of choices, blah blah blah. Well, it isn’t. After reading bronzefinger, there’s only one choice: the Hauppauge HD PVR. The usual dithering of checking online reviews and trying to imagine which feature set I want is unnecessary without choices. Newegg had the best price, and a rebate that ended that weekend (2 weekends ago), so I just ordered it. We’re still getting the hang of using this box, but so far this glacial move away from the glassy medusa has been surprisingly, disturbingly (as in, why didn’t we do this sooner?) easy.