Converting .flac to .mp3 in Linux

By Joao

flac -cd sourcefile.flac | lame -h - destfile.mp3

categoriaTechnology commento1 Comment dataMay 21st, 2010
Read All

Turn on query logging in MySQL

By Joao

Add the following to /etc/my.cnf:

log=/var/log/queries.log

Then restart mysqld.

All queries will be logged to that file. In MySQL 4.1 the log file must already exists beforehand. Check /var/log/mysqld.log during startup in case it’s not logging anything.

categoriaTechnology commentoNo Comments dataJanuary 7th, 2010
Read All

Cannot start Microsoft Office Outlook. Cannot open the Outlook window.

By Joao

Start->run..then type the following -> “Outlook.exe /resetnavpane”

categoriaTechnology commentoNo Comments dataDecember 3rd, 2009
Read All

Problem loading ssh keys remotely

By Joao

When I try to load my ssh-key from a remote location I get the message:

Could not open a connection to your authentication agent.

The way to get around this is to load a shell session inside the ssh-agent:


ssh-agent bash
ssh-add
ssh-add ~/.ssh/somekeyfile

categoriaTechnology commentoNo Comments dataNovember 16th, 2009
Read All

How to force yum to uninstall a package when you change it’s name

By Joao

Use the obsoletes tag in the specfile. This will cause “package-oldname” to be uninstalled before installing “package-renamed”.


Name: package-renamed
Obsoletes: package-oldname

categoriaTechnology commento1 Comment dataOctober 29th, 2009
Read All

Using dd to create large files

By Joao

An example of using dd to create a 1GB file.

dd if=/dev/zero of=testfile bs=1M count=1024

categoriaTechnology commentoNo Comments dataOctober 20th, 2009
Read All

How to temporarly ignore foreign keys in MySQL InnoDB.

By Joao


SET FOREIGN_KEY_CHECKS = 0;
SELECT @@FOREIGN_KEY_CHECKS;
SET FOREIGN_KEY_CHECKS = 1;

Alexander Stetsenko blog has more info about it.

categoriaTechnology commentoNo Comments dataOctober 19th, 2009
Read All

How to open a .eml file in Outlook 2007

By Joao

If you try to open a .eml file in Outlook 2007, it will create a new message containing the .eml file as an attachment.

In order to read .eml files from Outlook 2007, you need to pass the /eml argument to outlook.exe . This Microsoft kb article describes how to tweak the windows registry to accomplish this.

Essentially you need to edit the HKEY_CLASSES_ROOT/Microsoft Internet Mail Message\shell\open\command default value to :
“%ProgramFiles%\Microsoft Office\Office12\OUTLOOK.EXE” /eml “%1″

To revert back to using Outlook Express, set the value of the same key to:
“%ProgramFiles%\Outlook Express\msimn.exe” /eml:%1

categoriaTechnology commento1 Comment dataOctober 15th, 2009
Read All

Find largest files

By Joao

A little code snippet to show files ordered by size:

find . -type f -printf "%k %p\n" | sort -rn | head

categoriaTechnology commentoNo Comments dataOctober 13th, 2009
Read All

Apache2::Request rpm

By Joao

Not immediately obvious, but if you’re looking for an rpm to install the Apache2::Request module you need perl-libapreq2 (this works in CentOS 5 and I imagine others as well).

yum install perl-libapreq2

categoriaTechnology commentoNo Comments dataOctober 13th, 2009
Read All