MysqlTest.java

import java.sql.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;

public class MysqlTest {

private final static String dbUser = "dbo_java";
private final static String dbPass = "java_test";
private final static String dbHost = "192.168.1.111";
private final static String dbName = "java";

public static void main(String[] args) {
Connection conn = null;

try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://" + dbHos

Connect to MySQL DB

# ubuntu package
sudo apt-get install -y libmysql-java

path: /usr/share/java/mysql-connector-java.jar

# download
wget http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-5.1.12.tar.gz -P /tmp

# extract
tar xzf /tmp/mysql-connector-java-5.1.12.tar.gz -C /tmp/

# copy to your classpath
cp /tmp/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar ~/NetBeansProjects/classpath/

# Netbeans
add Library / Jar File
select
~/NetBeansProjects/classpath/mysql-connector-java-5.1.12-bin.jar

# create tatabase
create database java;

Play BlueRay disc with Linux

Play BlueRay discs with Linux

# new 2
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev

cd /tmp
wget http://www.makemkv.com/download/makemkv_v1.6.3_bin.tar.gz
wget http://www.makemkv.com/download/makemkv_v1.6.3_oss.tar.gz

tar -xvf makemkv_v1.6.3_bin.tar.gz
tar -xvf makemkv_v1.6.3_oss.tar.gz

cd /tmp
cd makemkv_v1.6.3_oss
sudo make -f makefile.linux
sudo make -f makefile.linux install

cd /tmp
cd makemkv_v1.6.3_bin
sudo make -f makefile.linux

Kyocera FS-1030D

Download PPD files for kyocera printer
wget http://cdn.kyostatics.net/dlc/de/driver/all/linux_ppd_s_ksl_8.-downloadcenteritem-Single-File.downloadcenteritem.tmp/Linux_PPDs_KSL8_4.zip -P /tmp/
unzip /tmp/Linux_PPDs_KSL8_4.zip -d /tmp

# create new printer
lpadmin -p Kyocera_FS1010 -v socket://192.168.1.11:9100 -E -P "/tmp/PPD's_KSL_8.4/German/Kyocera_Mita_FS-1010_de.ppd"
#-o PageSize=A4

system-config-printer

install
#wget http://dl.dropbox.com/u/4170695/www/Kyocera-FS-1010.ppd -P /tmp

Install docky, gnome-do, gnome-shell and zeitgeist

# install gnome-do
sudo add-apt-repository ppa:do-core/ppa
sudo apt-get update
sudo apt-get install gnome-do

# install zeitgeist
sudo add-apt-repository ppa:zeitgeist/ppa
sudo apt-get update
sudo aptitude install zeitgeist

# install gnome-shell
sudo add-apt-repository ppa:ricotz/testing
sudo apt-get install gnome-shell
gnome-shell --replace

# Links
http://wiki.go-docky.com/index.php?title=List_of_helpers
https://addons.mozilla.org/de/thunderbird/addon/72199 - Docky Unread Count (Thunderbird extension)

Ubuntu Lucid domU under Debian Lenny Dom0

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=lucid
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:aa:bb
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=1Gb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=8Gb

# create vm
xen-create-image --hostname=${DOMAIN_NAME} --dhcp --mac=${DOMAIN_MAC} \
--lvm=vg01 --dist=lucid --mirror=http://archive.ubuntu.com/ubuntu --size=${DOMAIN_HDD} --memory=${DOMAIN_RAM} --swap=${DOMAIN_RAM}

# rename vm config
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}

# post config domU
mount /dev/vg01/${DOMAIN_NAME}-disk /mnt/
# configure hvc0
cp /mnt/etc/init/tty1.conf /mnt

syslinux

echo 'APT::Cache-Limit "50331648";' >> /etc/apt/apt.conf

# add debian sid repository
cat < /etc/apt/sources.list.d/sid.list
deb http://ftp.de.debian.org/debian sid main
EOF
sudo apt-get update -qq

apt-get install -y --force-yes syslinux

rm /etc/apt/sources.list.d/sid.list
sudo apt-get update -qq

# on i386
wget http://ftp.de.debian.org/debian/pool/main/s/syslinux/syslinux-common_4.01+dfsg-1_all.deb -P /tmp

# on amd64
wget http://ftp.de.debian.org/debian/pool/main/s/syslinux/syslinux_3.86+dfsg-1_amd64.deb -P /tmp

Install FTP server (vsftpd)

# install
apt-get -y install vsftpd

# configure (non anonymous)
cp /etc/vsftpd.conf /etc/vsftpd.conf.org
sed -i 's|anonymous_enable=YES|anonymous_enable=NO|g' /etc/vsftpd.conf
sed -i 's|#local_enable=YES|local_enable=YES|g' /etc/vsftpd.conf
sed -i 's|#write_enable=YES|write_enable=YES|g' /etc/vsftpd.conf
sed -i 's|#chroot_local_user=YES|chroot_local_user=YES|g' /etc/vsftpd.conf

# OPTIONAL: configure anonymous (DANGEROUS!!!)
sed -i 's|anonymous_enable=NO|anonymous_enable=YES|g' /etc/vsftpd.conf
sed -i 's|#anon_upload_enable=YES|anon_upload_enable=YES|g' /etc/vsftpd.conf
sed -i 's