Archive for September, 2005

Adding your ssh key to “authorized_keys”

Thursday, September 29th, 2005

As simple as that: cat id_*.pub | ssh servername “cat >> ~/.ssh/authorized_keys”

Fixing directory permissions with find

Wednesday, September 28th, 2005

Screwing directories and files with setgid bit: chmod -R 2775 photos

Fixing file permissions with find: find . -type f -exec chmod 664 {} ‘;’

PNG-24 Alpha Transparency With Microsoft Internet Explorer 5.5 or better (MSIE 5.5+)

Tuesday, September 27th, 2005

Just a few links:

PNG-24 Alpha Transparency With Microsoft Internet Explorer 5.5 or better (MSIE 5.5+)

PNG Files Do Not show Transparency in Internet Explorer

PNG in Windows IE

Problems mounting ipod on linux: end_request: I/O error,…

Tuesday, September 27th, 2005

Here is a nice explanation and how to fix the problem: LinuxQuestions.org- The iPod and the Penguin - LinuxAnswers

At the end, I enabled additional partiotion types and disabled the EFI. It seems to work now. CONFIG_PARTITION_ADVANCED=y CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y

CONFIG_EFI_PARTITION is not set

Starting and stopping DB2 server

Tuesday, September 27th, 2005

sudo su db2inst

Stopping DB2:

db2 force applications all
db2stop force

Starting DB2:

db2start
  • Here is a document describing how to use LDAP with a PostgreSQL database. (0)

Using COALESCE and NULLIF

Friday, September 23rd, 2005

(from one comment on postgresql.org): “I never found a good use for NULLIF, until recently. Now I use NULLIF to guard against divizion by zero. This is what my typical aggregate query looks like: SELECT COALESCE(SUM(cost), 0) / NULLIF(SUM(amount), 0) as average_price FROM sales”

Replacing NULL values with default values

Friday, September 23rd, 2005

SELECT COALESCE(description, short_description, ‘(none)’)

PostgreSQL: Documentation: Manuals: PostgreSQL 8.0: Conditional Expressions