Magento: Redirect to product in specific language

# create a new file ./getProductEn.php
<?php
require '../../app/Mage.php';

try {
$app = Mage::app('gb');

// check sku
$sku = $_GET['sku'];
if(!empty($sku)) {
// filter char in sku
$sku = preg_replace("/[^a-zA-Z0-9-\s]/", "", $sku);

// get product by sku
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);

if($product != null) {
header('Location: '. $product->getProductUrl() .

Magento: featured items

./app/design/frontend/default/default/template/catalog/product/featured.phtml
<?php
$URL="http://www.panticz.de/sites/default/files/magento/featured/featured.phtml";
echo "

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

";
?>

Create cms page
Admin > CMS > Pages > Add new page
Page Title: featured
URL Key: featured
Content: {{block type="featured/featured" name="product_featured" as="product_featured" template="catalog/product/featured.phtml"}}

view on other page
<?php
$URL="http://www.panticz.de/sites/default/files/magento/featured/featured.view.phtml";
echo "

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

";
?>

Links
http://inchoo.net/ecommerce/magento/featured-products-on-magento-frontpage/

Update Ubuntu PXE files

Update pxe configuration
wget http://installit.googlecode.com/hg/preseed/preseed.squeeze.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.squeeze.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.wheezy.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.wheezy.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.i386.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.i386.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.amd64.conf

Debian / Ubuntu access RAID LVM harddisk

sudo su

apt-get install mdadm
mdadm --assemble --scan

apt-get install lvm2
#lvmdiskscan
vgchange -a y

root@ubuntu:/home/ubuntu# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 59 2011-02-25 11:03 control
lrwxrwxrwx 1 root root 7 2011-02-25 11:08 vg00-foo--data -> ../dm-0
lrwxrwxrwx 1 root root 7 2011-02-25 11:08 vg00-foo--swap -> ../dm-1

mount /dev/mapper/vg00-foo--data /mnt/

echo md >> /etc/modules
echo lvm >> /etc/modules
echo raid1 >> /etc/modules
update-initramfs -k all -u

Install SSL CA Certificate

openssl genrsa -out example.com.key 2048

openssl req -new -key example.com.key -out example.com.csr \
-subj "/C=DE/ST=NRW/L=Cologne/O=My Inc/OU=IT/CN=192.168.1.1/emailAddress=webmaster@example.com"

mv example.com.crt /etc/ssl/certs/
mv example.com.key /etc/ssl/private/

https://www.startssl.com/
Express Lane
Register...
Create certificate...
openssl req -new -key /etc/ssl/private/example.com.key -out /root/example.com.csr
cat /root/example.com.csr
Save as:
example.com.crt

wget http://www.startssl.com/certs/sub.class1.server.ca.pem -O /etc/ssl/certs/sub.class1.server.ca.pe

LTSP configure local devices

# install packages
apt-get install -y ltspfs
# libfuse2 fuse-utils

# all all user to group fuse
for USER in $(ls /home/); do
if [ $USER != "lost+found" ]; then
usermod -a -G fuse $USER
fi
done

# load fuse module on boot
cat /etc/modules | grep fuse || echo fuse >> /etc/modules

# modify ltsp configuration
echo "LOCAL_STORAGE=Y" >> /var/lib/tftpboot/ltsp/*/lts.conf

# Links
https://wiki.ubuntu.com/DebugLocalDev