Sunday, December 30, 2007

Ubuntu DVD

Playing DVD's in Ubuntu isn't too difficult (see the Ubuntu doc or howto). I got good results from VLC. From there k9 can make an ISO of a movie if you need to back it up. Gnome can then burn the ISO to a DVD+R.

Friday, December 21, 2007

alpine

I can use pine again! Sort of. With alpine I can use a pine-like mail client and not have to worry about the undesirable license. Thanks slashdot.

vi query replace

I believe that emacs is ultimately more powerful than vi because it is written in Lisp and allows you to modify how it works on the fly. However, vi is smaller and faster -- sort of for the same reason -- and I prefer to use it for quick edits. In emacs I often M-% to query replace. So it's about time I found out how to do the same thing in vi:
: %s/foo/bar/gc
It's a lot like sed except for the c option which sed doesn't have since it's non-interactive by definition:
$ echo "I like unix" | sed s/i/u/
I luke unix
$ echo "I like unix" | sed s/i/u/g
I luke unux
$ echo "I like unix" | sed s/i/u/gi
u luke unux
$ echo "I like unix" | sed s/i/u/gc
sed: -e expression #1, char 8: unknown option to `s'
$
Think of the c as confirm.

Tuesday, December 18, 2007

https overview

I. If you're making your own numbers:

You just need a certificate and a private key. These can be encoded in one PEM file. It's easy to make your own PEM file with your own self-signed cert on a vanilla RedHat apache:
cd /etc/httpd/conf/
make host.domain.tld.pem
mv host.domain.tld.pem ssl.crt/
Just be sure to edit ssl.conf to reference the new cert. You can replace:
 SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
 SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
With just:
 SSLCertificateFile /etc/httpd/conf/ssl.crt/host.domain.tld.pem
and then restart apache.

II. If you're buying numbers:

You'll probably be asked to:
  1. Generate a .key
  2. Generate a .csr
  3. Give the CSR to the company and get back a .crt
Then have your httpd.conf reference the above respectively with the mod_ssl directives:
  1. SSLCertificateKeyFile /usr/local/ssl/private/verisign.key
  2. N/A
  3. SSLCertificateFile /usr/local/ssl/certs/cert.crt
Once you have your cert you can look it over and see relevant things like how long it will be valid for with:
openssl x509 -noout -text -in cert.crt
Note that you might also run into intermediate certificates. Which Apache can reference with either of the following directives:
 SSLCertificateChainFile /usr/local/ssl/certs/intermediate.crt
 SSLCACertificateFile /usr/local/ssl/certs/intermediate.crt
depending on your version of Apache.

Duke NFS Slides

I found some nice slides on NFS from Duke.