convertToUtf.php

<?php
function convertToUtf($string) {
$string = str_replace("ü", "ü", $string);
$string = str_replace("Ãœ", "Ü", $string);
$string = str_replace("ö", "ö", $string);
$string = str_replace("Ö", "Ö", $string);
$string = str_replace("ä", "ä", $string);
$string = str_replace("Ä", "Ä", $string);
$string = str_replace("ß", "ß", $string);

return $string;
}
?>

Add embeded Flash video to your homepage

# download and extract Flowplayer
#wget http://flowplayer.org/releases/flowplayer/flowplayer-3.0.0.zip -P /tmp
wget http://flowplayer.org/releases/flowplayer/flowplayer-3.1.0.zip -P /tmp
unzip /tmp/flowplayer*.zip -d /tmp

# install
mkdir -p /var/www/video/player/
cp /tmp/flowplayer/*.swf /var/www/video/player/
cp /tmp/flowplayer/example/flowplayer-3.0.0.min.js /var/www/video/player/

# copy your videos to /var/www/video/

# add source to page

install Java database (JDBC) driver for MySQL

sudo apt-get install libmysql-java

# old, manuall installation
# wget http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz -P /tmp
# tar xzf /tmp/mysql-connector-java-5.1.6.tar.gz -C /tmp
# cp /tmp/mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar /opt/gwt-linux/

# LINKS
http://packages.ubuntu.com/feisty/libs/libmysql-java

Install Google Web Toolkit

#!/bin/bash

#URL=http://google-web-toolkit.googlecode.com/files/gwt-linux-1.7.1.tar.bz2
URL=http://google-web-toolkit.googlecode.com/files/gwt-2.0.0.zip

# download
wget ${URL} -P /tmp

# install
unzip /tmp/gwt-*.zip -d /tmp
rm /tmp/gwt-*.zip
sudo mv /tmp/gwt-* /usr/share

# GWT Designer
apt-get install xulrunner-1.9.2
http://dl.google.com/eclipse/inst/d2gwt/beta/3.7

# Links
http://code.google.com/p/google-web-toolkit/

Ubuntu MID USB boot

DEVICE=/dev/mmcblk0
IMG=ubuntu-8.10-mid-lpia.img
VOLUME=SDCARD_2GB

wget http://releases.ubuntu.com/8.10/${IMG} -P /tmp

mkfs.vfat -n ${VOLUME} ${DEVICE}p1
syslinux -f ${DEVICE}p1

install-mbr ${DEVICE}

mount ${IMG} /mnt/ -o loop
cp -a /mnt/* /media/${VOLUME}
cp -a /mnt/.disk/ /media/SDCARD_2GB
umount /mnt

sync
umount /media/${VOLUME}

# netboot
LABEL linux
MENU LABEL Ubuntu MID
KERNEL ubuntu-8.10-mid/casper/vmlinuz
APPEND initrd=ubuntu-8.10-mid/initrd.img boot=casper netboot=nfs nfsroot=192.168.1.2:/tftpboot/ubuntu-8.10-mid file=/cdrom/preseed/mid.seed p

GWT + MySQL + Netbeans Demo

# INFO
url : jdbc:mysql://localhost:3306/Bible
user: gwt-examples
pass: password

# create database and user
mysql -u root -p
create database Bible;
CREATE USER 'gwt-examples' IDENTIFIED BY 'password';
grant all on Bible.* to 'gwt-examples'@'%' identified by "password";
#grant all on Bible.* to 'gwt-examples'@'192.168.1.10' identified by "password";
#grant all on Bible.* to 'gwt-examples'@'localhost' identified by "password";
commit;
quit;

# get gwt examples
cd ${HOME}
svn checkout http://gwt-examples.googlecode.com/svn/trunk/ gwt-examples

# fill database
wget http://ken

mkBackup.sh

#!/bin/bash

# todo
# backup desktop (check for to big files)
# backup thunderbird
# backup firefox
# backup usb pen if connected
# add state function

DIRS="privat OpenVPN"
EXCLUDE="cd/neue_hp"
DATE=$(date -I)
TARGET="${HOME}/backup/${DATE}"
STATE=0

function state() {
EXIT_CODE=$1
FILE=$2
if [ ! -z ${FILE} ]; then
FILE_SIZE=$(du -sh ${FILE} | cut -f1)
fi

if [ $EXIT_CODE == 0 ]; then
printf "%5s %5s\n" "[OK]" ${FILE_SIZE}
else
printf "%5s\n" "[ERROR]"
STATE=$(($STATE + 1))
fi
}

# create today backup directory
[ !