Friday, October 31, 2008

Pumpkin Seeds

In recent years our family jack-o-lantern tradition has come to include roasting the pumpkin seeds. Here's what we do:

1. preheat the oven to 300 F

2. Remove all the seeds, separate them from the pumpkin goo, and clean them. This is tedious and usually takes me 20-30 minutes.

3. Dry off the seeds with paper towel. They don't have to be completely dry.

4. Put them in a bowl and add the following per cup of pumpkin seeds: a) tbsp olive oil, b) 1/2 tsp salt, c) tsp garlic powder. Mix and coat well.

5. Spread the seeds on a cookie sheet

6. Bake in oven for 45-55 minutes, stirring/flipping every 15 minutes.

Mmmmmm... pumpkin seeds

Monday, October 20, 2008

request_module: runaway loop modprobe binfmt-464c

Short answer: If you are getting this error right after linux kernel initialization, you are likely booting a 32-bit kernel with a 64-bit OS.

Long answer: If you boot a 32-bit kernel with a 64-bit OS, when the kernel tries to start /sbin/init (a 64-bit binary), it won't recognize the binary format, and it'll try to load the binfmt-464c kernel module, which is ELF support. (ELF support is generally compiled into the kernel, not built as a module, by the way.)

The reason for the loop error is that the kernel is trying to invoke modprobe to load the module, and modprobe is itself an ELF binary, resulting in a recursion loop...

Thursday, September 18, 2008

Ambiguous Ad

On my way in to work this morning I noticed this ad in the bus: "Working in healthcare and love technology?" It then went on to give information about a local community college's medical informatics program. For 15 seconds I was wondering what "love technology" is a euphemism for... Then I saw what the writer really intended.

Saturday, August 16, 2008

What words cause gmail to not display any ads?

I've noticed that email messages that include the word "funeral" trigger gmail to not display any ads. What other words result in this behavior?

Sunday, August 10, 2008

Fedora and xterm1 and ncurses-term

The xterm alternate screen behavior is quite annoying. That is, programs like man or vi or less use the alternate screen, and when they exit the original screen is restored. (See http://fixlog.blogspot.com/2006/09/stop-gnome-terminal-screen-clear.html for an animated example.)

I've always switched to using TERM=xterm1, which is the same as xterm, but with the alternate screen clearing disabled.

Today I installed Fedora 9, and I found that xterm1 was not present in /usr/share/terminfo/x. Searching for information about xterm1 is pretty fruitless. In the end, I pulled down the ncurses source rpm and rebuilt it to track down xterm1. The answer was that xterm1 got moved into a secondary package named ncurses-term, which was not installed by default. So a "sudo yum install ncurses-term" did the trick.

Thursday, February 7, 2008

Unsolved "Windows - No Disk" error with ipod nano

I have an ipod problem that's been plaguing me for months, and the all-knowing Internet has failed to provide an answer! I won't repeat all the details, because they are already well documented at http://forums.ilounge.com/showthread.php?t=208152

This also reminds me that Apple is goofy about not providing detailed release notes for software and firmware updates. Why do they do that?

Saturday, February 2, 2008

Javascript alert / confirm trap

Yesterday I hit a web page that contained an infinite javascript loop. That's usually not too bad, because the browser will recognize that and say something like, "A script on this page is taking too long -- stop it?"

The problem this time was that this javascript infinite loop had calls to both the alert and confirm functions. Those functions pop up modal dialog boxes. So instead of a loop that was chewing up cpu time, this one was popping up OK and Yes/No dialog boxes as fast as one could close them. The nasty bit is that these are both modal dialog boxes, so one cannot do anything else in the browser while they are displayed.

In the old days, I would have just killed the browser and restarted it. But these days, with tabbed browsing, I wasn't just killing that page, but all my other tabs, too. Fortunately for me, at the time I had no unsaved state in any tabs. If I did I would have lost it. There's no way to even copy/paste before killing the browser, because of the modal state.

Why can't a modern browser detect this situation and offer a clean escape? For example, if a page has popped up five modal dialogs within five seconds, then offer the user something like, "This page is opening dialog boxes quickly -- stop loading?"

Sample page demonstrating this trap:



<html>
<head>
<title>Modal Hell</title>
<script language="JavaScript">
<!--
function infinite_loop(txt) {
while (1) {
alert(txt);
txt=txt+'.';
}
return;
}
-->
</script>
</head>

<body>
Can your browser break out of this?
<p>
<a name="foo"
onclick="infinite_loop('Now stuck')">
<u>Click me to start an infinite
modal dialog loop</u></a>

</p>
</body>
</html>

Monday, January 21, 2008

Firefox and the default printer

Firefox printing woes...

Firefox's default behavior is to remember your last printer and printer settings, and then use them indefinitely until you change them. This seems to be controlled by the print.save_print_settings configuration flag, which is true by default. You can see this in firefox by going to about:config and filtering down to the "print" settings.

This behavior is counter to the expected behavior for Windows applications, which almost always revert back to the Windows system default printer and printer settings between sessions of an application. I know firefox isn't a "Windows application", but when running on Windows, why not behave like one? When in Rome, and all that. It's just an annoyance to be different than a platform's typical behavior.

Here are the two problems I have with this:

1. On rare occasions I will print something from firefox in landscape mode. Of course, when I print the next thing, I forget that the setting stuck, and it comes out landscape, too.

2. On rare occasions my default printer near my office will be broken, and I'll print something from firefox to a secondary printer on the other side of the building. Guess what? The next time I print, my output goes to the other side of the building, and I have to curse firefox for it.

None of my other apps running under Windows suffer from this silly need to hold onto the last printer settings.

So yesterday I figured I'd do a quick web search and find the option to make firefox behave "properly" under Windows. That is, always go back to the system default printer and settings between sessions. Surprisingly, there was no good hit for "firefox default printer". The main hit was this goofy thread in which most people are debating whether or not this issue really exists, but in the end nobody solves the problem: http://readlist.com/lists/lists.mozilla.org/support-firefox/0/2677.html

I did find the
print.save_print_settings configuration setting. I set it to false, but for me all that did was make firefox just never change the printer settings again. That is, whatever settings were active when I set it to false became the default settings forever. That's still not what a regular Windows app will do. It should track changes the system default printer.

Eventually I found advice to close firefox and manually edit prefs.js. I did do that, and I found a bunch of print settings for all the configured printers on my system. I just deleted all print-related entries in prefs.js except this one:

user_pref("print.save_print_settings", false);

Now firefox behaves as I expect it. It defaults back to the system default printer and default settings every session, and if I change the system default printer, that change is reflected in firefox, too.

I'm surprised I didn't find an obvious KB article or other top web hit for "firefox default printer".