DHCPD

Add static DHCP entry
# create new entry
uci add dhcp host
uci set dhcp.@host[-1].name='srv1'
uci set dhcp.@host[-1].mac='00:01:02:25:96:99'
uci set dhcp.@host[-1].ip='192.168.2.55'
uci commit dhcp

# restart dhcpd server
/etc/init.d/dnsmasq restart

Ubuntu / Debian: Install and configure lm-sensors

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.lm-sensors.sh";
echo "wget -q $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Search for motherboard configuration
sudo dmidecode -t baseboard | grep "Product Name"
http://www.lm-sensors.org/wiki/Configurations/

Ignore sensors
# /etc/sensors.d/f71882fg-isa-0a00
chip "f71882fg-isa-0a00"
ignore fan2
ignore fan4

Motherboard configurations
# MSI X58 Pro-E (MS-7522) / Fintek f71882fg
echo "f71882fg" >> /etc/modules
echo "#coretemp" >> /etc/modules
modprobe f71882fg
wget http://dl.panticz.de/lm-sensors/ms-7522.conf -O /etc/sensors.d/f71882fg.conf
sensors -s

# ASUS M2N32 WS Professional
cat /etc/sensors.d/asus_m2n.conf
wget http://dl.panticz.de/lm-sensors/m2n32_ws_professional.conf -O /etc/sensors.d/m2n32_ws_professional.conf

# SuperMicro PDSMi-LN4+
wget http://dl.panticz.de/lm-sensors/pdsmi-ln4.conf -O /etc/sensors.d/pdsmi-ln4.conf

View raw sensor data
sensors -u

# default config file
/etc/sensors3.conf

# view hardwired? fan alarm value
cat /sys/class/hwmon/hwmon8/device/fan1_alarm

OPTIONAL: check with icinga
/usr/lib/nagios/plugins/check_sensors

Links
http://www.lm-sensors.org/wiki/Configurations/MSI/X58-Pro-E
http://www.lm-sensors.org/wiki/FAQ/Chapter3#HowdoIsetnewlimits

Install Obnam

Installation
<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.obnam.sh";
echo "wget $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

# config
cat < /root/.obnam.conf
[config]
repository = sftp://root@itdev/backup/
root = /var/www
log = /var/log/obnam.log
EOF

# add ssh keys
ssh-keygen
ssh-copy-id root@itdev

# backup
obnam backup

# commands
obnam ls
obnam ls --generation=2
obnam diff 2 5

# mount
apt-get install python-fuse #fuse

obnam mount --to /mnt/

Links
http://www.heise.de/artikel-archiv/ct/2013/23/170_Gut-gesichert - Gut gesichert: Verschlüsselte Datensicherung unter Linux mit Obnam

Magento: Add upload field to contact form

<?php
$URL="http://dl.panticz.de/magento/contact_attachment/form.phtml.diff";
echo "wget -q $URL -O - | patch -p2 \
/var/www/app/design/frontend/default/default/template/contacts/form.phtml";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

<?php
$URL="http://dl.panticz.de/magento/contact_attachment/IndexController.php.diff";
echo "wget -q $URL -O - | patch -p2 \
/var/www/app/code/core/Mage/Contacts/controllers/IndexController.php";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

<?php
$URL="http://dl.panticz.de/magento/contact_attachment/Mage_Contacts.csv.diff";
echo "wget -q $URL -O - | patch -p2 \
/var/www/app/locale/de_DE/Mage_Contacts.csv";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Links
http://www.blog.magepsycho.com/adding-upload-field-in-contact-form-and-send-as-attachment/
http://www.magentocommerce.com/boards/viewthread/440759/