linux

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

Create printer on command line

List all installed printer
lpstat -p -d

Kyocera FS-C5016N
lpadmin -p LaserColor -v ipp://192.168.1.11:631/ipp -E -P /usr/share/ppd/openprinting/Kyocera/en/Kyocera_Mita_FS-C5016N_en.ppd.gz

PDF Printer
sudo sudo apt-get install -y cups-pdf
#sudo lpadmin -p PDF -v cups-pdf:/ -E -P /usr/share/ppd/cups-included/postscript.ppd
#/usr/share/ppd/cups-pdf/PostscriptColor.ppd

Define default prnter
lpadmin -d printer1

Apache webserver

# list loaded modules
/usr/sbin/apache2ctl -M

# list avaiable modules
apachectl -t -D DUMP_MODULES

# check config
apache2ctl -S

a2dismod status - disable module

apachectl -V

# enable default SSL site
a2ensite default-ssl

# disable default SSL site
a2dissite default-ssl

htaccess
http://www.panticz.de/apache-htaccess

Enable mod_rewrite module
sudo a2enmod rewrite

cat < /etc/apache2/conf-available/allow-override.conf

AllowOverride all

EOF

a2enconf allow-override

ImageMagic

montage - create a composite image by combining several separate images

#!/bin/bash
 
for i in *a.jpg; do
	F=${i//a.jpg/}	
	echo $F
	montage -label ${F} -compress "Lossless" -geometry +4+4 ${F}a.jpg ${F}b.jpg ./2/${F}.jpg
done

Perl

Execute command
#!/usr/bin/perl

qx"/usr/bin/mysqldump --host=YOUR_HOST_NAME --password=YOUR_DB_PASS --user=YOUR_DB_USER YOUR_DB_NAME | bzip2 --best > export_db.sql.bz2";