Monday, October 30, 2006

Streamripper

For all of your streaming audio ripping needs... Streamripper works, give or take a few seconds off either end of the audio. If this annoying misbehaviour happens to you, you'll have to get down and dirty with the options. And remember kids, installing it is a simple sudo apt-get install streamripper on Ubuntu! The manpage is helpful, with a lot of examples for common slip-ups.

Links:

Compression: gzip, zip, bzip2

Which compression tool is the best? Of course, there is no "best tool" -- there are different tools for different jobs. It won't matter for compression of trivial data which method you choose, but when you start handling gigabytes of data, it might be prudent to check some of the following links. This is just a sample of all the compression algorithms out there, of course, and is skewed towards ones used more often on Linux.

General info links (to Wikipedia):

  • Data compression
  • ZIP -- .zip extension, zip and unzip commands; analogous to tar and gzip; used more on Windows
  • Gzip -- .gz extension, gzip and gunzip commands
  • Bzip2 -- .bz2 extension
Comparison links:

PGP, especially GnuPG

You're a paranoid freak that thinks that everyone is out to get you. Good, because they are if you live in the freedom-loving US of A. Therefore, you need to somehow encrypt your messages to make sure that only yourself and the intended recipient see the message. GnuPG to the rescue!

Very Short Intro to PGP:
PGP (Pretty Good Protection) uses public key encryption. Public key encryption uses a public key and a private key. A key generated by person A has both a public and a private component. Person A can distribute his public key freely, but his private key is protected by a passphrase that he and only he knows (hopefully) that was given at the time of the creation of the key. Others can use this public key to encrypt messages that only he can decrypt and read with the corresponding private key. Digital signatures work in the opposite direction. Person A can sign messages with his private key and others can authenticate that it was person A that sent it by decrypting the message with the corresponding public key. GnuPG is an implementation of this security scheme.

Options:
  • gpg --gen-key Create a key (all the default settings are fine); it will prompt for type of encryption algorithm (merits of each: DH vs RSA FAQ), keysize, key expiration date, name, comment and email, and finally, the passphrase used to protect your private key -- DO NOT FORGET OR GIVE OUT OR INSECURELY TRANSMIT YOUR PASSPHRASE!!! it will then generate some random bytes and ask you to play around with the mouse/keyboard while doing so to create more entropy
  • gpg --export -- export a key to a file (if you don't specify -o and a filename, it might corrupt the output on your terminal... just a warning); publish this for people to get your public key in order to be able to encrypt messages that you can decrypt with your private key
  • gpg -s <Data> to sign a document; this will create a <Data>.gpg file
  • gpg -se <Data> to both sign and encrypt a document; this will create a <Data>.gpg file
  • gpg -d <data> to decrypt the data; you can also specify a path with -o to redirect it to somewhere besides stdout
Links:

Utilities already installed on Ubuntu Dapper (6.06):
  • gpg -- Command line tool
  • gpgv -- Used to verify signatures against a trusted keyring
  • gpgsplit -- Split OpenPGP messages or keyrings into their component packets

Saturday, October 21, 2006

Linux PCI Wireless cards (and the bcm43xx driver)

It's a pain in the butt when manufacturers of PCI wireless cards don't release a driver to go with their hardware. Case in point: broadcom, whose card I purchased. Luckily, there is a hacked driver available from the community.

Links:

Note to self: whatever I do, do NOT use ndiswrapper for wireless drivers. All the kernel hackers tell me it's bad... and, they were right. I believe it attempts to load the Windows driver on top of a layer that enables the cooperation of the hardware and the Windows driver. When I tried to use it, it crashed GNOME. Grrr...

The jury's out on whether this actually works or not (I have yet to get this desktop in range of a usable wireless signal) but I can iwlist eth0 scan for stuff and get results back so I'm optimistic...

Update: this thing works (most of the time). Sometimes it will inexplicably lose the signal and I'll have to connect again. Not the biggest deal in the world, but still pretty annoying.

Monday, October 16, 2006

Databases: which one to chose?

A rundown of databases from a qualified source:
  • Oracle: everyone knows it, functionality for just about everything but doesn't do anything well
  • SQL Server: The poor man's Oracle: not as much concurrency, better user interface
  • Access: WORST!!!! No concurrency control
  • DB2: Faster than Oracle, UI tools and SQL is not as robust as Oracle's
  • Sybase: Good, but dying out because of market share
  • Informix: Very good, but bought out by IBM and integrated into DB2 (prof's favorite)
  • MySQL: Up until 5 no support for a lot of things like foreign keys and indexing, free
  • PostgreSQL: Robust database, free
  • There exist other, specialized databases for streaming data
The free ones: MySQL vs PostgreSQL:
  • MySQL:
    • Larger development community
    • Just a tiny bit friendlier
  • PostgreSQL:
    • 5 years ahead of MySQL (but MySQL is catching up fast)
    • Perhaps able to handle double the data?
    • Data type storage more optimized
    • Better for update-intensive work (writes)
Other advice:
  • Cache large/popular files: look at Apache's cache setup
  • Verify that files have type, non-virus integrity
Links:

Thursday, October 12, 2006

s5: an open-source alternative to Powerpoint

s5 is an open-source slideshow alternative (down with ppt!). It uses Javascript to drive the presentation of XHTML divs (which represent the seperate slides) and CSS to tie the view together. Here are some links:
Here's how to use it: All of the content is placed in a file at the root of the s5 directory (the example that comes with the .zip is called intro.html). Launch this in a browser to start the presentation. Another file to edit (if you want to customize the layout) is s5/ui/default/pretty.css. Otherwise, it's probably a good idea to leave the files alone if you value a working presentation.