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.

Gnome

# get settings
gsettings list-recursively | grep -i gedit
gsettings list-recursively org.gnome.settings-daemon.plugins.power
dconf read /org/gnome/settings-daemon/plugins/media-keys/calculator 
 
# unity
setsid unity
dconf dump /org/compiz/
 
# http://askubuntu.com/questions/67355/how-do-i-completely-turn-off-screensaver-and-power-management
# /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.xml 
 
dconf watch /
http://askubuntu.com/questions/359593/is-it-possible-to-monitor-dconf-for-changes
 
# reset pannel settings
gconftool-2 --recursive-unset /apps/panel
d

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";

Send mail from console

# install
sudo apt-get install -y mailx
 
# configure postfix
postconf -e 'smtp_generic_maps = hash:/etc/postfix/generic'
cat <<EOF>> /etc/postfix/generic
root@ubuntu.example.local	info@example.com
EOF
service postfix restart
postmap /etc/postfix/generic
 
# configure smtp
cat <<EOF> ~/.mailrc 
set from="YOU@YOUR_MAIL.COM"
set smtp="YOUR_SMTP_SERVER"
set smtp-auth-user="SMTP_USER"
set smtp-auth-password="SMTP_PASS"
EOF
 
# test
echo "This is a test message from ${USER}@${HOSTNAME} at $(date)" | mail -s "Test email" YOU@YOUR_MAIL.COM
 
 
# v2
sudo apt-get install nullmailer

lts.conf parameter

XSERVER=nsc
LDM_USERNAME=root
LDM_PASSWORD=toor
PRINTER_0_TYPE=U
PRINTER_0_DEVICE=/dev/usb/lp0
SCREEN_02=shell
SCREEN_07=ldm
LDM_REMOTECMD="/usr/sbin/ethtool -s eth0 msglvl 0"
X_COLOR_DEPTH=16
X_VIDEORAM=4096
X_MODE_0=1024x768
X_HORZSYNC=30-70
X_VERTREFRESH=50-150
XKBLAYOUT=de
LDM_USERNAME=service
LDM_PASSWORD=terceS
SCREEN_07=startx-custom
PRINTER_0_TYPE=P
PRINTER_0_DEVICE=/dev/lp0
PRINTER_1_TYPE=U
PRINTER_1_DEVICE=/dev/usb/lp1
 
 
[LG]
        X_HORZSYNC         = "40-83"
        X_VERTREFRESH      = "55-60"
        X_MODE_0           = 1280x1024
 
[00:33:44:55:66:77

installZattoo.sh

#!/bin/bash
 
sudo su
 
# check for new version
http://zattoo.com/de/download/linux?download=1&version=Linux-i386-deb
 
URL=http://download.zattoo.com/zattoo-3.3.3.20775-i386.deb
wget ${URL} -P /tmp
 
sudo apt-get install libgtkglext1 libxul0d libmozjs0d libxul-common
sudo dpkg -i /tmp/zattoo-*.deb
Syndicate content