Weblog von admin

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:
http://www.g-loaded.eu/2009/05/07/descramble-passwords-from-gftp-bookmar...

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.

a2ensite YOURSUBDOMAIN

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):

#!/bin/bash

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:

http://localhost:9001/hmc/hybris;tenantID=junit

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

the same works for plattform init:
http://localhost:9001/platform/init;tenantID=junit

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 1.12.0.2 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:
app/code/core/Mage/Catalog/etc

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)
MsgBox(a)
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)
else
StrSplitArray = "#NV"
endif
End Function

Function StrSplit(s As String, SplitChar As String)

Seam / Richfaces ReRender function and Internet Explorer IE 9

Cause of some jQuery issues Seam / Richfaces ReRender Function does not function propertly on IE 9.
Richfaces version
3.3.0

can be updated with the attached files. FIx is the Javascript file AJAX.js for later version (fix found http://stackoverflow.com/questions/4916327/javascript-replacement-for-xm...)

This Jar File is the updated Version, which should fix all IE related issues.

Inhalt abgleichen