Wednesday, April 9, 2008

Convert .flac files into .mp3

In order to convert .flac to .mp3, you'd need to do the following: first cd into the directory with the .flac files, then
for x in *.flac ; do OUTF=`echo "$x" | sed s/\.flac$/.mp3/g` ; flac -c -d "$x" | lame -m j -q 0 -V 0 -s 44.1 - "$OUTF" ; done

Friday, February 29, 2008

Default charset in apache (2)

Yep, so getting back... apparently I've missed some important hint:


http://www.apache.org/dist/httpd/CHANGES_2.2

This file contains a paragraph I missed:

Thursday, February 28, 2008

Default charset in apache

Darn! I finally got over my problem... so let's get back to the very beginning...

I use apache 2.2.4. I've been using it without a problem for a long time. My needs for apache are very basic: I just need tons of directory listings (indexes) with the ability to follow symbolic links, and ~10 aliases. The files in the directory listings are on my local computer and they usually have "weird" encodings, so I needed to let apache know I need it to use UTF-8 as default charset/encoding. Simple to achieve... or so it seemed: I used to run apache installed via aptitude under /etc/apache2.

Wednesday, February 27, 2008

Webmin in FreeBSD

Webmin installation in FreeBSD is pretty straightforward:

pkg_add -rv webmin
echo 'webmin_enable="YES"' >> /etc/rc.conf
/usr/local/lib/webmin/setup.sh
/usr/local/etc/rc.d/webmin start

Tuesday, February 26, 2008

Apache...

For a wealth of apache documentation: apache.org httpd docs. (Just change '1.3' in the URL into '2.0' or '2.2' for different flavors.)

Note to self: RTFM.

Basic apache configuration in FreeBSD

So I decided to try out apache in FreeBSD...
pkg_add -rv apache
vi /usr/local/etc/apache/httpd.conf
Added the lines:
ServerName www
BindAddress *
Supposing my hostname is dvorak, I need to edit
vi /etc/hosts
and add the line:
127.0.0.1 dvorak

procfs and loadavg

I think that one of the biggest problems somebody with a Linux background faces with FreeBSD is having gotten used to procfs.

Sendmail: Maildir format

Here's a quick one: on FreeBSD, how to configure sendmail to deliver mail in Maildir format?

...Using procmail for this example.

PACKAGESITE

Coming from my Linux background, I expected that after installing FreeBSD and choosing my geographical location – and, most importantly, choosing a local FTP mirror for the bootonly install CD –, somehow the system would "guess" that I'd want to keep the same location when doing further package installs - with pkg_add for instance. Unfortunately, pkg_add goes to the default ftp://ftp.freebsd.org package location and it can take a long time to install a package with lots of dependencies.

After fiddling around I found out there's an environment variable called PACKAGESITE that instructs pkg_add to go to a "package site" designated by the user.

dpkg-reconfigure locales...

"Open source features" take N+1 :-)

On a Debian system,
sudo dpkg-reconfigure locales
would prompt you with a nice menu allowing you to select new locales... Unfortunately, this is not the case with Ubuntu. You just get to generate or update the already selected locales. This is actually an Ubuntu bug, confirmed (with status: wishlist).