Weblog von admin

pmd mass path change

Falls es mal zu folgenden Fehler kommen sollte, dann muss man die .pmd definition der XML orte aktualisieren.
Die Fehlermeldung lautet:
An internal error occurred during: "ReviewCode". Couldn't find the class Can't find resource rulesets/basic.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH.

und ist mit folgendem Kommand für die gesamte Projektstruktur zu beseitigen:

find . -name .pmd -exec sed -i.bak 's/rulesets\/basic.xml/rulesets\/java\/basic.xml/g' {} \;

GFTP Password descrumble

if you want to descrumble gftp passwords from the bookmark file you can use the command decode.py

you need to search for the password=$SOMETHING inside of the bookmark file. Than you code use the

decode.py \$SOMETHING

to decode the password. But keep in minde to escape the $ for shell users. You need to add a leading backslash to the password. Otherwise there will be no useful output.

based on the code of:

apache virtual hosts after update

if your subdomains got lost after updating your apache, this may be related to a new default setting.
To test this, you can try to enable your missing subdomain.


if you get a "ERROR: Site YOURSUBDOMAIN does not exist!" you should have a closer look to your /etc/apache2/sites-availble directory. If your files does not end with .conf they woundn't be found anymore.

if you want to rename them

find . -print0 -not -name "*.conf" | xargs -n 1 -0 -I {} mv {} {}.conf

and you should be able to a2ensite them again.

Analyse Image based PDF Files for Text content (great for Fax services)

If you have to analyse image based texted files (like from a fax or scanner), you could try to use a OCR software like tesseract. It works quite well and you can reorganise a complete new source for information.

For myself, i made a script to translate incomming faxes (pdf) files, convert them and store them in my wiki (as file annotated with the textual content). Searchable and semantic annotatable.

i simply use following commands (see attached file):


if [ $# -eq 1 ]; then

Java development with XML Files, Best practice

Developing with XML files could be aweful in Java. Thanks God they invented a toolchain which makes development easy again:

Create your destination XML File

use "trang" to konvert it to XSD File

usd XCJ to convert it to super clean JAXB Java code.

hybris view tenant data (for Unit - Tests Logs for example)

if you want to switch to the tenant for your JUNIT Tests you could add the tenantID parameter like this:


to your URL and review all the logs from junit tasks.

the same works for plattform init:

Magento WS-I Compliance mode, fixing the WSDL

If you try to generate code from the WS-I Compliance WSDL of the magento soap service you may run into the problem that:

{urn:Magento}[message:catalogProductAttributeRemoveResponse] not exist.

in Version 1.7.2 (CE) and Magento Enterprise this is not fixed.
I found a solution. Someone on stackoverflow fixed the wsi.xml and made a diff file. I did the same changes and added the file so you do not need to update the file by yourself.

file can be found under:

mysql utf8 convert

here a easy way to convert your mysql database to utf8:

mysqldump -u hybris -p --default-character-set=latin1 --skip-set-charset hybris > hybrisdump.sql
iconv -f ISO8859-1 -t UTF-8 hybrisdump.sql > dump_utf8.sql
sed -r 's/latin1/utf8/g' dump_utf8.sql > hybrisdump_utf.sql

mysql -u hybris -p --execute="DROP DATABASE hybris; CREATE DATABASE hybris CHARACTER SET utf8 COLLATE utf8_general_ci;"
mysql -u hybris -p --default-character-set=utf8 hybris < hybrisdump_utf.sql

Zebra / UPS Lp 2844 Label Printer To Work with UPS without cutting the Labels

of you try to get a LP2844 up and running on linux many people ran into problems, cause the labels got cuted before they really end. Solution is the tell cups to reverse the printing direction.
By default CUPS tries to get a normal paper direction for those labels, BUT in this case this is wrong.

So solution is swichting CUPS set the printing direction to 180 degree. Hope this help, took me ages to find this.

SPLIT funktion für OpenOffice

Hier ein Macro mit dem man auch in OpenOffice SPLIT nutzen kann:

REM ***** BASIC *****

Sub TestStrSplit
Dim a
Dim s As String
Dim i As Integer

s = "hello OOoBasic programmers, this is another solution"

a = StrSplitArray(s," ",2)
End Sub

Function StrSplitArray(s As String, SplitChar As String, Field As Integer)
Dim tmp
tmp = StrSplit(s, SplitChar)
if(UBound(tmp) >= Field) then
StrSplitArray = tmp(Field)
StrSplitArray = "#NV"
End Function

Function StrSplit(s As String, SplitChar As String)

Inhalt abgleichen