View featured products on top from product listing

<?php
$URL="http://www.panticz.de/sites/default/files/magento/featured/set_featured_product.php";
echo "

";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
curl_close($ch);
echo "

";
?>
php -f set_featured_product.php sku1 sku2 sku3

clear magento cache

<?php
$URL="http://www.panticz.de/sites/default/files/magento/featured/update_featured_product.php";
echo "

";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
curl_close($ch);
echo "

";
?>
php -f update_featured_product.php

Ubuntu: temperature monitoring with TEMPer USB sensor / thermometer

lsusb
Bus 005 Device 012: ID 0c45:7401 Microdia

download already compiled version
sudo wget -q http://dl.panticz.de/pcsensor/pcsensor -O /usr/local/bin/pcsensor
sudo chmod a+x /usr/local/bin/pcsensor
sudo watch /usr/local/bin/pcsensor

compile self
# install libs
sudo apt-get install -y libusb-dev libusb-1.0-0 make #libhid-dev

# get source
#wget http://www.isp-sl.com/pcsensor-0.0.1.tgz -O /tmp/pcsensor-0.0.1.tgz
#tar xzf /tmp/pcsensor-0.0.1.tgz -C /tmp
#cd /tmp/pcsensor-0.0.1
mkdir /tmp/pcsensor

Magento: Newsletter subscriber import script

add subscriber
<?php
$URL="http://www.panticz.de/sites/default/files/magento/newsletter/newsletter_import.php";
echo "

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

";
?>

list all subscribers
<?php
$URL="http://www.panticz.de/sites/default/files/magento/newsletter/newsletter_list_all_subscriber.php";
echo "

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

";
?>

files
./app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php
./app/design/frontend/base/default/template/newsletter/subscribe.phtml

Links
http://docs.magentocommerce.com/Mage_Newsletter/Mage_Newsletter_Model_Subscriber.html#setStatus
http://blogs.ifuelinteractive.com/2011/01/04/programmatically-subscribing-a-customer-to-the-newsletter-list/
http://www.magentocommerce.com/boards/viewthread/7626/
http://magento-wordpress.blogspot.de/2012/08/how-to-send-newsletter-manually.html

Magento: Category list

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

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

";
?>

cms include php template
{{block type="catalog/navigation" name="catalog.leftnav" template="catalog/navigation/category_list.phtml" cat_id=2227}}

CSS
.category_list ul {
height: 120px;
margin-bottom: 15px;
}

.category_list li {
float: left;
width: 250px;
}

Restore old DOS 5.0 backup files (BACKUP.001, CONTROL.001) with dosbox under Linux

# install dosbox
sudo apt-get install -y dosbox

# downlaod and extract restore
http://mindprod.com/products4.html#RESTORE

# create iso files from directory
for i in $(ls); do
mkisofs -J -r -o $i.iso $i/*
done

# start dosbox
dosbox restore.com

# mount multiple images with dosbox (change file with CTRL + F4)
imgmount a f1.iso f2.iso f3.iso -t iso

# restore files
resotre.com a: c: /s

Magento: CMS extension

./app/design/frontend/default/default/template/ebook/view.php
<?php
$URL="http://www.panticz.de/sites/default/files/magento/cms/view.php";
echo "

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

";
?>

./app/add.php
<?php
$URL="http://www.panticz.de/sites/default/files/magento/cms/add.php";
echo "

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

";
?>

./app/del.php
<?php
$URL="http://www.panticz.de/sites/default/files/magento/cms/del.php";
echo "

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

";
?>

cms include php template
{{block type='core/template' template='ebook/view.php' filter='ebooks'}}

cms search
./app/design/frontend/default/default/template/cmssearch/result.phtml

Install OpenElec PXE TFTP boot

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.openelec-fusion.sh";
echo "wget -q --no-check-certificate $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 "

";
?>

Configuration
# create autostartfile
storage/00252233d9d1/.config/autostart.sh

# xbmc config
storage/00252233d9d1/.xbmc/userdata/guisettings.xml

# configure remote
storage/00252233d9d1/.xbmc/userdata/keymaps/Keymap.xml

# system lirc / keyboard config
/usr/share/xbmc/system

Links
http://openelec.tv/get-openelec

Linux Kernel benchmark results

Results extract
8x
real 0m22.993s
user 0m20.720s
sys 0m9.100s

2600
real 0m11.023s
user 0m10.773s
sys 0m1.548s

Quad-Core AMD Opteron(tm) Processor 2347 HE (4x)
real 0m31.517s
user 0m29.330s
sys 0m5.500s

Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz (12x)
real 0m11.230s
user 0m11.185s
sys 0m0.584s

2400 (amd64)
real 0m36.775s
user 0m29.718s
sys 0m3.376s

2400 (dom0)
real 0m39.682s
user 0m32.146s
sys 0m6.668s

2400 (domU)
real 0m39.397s
user 0m32.314s
sys 0m6.708s

2400 amd64 1core
real 15m40.146s
user 14m41.987s
sys 1m34.486s