
Despite all of those wins, sup currently has many drawbacks, and I don't recommend it for everyone. (And I mean everyone who thinks that the above are good ideas and are interested in using it; plenty of people, I'm sure, already think everything about this is idiotic, not new, or inferior to their preferred MUA. That's fine! You can ignore it all.) Here's what's still problematic:
- Sup has no folders, a la Gmail. After watching many friends and even fellow hackers switch to Gmail, I have to admit: this literal hierarchical organization thing doesn't scale. I was planning to totally redo my mail folder system Any Day Now for about six months prior to starting on this. It was never going to happen.
- Sup uses a Ferret full-text index to make this approach plausible. Search is super fast and beats (for me) both any kind of "organization" I could have disciplined myself into and the fine-grained control of something like mutt's search. It's sort of like git: until you do it, you don't realize how much more productive you can be when previously-expensive operations become instantaneous.
- Sup works with threads, not messages; this is another thing Gmail got right. I used to waste brain cells thinking about which messages in a thread were worthwhile enough to save or not. Given the absurdly cheap price of disk relative to what we can type out in plain text since, like, a decade ago, this is crazy. In the index, I only have to look at whether a thread has new chatter or not, not its size, shape, or where the new messages are relative to it. All that's in the thread-view buffer where I actually read content.
- Sup is written in Ruby. Back in the dawn of time, I used Gnus, and while I wasn't very good at elisp, the hackability afforded by being written in a high-level language was very nice compared to programs mostly implemented in C (even if they had a tacked-on scripting language). Plus, I love Ruby right now.
So, if you're interested enough that you want to deal with these warts for now, apt-get install sup-mail (as soon as it hits the archive) and join us! Hopefully being in Debian will increase the userbase and get things fixed faster. If you're unsure, stay tuned for the next-generation version later. (There are screenshots and a few introductory docs over at Rubyforge that illustrate and explain all this in more depth, which I recommend checking out if you're still saying, "...huh." Me, I'm a sucker for any piece of software with a manifesto.)
- At version 0.6, sup is very much not-yet-1.0. While it handles insanely large amounts of email without breaking a sweat, I still keep an additional backup of everything. (If Ferret crashes, the original copies of mail will be untouched, but it never hurts to be paranoid.)
- The flow of data from your physical mail store to the sup index is currently one-way only. Actually removing deleted/spam messages is a big hack (if it works at all), and labels/flags/etc live entirely in Ferret-land. If you want to manipulate an actual mailbox, mutt is still the tool for the job (and then, you need to re-sync sup). This is probably the deal-breaker for most of us. I jumped in anyway because I feel like it can be solved (or more likely, made irrelevant) later.
- William (upstream) is currently re-designing the whole thing from scratch, replacing the index library with Sphinx, and decoupling the index from the console frontend. As a result, the previous item is pretty much a non-priority (and bugs in general are not going to get the same amount of love as usual). I am hoping that we end up dumping mail into the index directly, then writing more frontends to write to Maildir backup, serve as webmail/whatever, but this is a long way off. On the plus side, thanks to Thrift, they will not be limited to Ruby.
- Ruby's ncurses library still doesn't handle Unicode correctly. It can be patched (still doesn't work totally right), but I'm trying to find a more permanent solution for Debian.
I’ve ordered some USB charging leads for various portable devices, mainly because I’ve already got mains-USB and car-USB power adapters (they came with a bluetooth headset that charges from USB) and I agree with things like this:
“management of an individual charger for each device is becoming a pain in the backside. Since the USB power form specification is a standard, ANY charger with sufficient load capability should be able to charge ANY device.” (from USB As A Power Source)but I’ve also heard that charging from USB is greener - or more precisely that because your computer’s power supply is running anyway, it uses less electricity to plug battery chargers onto the Universal Serial Bus than to plug in “wall-wart” DC adapters. But is this claim true? Claims from USB recharging product sellers concentrate on the obvious “less waste compared to disposable batteries” strength, although some smarter chargers cut power to charged devices - it’s not clear whether the mass-market USB battery chargers do this, but the reasons and the electronics don’t look that complicated. China (not famous for environmental protection yet) now requires USB-charging of mobile phones while a mobile phone industry body has recommended the same approach in general. However, there are concerns about whether Power over Ethernet is making networks less green, which might be true for USB if devices demand more high-power sockets and device makers don’t include intelligent control electronics (which people generally don’t want to pay for). Is USB charging greener than mains charging? I’m not sure and I haven’t found any great answers - can you? I guess in the worst case, I can try some tests with a power meter later…
When you have a server on the Internet, you get lots of "brute force"
attacks on the SSH daemon, trying plausible logins with a variety of
passwords. Even with good passwords, these attacks might eventually
succeed (and they're annoying even when they don't), so you want to
thwart them.
One way is to use fail2ban, a script that monitors the failed
connections, and sets up firewall rules (for instance) blocking
further connections from the attacking IP addresses. It's good, but
it fills your logs with messages about IPs getting banned and unbanned
after a while. And you're still at risk that the multiple connections
crash the SSH daemon, or trigger a bug in it, or whatever.
A second layer of protection can be to block all SSH connection
attempts except when they come from known IP addresses, but that
doesn't work when you're away from home, and you're locked out. Been
there, done that.
So, some wise people have devised a trick called "port-knocking".
It's similar to only opening the door to people who use a special
knock (think "That's all, folks"): the firewall stays closed, but it
opens a tiny targeted hole to some IP addresses for a limited length
of time, based on a secret handshake. The window for attack is
therefore very small, and the SSH daemon stays idle most of the time.
And you can still log on your hosted server when you're attending
conferences. There are a variety of implementations for this concept.
Some could be web-based (you need to submit the right password to a
web page), some could use other services or a dedicated daemon.
But when I started investigating port-knocking, I wanted something
simple, preferably with no dependencies on a daemon that would need to
be exposed to the net and potentially crash. I found an
article on the
Debian Administration
website, but I wasn't entirely satisfied with it. The principles
appealed to me (netfilter-only, secret handshake in the form of
opening connections to secret ports), though, so I evolved it into my
own implementation, which I proudly present to you today.
The goals of this implementation were:
dc
to be installed, for big-integer arithmetic):
Okay. So this function calculates ports, now what? Now we're going to define a few chains by which netfilter will store states of IP addresses as they progress through the handshake:calc_knock_ports () secret=$1 bottomport=$2 topport=$3 nbports=$(( $topport - $bottomport + 1 )) hash=$(TZ=UTC date +%Y-%m-%d-%H-$secret md5sum awk ' print $1 ' tr a-z A-Z) num=$(echo 16i $hash f dc) pk_port1=$(echo $num $nbports 0 ^ / $nbports % $bottomport + f dc) pk_port2=$(echo $num $nbports 1 ^ / $nbports % $bottomport + f dc) pk_port3=$(echo $num $nbports 2 ^ / $nbports % $bottomport + f dc) pk_port4=$(echo $num $nbports 3 ^ / $nbports % $bottomport + f dc) pk_port5=$(echo $num $nbports 4 ^ / $nbports % $bottomport + f dc)
These chains use thesetup_portknocking_tables () iptables -N portknock_into_phase1 iptables -A portknock_into_phase1 -m recent --name PK_PHASE1 --set # iptables -A portknock_into_phase1 -j LOG --log-level notice --log-prefix "INTO PK_PHASE1: " iptables -N portknock_into_phase2 iptables -A portknock_into_phase2 -m recent --name PK_PHASE1 --remove iptables -A portknock_into_phase2 -m recent --name PK_PHASE2 --set # iptables -A portknock_into_phase2 -j LOG --log-level notice --log-prefix "INTO PK_PHASE2: " iptables -N portknock_into_phase3 iptables -A portknock_into_phase3 -m recent --name PK_PHASE2 --remove iptables -A portknock_into_phase3 -m recent --name PK_PHASE3 --set # iptables -A portknock_into_phase3 -j LOG --log-level notice --log-prefix "INTO PK_PHASE3: " iptables -N portknock_into_phase4 iptables -A portknock_into_phase4 -m recent --name PK_PHASE3 --remove iptables -A portknock_into_phase4 -m recent --name PK_PHASE4 --set # iptables -A portknock_into_phase4 -j LOG --log-level notice --log-prefix "INTO PK_PHASE4: " iptables -N portknock_into_phase5 iptables -A portknock_into_phase5 -m recent --name PK_PHASE4 --remove iptables -A portknock_into_phase5 -m recent --name PK_PHASE5 --set iptables -A portknock_into_phase5 -m recent --name PK_ESTABLISHED --set # iptables -A portknock_into_phase5 -j LOG --log-level notice --log-prefix "INTO PK_PHASE5: " iptables -N portknock_accept iptables -A portknock_accept -m limit -j LOG --log-level notice --log-prefix "ACCEPTED AFTER PORTKNOCKING: " # iptables -A portknock_accept -m recent --name PK_PHASE5 --remove iptables -A portknock_accept -j ACCEPT iptables -N portknocking
recent module, which seems to be commonly
available in standard kernels. You'll notice how, as one packet goes
through these rules, its originating IP address moves from one set of
"recent" addresses to the next. But no logic exists yet to make the
packet actually go through these rules, so here comes the glue:
Right. This function adds rules to therefresh_portknocking () calc_knock_ports f00b4r 10000 10999 iptables -F portknocking iptables -A portknocking -p tcp --dport $pk_port1 -m state --state NEW -j portknock_into_phase1 iptables -A portknocking -p tcp --dport $pk_port2 -m state --state NEW -m recent --rcheck --name PK_PHASE1 --seconds 5 -j portknock_into_phase2 iptables -A portknocking -p tcp --dport $pk_port3 -m state --state NEW -m recent --rcheck --name PK_PHASE2 --seconds 5 -j portknock_into_phase3 iptables -A portknocking -p tcp --dport $pk_port4 -m state --state NEW -m recent --rcheck --name PK_PHASE3 --seconds 5 -j portknock_into_phase4 iptables -A portknocking -p tcp --dport $pk_port5 -m state --state NEW -m recent --rcheck --name PK_PHASE4 --seconds 5 -j portknock_into_phase5 # echo clear > /proc/net/ipt_recent/PK_DONE echo clear > /proc/net/ipt_recent/PK_PHASE1 echo clear > /proc/net/ipt_recent/PK_PHASE2 echo clear > /proc/net/ipt_recent/PK_PHASE3 echo clear > /proc/net/ipt_recent/PK_PHASE4 echo clear > /proc/net/ipt_recent/PK_PHASE5
portknocking chain. A
packet injected into this ruleset will, depending on its destination
port and whether its source IP address has already been seen, end up
in one of the PK_PHASE* sets. All we have to do now is therefore to
send some packets to this portknocking chain, and use the
port-knocking sets to decide whether to accept incoming connections or
not:
This example only mentions accepting incoming SSH connections, but it's in no way a limitation: a server of mine uses similar rules to DNAT certain ports to internal IP addresses. And there we have it for the server part: incoming SSH connections are usually ignored (well, handled by the rest of the firewall script, but let's assume that it drops these packets by default), but if one IP address knows the appropriate ports and sends a connection attempt to them in order, then it'll be able to open SSH connections for a little while after that. Of course, it's going to be boring if one has to send these packets by hand, but it can be easily automated by a script. Here's aiptables -A INPUT -j portknocking iptables -A INPUT -m recent --rcheck --seconds 5 --name PK_PHASE5 -m state --state NEW -p tcp --dport ssh -j portknock_accept
~/bin/portknock.sh I have:
It's designed to be called with two parameters, a host and a port, and it needs#! /bin/sh host=$1 port=$2 calc_knock_ports () [...] calc_knock_ports f00b4r 10000 10999 for i in $pk_port1 $pk_port2 $pk_port3 $pk_port4 $pk_port5 ; do nc -w 1 $host $i < /dev/null > /dev/null 2>&1 done nc $host $port
netcat in addition to dc. Why the last line, I hear you
cry? Because then I can just add the following lines to my
~/.ssh/config:
...and SSH will automagically tunnel its network socket through the script, which will in turn happily tunnel that throughHost blahblah IdentityFile foobar ProxyCommand /home/roland/bin/portknock.sh %h %p
netcat after
completing the secret handshake.
And when I type ssh myserver on my laptop, interesting stuff happens
behind the scenes, and a special, just-for-me hole is opened in the
server firewall, just for the few seconds I need to establish the SSH
session (packets belonging to established TCP sockets are allowed by
the firewall's connection tracking).
Note: This article is deliberately short on details and
ready-to-run scripts. Firstly because firewall scripts vary wildly so
any script would have to be adapted anyway, but mostly because
security is best handled with one's brain switched on. Fiddling with
a firewall can easily open gaping holes or lock everyone out. So
please make sure you understand what goes on before blindly pasting
stuff into your own setup. Some of the lines that are commented out
may also be of interest, and were left as an exercise for the reader.
Other lines were not included, and are also left as a rather important
exercise to the reader; note in particular how the netfilter rules as
currently established do not mitigate the replay attacks...
I found an interesting but old analysis from Don Stewart about trends in the tiling window manager market.
I was curious so I tried to make it again to see the result 8 months later.
I took the vote data rather than installed, because it's more accurate: it tries to count people who use the software rather then people that just installed it. And we all know that installing a software does not mean you're using it.
awesome is rising fast. It has overtaken larswm and xmonad very quickly. Now it seems it just kicked wmii out of the game, and the next target will be the famous ion3, which should be deprecated in some weeks.
I'm very impressed. I never though it will happen that way. That stats, so it means anything you want them to mean, but I think it's very cool anyway.
I think that the next thing to do is to beat the floating-only window manager like the *box, etc An interesting challenge, so stay tuned!


Now that Tim Connors has taken the lid off
it, I feel I should opine on the matter.
Microblogging is just not terribly exciting for the reader. I don't see the
point in aggregating it.
I don't particularly find Mikal's
blatherings terribly exciting reading. I don't find Stewart's twitterings much fun
either. I think Facebook's status updates are a better way to poll such
things, myself, and it's where I confine my "microblogging" to.
I think one of the things that used to make reading blogs more worthwhile
than reading mailing lists was the high signal-to-noise ratio. Back in the
day, there was a bit of a "cost" or barrier to entry for writing a blog
post. For most blogs, it wasn't as easy as writing an email. I still
hand-craft my blog posts in HTML, so for me to write something, I have to
have enough inclination to fire up an editor and write the words. Often I
run out of motivation half way through a blog post, and just end up
scrapping it. I'm sitting on a few more lengthy posts that I haven't managed
to summon up the energy to write at all yet.
I think some of the "push-button publishing" out there is rapidly
commoditising blogging, to the point where it becomes as easy or easier than
writing an email. And we all know what happened to email...
Blogging for me is essentially a journal. I like to use it to refer back to.
To share what I'm doing with others. Occasionally it can be cathartic. Often
it's a substitute for going to work and telling my co-workers about what
crazy geeky thing I've done in my spare time. Mostly it's for me. The fact
that I choose to share it with the world is not really a primary
motivating factor for me, it just makes it more accessible for me, and
sometimes helpful for others.

It's only slight pain relief, but it's something. You can also not install certutil, and click through ten million dialog boxes to import it, but screw that. UPDATE: A commenter points me to StartSSL, another service that may deserve a look here, and is on Mozilla's good side. It appears to be an unholy mix of things that sound awesome (client-side certs for OpenID, web-of-trust identification) and things that seriously skeeve me out (trademark symbols everywhere, Aladdin dongles). They, uh, also have a Linux distribution. No, really. UPDATE 2: James Andrewartha points out that we should eventually see Mozilla move this stuff out of libnssckbi.so and into SQLite, which sounds like a big win for us. Hopefully before that time I will figure out how to get sqlite(1) to work on my cookies.
- apt-get install libnss3-tools
- certutil -d $HOME/.mozilla/firefox/$HLAGHLLAGHGAAHLGALHHGHLAGH.default -A -n 'CA Cert Signing Authority - Root CA' -t CT,C,C -i /etc/ssl/certs/root.pem

![Empty Meeting Platform [Meeting Room]](http://mjr.towers.org.uk/writing/reflections/attachments/platform_empty.jpg)
(Guess I arrived early.)
Dear Reader,
I'd like to read any opinions on these three:-
1. when I get new information about a story
I've already written about, should I make it
a new blog post and/or add it to the old
post or something else?
For example, I've got new links about the
Yahoo's good anti-spam actions
which is sort-of linked to last week's
spammer registrar post.
2. what should I do with links to sites where
I've commented? Should I make a new feed like
my bookmarks feed,
silently ignore them, or something else?
Last time I did a link post,
mildly irritated comments followed on
one of the planets.
3. Tonight is my first full
Kewstoke village council
meeting.
Main (non-routine) topics include
Sand Road Lay-by, Crookes Lane Memorial Seat,
the newsletter,
replacing the gazebo on the village green,
coopting more councillors,
completing the Crookes Lane Footpath,
the 2007-08 accounts
and reviewing the Sand Bay Management Plan.
Any comments on any of those?
What’s the difference between bad usage of PowerPoint in lectures and bad lectures that involve hand-outs, overhead transparencies and writing on the chalkboard? Are we just complaining about old wine in new bottles here? Is the real culprit professorial droning at classrooms of 200+ students followed by recite-repeat-and-forget examinations? I think it’s at least plausible that the technology is just giving us a new reason to pay attention to a pedagogy whose effectiveness has been suspect for two generations.I dare say I’m among the last doctoral students who was “trained”—and I use that word loosely—to teach prior to the widespread use of PowerPoint. Four years of full-time in-classroom experience, mostly with small lectures and seminars, has brought me basically to agreement with Burke on this point—complaints about PowerPoint essentially boil down to complaints about either instructional laziness or the whole nature of lecturing, or as a Burke commenter puts it, ”[e]xactly how does one teach even 80† students at once without succumbing to passive data transfer?” The non-use of PowerPoint or some other form of instructional technology seems to me to be a luxury confined to those who only teach small seminars and graduate students, and while my personal career aspirations lean in that direction the reality is that I’m several years away (in terms of research productivity) from being there—if I ever get there. Burke in his comments hits the nail on the head, I think, when it comes to any sort of visual presentation in class:
It seems to me that the absolutely key thing is to avoid speaking the slides literally. They’re best as definitions, key concepts, images: the kind of thing you’d stop your flow of lecturing to write on the chalkboard. They’re not the lecture itself.I think there are three useful aspects to a lecture: what you put on the board (or slides), what you say, and the general outline. If you’re preparing a handout or something to stick on Blackboard for students, the outline or outline-plus-slides is what they need, along with space to fill in the gaps. An alternative approach is to make the slides/board material the outline; several of the more effective teachers I had (my high school history teacher and a political science professor at Rose-Hulman) took that approach. But you can’t shovel your script into PowerPoint and expect that to work well, any more than you’d expect that writing it up on the board, or for that matter reading a paper verbatim at a conference would be a good presentation, to work. All this discussion leaves aside the question of teaching anything that involves symbols (chemistry, mathematics, statistics) which I think requires a different approach than bullet-points. In class, mathematics and statistics (and, by extension, social science research methods courses) lend themselves to a combination of “passive” PowerPoint-style presentation and more spontaneous problem-solving and brainstorming; for example, one of my early activities is to have the class try to operationalize (define in terms of a measurable quantity or quality) a concept like “globalization,” which you can’t really do with a static slideshow even though you can define terms like “operationalization” that way. Similarly, while you can step through the process of solving a problem in a slideshow I think it’s more effective to demonstrate how to step through the process on the board. Unfortunately, many classrooms aren’t set up to allow you to present and use a board simultaneously; some of TAMIU‘s lecture halls have a nice design where the projection screen is above the board, so you can write on the board without having to do anything special with the slideshow, but rooms most places are designed for “either-or” which can be a real pain—fiddle with the control system to blank the screen, raise the screen, write on the board, then lower the screen, switch the screen back on. After a few iterations of that in a single class, you’ll never do it again. I freely admit I haven’t figured everything out yet; my current methods slides are pretty good lecture notes but pretty rotten for projection. One of my projects for this summer (postponed from last summer after I learned I wouldn’t be teaching any methods courses this year) is to work on my research methods lectures to incorporate advice from Andrew Gelman’s book so I can lay the groundwork for my
* I use “PowerPoint” as shorthand for the use of a computer-projector based slideshow-style sequential presentation of items associated with a lecture, a technique obviously made famous by the Microsoft software package but also available with many other software packages such as Apple’s Keynote, OpenOffice.org Impress, and several PDF viewers including Adobe Reader, xpdf, and GNOME‘s Evince.
† I’d put the cutoff significantly lower, at around 30–40 students. Beyond that point, one might as well just blow the cap off the class.
‡ By the way, it’s nice to see Michelle’s blog back from haïtus! (Where else would I keep up with current Mexican politics?)
| 2005/06 | 2006/07 | 2007/08 | |
|---|---|---|---|
| number of (partial) days | 25 | 17 | 29 |
| Damüls | 10 | 10 | 5 |
| Diedamskopf | 15 | 4 | 24 |
| Warth/Schröcken | 0 | 3 | 0 |
| total meters of altitude | 124634 | 74096 | 219936 |
| highscore | 10247m | 8321m | 12108m |
| # of runs | 309 | 189 | 503 |
My rogue memory wasn't so rogue after all. Kyle and Joel helped find some
evidence
of gaming activity, and now I've found all the details in my mail archives
of the trip, and also attending CSLUG, in February '97. Turns out that I do
remember the other part of the trip, which was visiting Anna at Swarthmore.
Nice to have electronic archives, as the meat ones fade away..
Anatomy of a Murder. David Denby put it best:
Although there are some distinctions between a murder defense in the 1950’s in the Upper Peninsula of Michigan and modern-day patent litigation, the essence of trial technique is really not all that different. Highly recommended.Otto Preminger s Anatomy of a Murder, from 1959, is still the best courtroom drama ever made in this country, and, in its occasional forays out of the court, among the finest evocations of place an Upper Peninsula Michigan resort area in the off-season, leafless, underpopulated, alcoholic, and forlorn. James Stewart, in one of his wonderful melancholy late performances, plays a former county prosecutor named Biegler, a lifelong bachelor who now spends his time with a non-practicing lawyer (Arthur O Connell) and an unpaid secretary (Eve Arden), who sticks around for the wisecracks. The movie is leisurely, detailed, realistic, intensely companionable; you get a sense of how people exist at the margins of a profession without losing their dignity.
Prosecutor: Lieutenant Manion, wasn’t your action against Barney Quill much the same thing as your action against Miller or the Lieutenant you slapped at the cocktail party — all done in the heat of anger, with a willful, conscious desire to hurt or kill?
Defendant: I don’t remember my action against Quill.
Prosecutor: How long had you known your wife was stepping out with Quill?
Defendant: I never knew anything like that. I trust my wife.
Prosecutor: You just occasionally beat her up for the fun of it, I suppose?
Defense Counsel: There has been nothing established to permit a question like that. He keeps trying to insinuate without ever coming to the point. Let him ask the Lieutenant, did he ever beat his wife.
Judge: I will sustain the objection. Do you want to re-phrase your question, Mr. Dancer?
Prosecutor: No thank you, Your Honor. I’ve finished.Technorati Tags: Otto Preminger, Anatomy of a Murder, David Denby
I've never bothered to learn the gory details of shell scripting. This is somewhat embarrassing for me, although at the same time I don't feel like I've really suffered for the decision. I know enough of the basics to do some cool things (for loops, if tests and whatnot) but the the syntax is fraught with such problems that it feels like a waste of time to do more. Obviously, others have felt similarly, which is why perl was invented. ... So if Ted's right, and a year from now git is easier to use, better documented, more featureful, and runs well on Windows, it won't be that hard to switch over and preserve history. Ted's the sort of person that usually is right, so maybe I should starting looking at hg2git right now.
Next.