sed is great, but not that great


It turns out, sed has no concept of a non-greedy match. You have to use perl or some other advanced tool to get that regex feature. The workaround given at Stack Overflow only works if you have a single character ending match delimiter (in this case, it was [^/]+ to match until the next forward slash).

monkeysphere project to add PKI to all the services

monkeysphere logo looks pretty cool. This project claims to want to apply the PKI web-of-trust to different services like web browsing and SSH. By querying the public keys stored on key servers, you wouldn’t need to guess that the remote site was providing their actual key the first time you connect, like you normally would when connecting to a new server or from a new client via SSH. You know what I’m talking about:

Yeah, that’s what I’m talking about. There’s no guarantee that the host you’re connecting to is the one you think it is unless you already know what the fingerprint is or you’re already using some other method for key exchange. The nice thing about this project is that they claim that there are absolutely no modifications needed to SSH to get this to work.

Link: monkeysphere

Seeing HTTP headers that a browser won’t show you

I learned today that tools like Firebug won’t display the headers on a file that would normally be downloaded (as opposed to say, displayed in a browser). The solution? The command line, of course. I wanted to make sure a web server was setting the right MIME type for an mp4 video.

curl -I

This will just show the headers, including Content-type, which is the MIME type.