linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Add proposed repository

#!/bin/bash
 
cat <<EOF>> /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe
EOF

Configure network bridge

#!/bin/bash
 
# backup original network config
mv /etc/network/interfaces /etc/network/interfaces.org
 
# configure network bridge for xen
cat <<EOF> /etc/network/interfaces
auto lo
iface lo inet loopback
 
# eth0 (internal lan)
auto eth0 eth1 xenbr1
iface eth0 inet static
        address 192.168.1.111
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.5
        #post-up ethtool -K eth0 tx off
 
# eth1 (DSL)
iface eth1 inet manual
        up ifconfig eth1 0.0.0.0 promisc up
 
# xenbr1 (bridge between second nic

extractEbook.sh

#!/bin/bash
 
# install
# apt-get install pdftk
 
FILE=$1
PAGES=$2
OUT=$3
 
COVER=/media/lagerliste/vorlagen/ebook/cover.pdf
 
# check if file already exists
if [ -f ${OUT} ]; then
	echo "${OUT} already exists"
	exit 0
fi
 
# get pages
pdftk A=${COVER} B="${FILE}" cat A1 B${PAGES} output /tmp/pdftk.out.pdf
 
# reduce image resolution
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile="${OUT}" -f /tmp/pdftk.out.pdf
 
# view
if [ -n ${DISPLAY} ]; then
	evince "${OUT}"
fi
 
 
# USAGE
# ./mkEbook.sh s02_s201.pdf 1-3  ../ebook/l83_1.1_antike.pdf

Compile error on Intrepid

/home/pako/xserver-xorg-video-ati-6.6.3# fakeroot ./debian/rules binary
 
mkdir stampdir
>stampdir/stampdir
if [ ! -e stampdir/patches ]; then \
		mkdir stampdir/patches; \
		ln -s stampdir/patches .pc; \
		echo 2 >stampdir/patches/.version; \
	fi; \
	if [ ! -e stampdir/log ]; then \
		mkdir stampdir/log; \
	fi; \
	if [ ! -e patches ]; then \
		ln -s debian/patches patches; \
	fi; \
	>stampdir/prepare
if ! [ `which quilt` ]; then \
		echo "Couldn't find quilt.

Install MySQL Server

wget https://raw.githubusercontent.com/panticz/installit/master/install.mysql-server.sh -O - | bash -

#!/bin/bash

debconf-set-selections <<\EOF
mysql-server-5.5 mysql-server/root_password_again string root
mysql-server-5.5 mysql-server/root_password string root
EOF
 
# install
sudo apt-get -y install mysql-server

Huawei UMTS USB Stick

Mobile Connect Settings (under Mac OS X)
Profile Name: t-mobile
Access Point Name: internet.t-mobile
Telephone Number: *99***1#
Account Name: t-mobile
Password: tm
Authentication: CHAP

NetzClub APN
pinternet.interkom.de

disable pin on sim card
sudo mmcli -i 0 --disable-pin --pin=
#sudo apt-get install gsm-utils
#sudo gsmctl -d /dev/ttyACM0 -o unlock sc all YOUR_PIN_NUMBER

Links
http://blog.surgeons.org.uk/2008/02/three-cheers-for-vodafone.html
http://www.draisberghof.de/usb_modeswitch/

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 mr sts cd 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
[ !

formatCamcard.sh

#!/bin/bash
 
DEVICE=/dev/sdc
LABEL=CAMCARD
 
# create partition
sudo umount ${DEVICE}1
sudo fdisk ${DEVICE} << EOF
o
n
p
1
 
 
a
1
t
6
w
EOF
 
# create filesystem
sudo umount ${DEVICE}1
sudo mkfs.vfat -F 16 -n ${LABEL} ${DEVICE}1
 
# sync changes
sudo sync
 
# create directory structure
#sudo mount ${DEVICE}1 /mnt
#mkdir -p /mnt/DCIM/100NIKON
#sudo umount ${DEVICE}1

LIRC

http://www.lirc.org/

Ati / Medion X10
http://forum.ubuntuusers.de/topic/inbetriebnahme-der-fernbedienung-x10-vom-aldi/

commands
irw - view pressed key

rm_m40v-57501
setserial /dev/ttyS0 uart none
modprobe lirc_serial
modprobe uinput

irrecord -d /dev/lirc0 rm_m40v-57501

/etc/init.d/lirc restart

wget dl.panticz.de/hardware/yamaha_dsp-ax1/rm_m40v-57501

mkdir /usr/share/lirc/remotes/mitsubishi/
cp rm_m40v-57501 /usr/share/lirc/remotes/mitsubishi/rm_m40v-57501

cat < /etc/lircd.conf

Syndicate content