May 16, 2008 by jonmccune
Debian has a wiki page on the OpenSSL key generation vulnerability. To fix your SSH keys:
aptitude update
aptitude dist-upgrade # regular upgrade is not sufficient
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
If you have any public-key-based authorizations setup, delete the keys and start over.
Posted in Uncategorized | No Comments »
May 8, 2008 by jonmccune
I’m playing around with hosting my own little IMAP server to act as the repository in which I put all my old email I’m too stingy to delete. I ended up choosing Dovecot because it seems simplest, and because the only way mail will get into these folders is when I drag it there in my client. `aptitude install dovecot-imapd` did the trick, and even generated SSL certs by default (although they have localhost.localdomain as the machine name, so I will end up changing them).
I ran into one snag: mbox vs maildir. I have some of my really old email sitting in mbox files, so I chose mbox as my default folder format during installation. This turns out to add a few challenges: mbox folders cannot house subfolders. Thus, in Thunderbird, when I create a new folder, it becomes a message-housing entity if I name the new folder with letters and numbers, but it becomes a subfolder-housing entity if I name the new folder with a trailing ‘/’. This took some Google time to figure out.
It’s fine with me if I can’t have messages and subfolders in my own folders, with the exception of the Inbox. CMU apparently uses maildir format and so I’m used to all of my subfolders hanging off of the Inbox. I’m probably going to switch to maildir before I do The Import.
Posted in Computers | No Comments »
April 24, 2008 by jonmccune
Today I got sick of not being able to sanely copy and paste between Acrobat Reader and Emacs under Linux (Debian Etch + Gnome). The “automatic-copy” from selecting does not happen when in Acrobat, and the “Ctrl+V” version of paste doesn’t work in Emacs. This means it’s impossible to copy something from Acrobat and paste it in Emacs. My (pathetic) work-around is generally to paste into a draft email in Mozilla Thunderbird since it plays nicely with both types of copy-and-paste. Well, there’s a solution:
Add this to your .emacs:
(setq x-select-enable-clipboard t)
I take it back this doesn’t work consistently either. I hate computers.
Posted in Computers | No Comments »
April 14, 2008 by jonmccune
Today I discovered a very handy collection of sed scripts. I can attest that remccoms3.sed does in fact remove comments from C / C++ (and assembly if you use C-style comments). I used it like this:
cat asm.S | ~/remcoms3.sed | grep -v "^\s*$" | wc -l
to get a count of the number of lines in an assembly program that are not comments or whitespace.
Posted in Computers | No Comments »
April 13, 2008 by jonmccune
I’m going on a long bike trip (multiple days + camping in between) and I want to charge my GPS device and cell phone using some kind of solar device. I started looking around and found quite a few:
- Solio has a classic, hybrid, and magnesium edition.
- Soldius only seems to offer the Soldius 1, but it does not include an integrated battery.
- Megasol supposedly makes the Solar Energy Pocket Power (SEPP) but their website doesn’t support English.
- 21st Century Goods has an entire category for solar products.
Posted in Biking, Computers, Uncategorized | No Comments »
April 3, 2008 by jonmccune
I’ve been trying to learn a little more about Ocaml, since functional programming is so frequently marketed as solving a lot of today’s bad programming practices that lead to vulnerabilities and security problems.
I’ve been going through the Ocaml Tutorial but the instructions for building grtest1.ml were insufficient:
$ ocamlc grtest1.ml -o grtest1
Error while linking grtest1.cmo: Reference to undefined global `Graphics’
I needed to specify the name of the library I’m using:
$ ocamlc graphics.cma grtest1.ml -o grtest1
which on my Mac OS X system comes from /usr/local/lib/ocaml/.
Posted in Computers | 1 Comment »
April 3, 2008 by jonmccune
I often use emacs to keep notes, etc. in plain text files. One
of the formats I frequently use is the equivalent of a bulleted
list. I like to use the “auto-fill-mode” (Meta-q) to format
things nicely. However, my “bullets” (often, hyphens) sometimes
get misinterpreted. One failure mode is where they get treated
like any other character and folded into the paragraph. Another
is that emacs recognizes them as a “prefix” for a paragraph,
applying a bullet to the front of every line, even if one
bulleted item is long enough to wrap onto multiple lines.
Now, I haven’t figured out how to specify which behavior I want
with a command, but I found an explanation of what’s happening here.
Essentially, the first bulleted item needs to be multi-line to
teach emacs that bulleted items can sometimes be multi-line.
Posted in Computers | No Comments »
March 18, 2008 by jonmccune
Posted in Computers | Enter your password to view comments
March 17, 2008 by jonmccune
This time it’s a new rear wheel for the fixed gear. I’m using my old Suzue “1 B” hub (I think it’s an SIL-SP), which accepts 36 spokes (not 32, as I previously thought). The rim is an Alexrims DA22, which I got by disassembling the rear wheel of a wheelset I bought for Kathleen’s mom’s old bike, that Kathleen used to ride. The corresponding front wheel is currently spaced for a mountain bike fork. I’ll probably have more to say on here when I figure out what has to happen to adjust its width (i.e., can I just remove a spacer or two or is the hub just plain too wide?). I have 18 286mm spokes and 18 287mm spokes left over from disassembling the old rear wheel, but Dan Halem’s spoke length calculator tells me I need 282.7mm spokes for 3-cross lacing and 293.1mm for 4-cross lacing. This convinces me that the spokes I already have won’t work, although I’m tempted to try anyways to see what goes wrong.
There’s a good bit of Wheel Lacing Information at this site, including Spoke Length Tolerances and Fixes for Some Problems. Take-away messages seem to be that spokes are only too short if you can’t get them started. It seems that once they’re started there’s enough stretch and the threads are good enough that the wheel will be strong, even if some threads are showing. It’s harder to derive a rule of thumb for when spokes are too long, but the old rear wheel on my fixed gear had 2~3mm of spoke sticking beyond the end of the nipple (double walled rim + rim strip = no problem) and it never had a failure related to pulling through the nipple. Thus, I think visible threads sticking out the other side are also tolerable.
Posted in Biking | No Comments »
March 12, 2008 by jonmccune
I like using for loops in bash, but today I wanted to loop through a bunch of filenames that contained spaces. Thus,
for i in `cat goodones.txt`; do echo $i; done
will actually produce more lines of output than there are lines of input in goodones.txt.
This page had the solution: bash while loops.
while read i; do echo $i; done < goodones.txt
Posted in Computers | No Comments »