23.10.2009dvd::rip and gentoo

dvd::rip (or dvdrip at the gentoo repository) is a very comfortable ripping software to bring your DVDs on your harddisk.

When I emerged it and wanted to rip a dvd, I just got no result.

  1. the logfile showed no error
  2. in the status bar the text appeared Grab preview - title #3 Duration: 00:01 [Error]
  3. dvd::rip did nothing.

The chapter has been ripped and the file existed on the filesystem, but I was unable to transcode it or do anything else with dvd::rip.

A lot of googling did not provide the solution, but finally I saw that dvd::rip prints the exact command that is executed in the logfile, so I tried to run it manually to eventually see an error.

And then there was theerror:

convert: no decode delegate for this image format `/tmp/dvdrip24111.snap/snapshot001.png'.

I quick search with that showed me, that the problem was imagemagick, which obviously did not have png support. I added the USE-flag “png” to imagemagick in /etc/portage/package.use and re-emerged imagemagick.

Another problems was that transcode was missing the “mp3” USE-flag.

Since then dvd::rip just works!

23.10.2009Generate n rows from dual

I needed to generate exactly n rows and then this is very handy.

select * from (
select level lvl
from dual
connect by level <= N
)

Found at: http://awads.net/wp/2005/07/01/generating-n-rows-from-dual/

23.10.2009Using Pidgin with msn-pecan

Today when I was starting pidgin I could connect to ICQ, but when trying to connect to MSN Pidgin comes up with:

unable to retrieve MSN address book

So I was googeling a little bit and found a bug @ pidgin from yesterday. The problem is not pidgin, although the official MSN client and some others clients still work (e.g. meebo). There are several different versions of the MSN protocol, pidgin is using MSNP15. And exactly this protocol is currently not working on the server side @ Microsoft (as it seems).

Other clients are not affected as they switch to older version of the protocol, which are still working.

Because I don’t want to wait until MS fixed the problem, I use a quick workaround. As an alternative you can install msn-pecan.

With Gentoo this works (after adding “x11-plugins/pidgin-msn-pecan ~x86” to /etc/portage/package.keywords):

# emerge pidgin-msn-pecan

After the installation just restart Pidgin go to “Accounts” -> “Manage Accounts”. Select your MSN-Account, click “Modify”. Choose “WLM” as protocol. Save and reconnect your MSN account. Works like a charm!

23.10.2009Wie schreibt man eine Rede

Die letzten 2 Wochen habe ich mich intensiv mit einer Rede die ich an einer Geburtstagsfeier halten musste/durfte. :D

  • Dr. Ankowitsch nicht vergessen
  • Ein guter Einstieg um die Leute abzuholen
  • Wenn möglich etwas persönliches einbinden
  • Ideen für eine Rede kommen einem meist nicht wenn man vor dem Computer sitzt, sondern wenn man unterwegs ist, im Restaurant, im Gespräch etc. WICHTIG: immer etwas zu schreiben dabei haben.
  • Passt der Stil der Rede zum Anlass? (Wortwahl, Formulierung etc.)
  • den Mut haben, ganze Passagen zu streichen.
  • Zeitlicher Rahmen nicht sprengen, sonst hört niemand mehr zu
  • Schluss beachten, es sollte möglichst jeder merken, dass die Rede fertig ist.

23.10.2009IPA - Client Backup Services

Da es mir zu mühsam ist, die Arbeit in HTML zu konvertieren (werde ich vielleicht noch nachholen), hier die Arbeit als PDF: backup_services.pdf [4MB]

Viel Spass beim Lesen.

PS: Ja ich weiss sie hat viele Rechtsschreibfehler, evtl. auch mal einen inhaltlichen, aber: Nobody’s perfect!

23.10.2009Im Bus

Frau: lacht.

Ein Mann der neben ihr sitzt und sie offenbar kennt sagt: "Wie kannst du lachen? Deine Schwestern sind tot."

Stille.

23.10.2009Doom for Sysadmins

Das Projekt Doom for Sysadmins lässt Kinderträume wahr werden: Wenn man es startet findet man sich in der Doom-Welt (ja, der Shooter Doom) und kann alle Prozesse die auf dem System laufen “killen”, bzw. durch verwunden “renicen”.

Ach das Admin-Leben ist schön, den ganzen Tag schiessen und Räume voller Monster überprüfen. Sobalds zu viele sind: losballern!

23.10.2009Find old Files and their size

The first part is clear, find the old files like that:

find . -type f -mtime +365 -print

This gets all Files (-type f, -type d for directories) in the current directory (.) older than a year (-mtime +365) and prints them on stdout (-print)

to delet them, just use:

find . -type f -mtime +365 -exec rm {} \;

But if you want to use them further, a pipe will help you. For any reasons (I don’t know) this is not possible with the -print command. My Solution was the following:

find . -type f -mtime +365 -exec echo {} \;

Now, because there are possibly many many many files, it’s best to use xargs for the argument handling. I use du -ch to determine the file-size and the total:

find . -type f -mtime +365 -exec echo {} \; | xargs du -ch

This should help, Google helped me half-way out, the rest is a little command line magic.

Note: In my case there where really too many files, so that the whole command ended with a broken pipe. I used -type d to reduce the amount of arguments, the disadvantage is that directories are not necessary the same age as the files within.

21.10.2009ODBC Hell

It is so easy: I have a testing environement where an OCI8-Driver is installed. Therefore I can use the OCI-Function if PHP to Bind Variables, get return values and everything is just fine.

Then on the production I needed to switch to ODBC, and thought: Easy just write this stuff for ODBC and you’re done.

Unfortunately the driver does simply not support return values of functions. The problem is, that there are updates in my function, so I can’t solve the problem using:

select function_name(param1,param2,param3,...) from dual

After giving up my return value, I wanted to run the function like that (in TOAD this is no problem):

begin :retval := function_name(?,?,?,?); end;

Afterwards you are giving an array of parameter to the PHP function odbc_execute, and this should work alright.

I tried hundrets of possibilities to run my function. Finally I gave up, made a procdure (which has no return value and vor sure ODBC has no support for OUT or INOUT-Vars). I resigned to have a return value (which should only be the number of updated rows).

I tried: begin procedure_name(?,?,?,?); end;

There was no reaction. My last try:

call procedure_name(param1,param2,param3,..);

This woked! So I need to use “call” and not using the parameter-array of ODBC but giving it directly into the call. I’m happy to get it working, but this costs me one day.

Is there any really working ODBC-Driver for PHP?

I gave up.

PS: Yes I know, there is a solution for my return value. In my procedure I could write the value into a temporary table. But I rather want to use a good driver (like the OCI8) than using such a temporary solution. I’m open to new ways of doing this.


enabled: