HUAWEI K3765-HV

sudo apt-get install -y usb-modeswitch

cat <> /etc/udev/rules.d/usb_modeswitch.rules
# HUAWEI K3765-HV
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1520", RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1520 -M 55534243EE0000006000000000000611062000000000000000000000000000"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1465", RUN+="/sbin/modprobe -r option"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1465", RUN+="/sbin/modprobe usbserial vendor=0x12d1 product=0x1465"
EOF

sudo reload udev

# Links
h

Install Docky under Ubuntu

<?php
$URL="http://dl.panticz.de/scripts/install.docky.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 "

";
?>

OPTIONAL: configure docky
gconftool-2 -t string -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/Autohide "Intellihide"
gconftool-2 -t bool -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/FadeOnHide true
gconftool-2 -t float -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/FadeOpacity 0.4
gconftool-2 -t int -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/IconSize 24
gconftool-2 -t bool -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/IndicateMultipleWindows true
gconftool-2 -t bool -s /apps/docky-2/Docky/Items/DockyItem/ShowDockyItem false

gconftool -s --type string /apps/docky-2/Docky/Items/DockyItem/DockyItemCommand 'gnome-terminal --geometry 177x47+0+0'

Add Gnome menu to Docky
sudo apt-get install -y xdotool
gconftool -s --type string /apps/docky-2/Docky/Items/DockyItem/DockyItemCommand 'xdotool key -clearmodifiers alt+F1'

Links
http://wiki.ubuntuusers.de/Docky

Compile Docky with Stacks under Ubuntu

<?php
$URL="http://www.panticz.de/sites/default/files/Docky/compile.docky.stacks.sh.txt";
echo "

Quick install (go Applications > Accessories > Terminal and put this line into):

";
echo "wget $URL -O - | bash -";
echo "

Script code:

";
echo "

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

";
?>

Install Docky Stacks (already compiled)
http://www.panticz.de/Download-and-install-Docky-Stacks-under-Ubuntu

Links
http://wiki.go-docky.com/index.php?title=Installing
http://www.omgubuntu.co.uk/2010/06/stacks-for-docky-looks-like-a-dream-works-like-one-too/

Install neatx

# server
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:freenx-team
sudo apt-get update
sudo apt-get install neatx-server

# client
http://www.nomachine.com/download-client-linux.php
wget http://64.34.161.181/download/3.4.0/Linux/nxclient_3.4.0-7_i386.deb -P /tmp
sudo dpkg -i /tmp/nxclient_*.deb

# printing
sudo chmod 755 /usr/lib/cups/backend/ipp

# Links
http://www.griessler.org/neatx-freenx-server-auf-ubuntu-10-04-lucid-lynx.php

sed

# remove third line
sed -i 3d

# insert line on beginning of a file
sed -i '1i MY_TEXT'

# String replace with sed
sed -i 's|STRING_FROM|STRING_TO|g' FILE
sed -i 's|[#]*param=[yes|no]*|param=yes|g' FILE

# add line to a file
sed -i '13i\YOUR_TEXT' FILE

# add line before last line
sed -i '$i test_line' /path/to/file

# search block
sed -n '/FOO/,/BAR/p' /path/to/file

# remove digits
echo $FOO | sed 's/[^0-9]*//g'

# remove blanks (trim)
cat FILE | sed 's/ */ /g'
# remove blanks and tabs
cat FILE | sed "s/[ \t][ ]*/ /g"

# write to file

Magento code snippet

# get parameter from Database stored in core_config_data
echo Mage::getStoreConfig('general/imprint/shop_name');

# add top category block
edit: /app/design/frontend/default/your-theme/template/page/html/header.phtml
add: <?php echo $this->getChildHtml('topMenu') ?>
link: http://www.learnmagento.org/magento-tips-tricks/category-drop-down-on-main-navigation-menu/

test:

<?=$this->getChildHtml('header')?>
<?=$this->getChildHtml('left')?>
<?=$this->getChildHtml('content')?>
<?=$thi

Magento product back button

<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/styles.css";
echo $URL;
echo "

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

";

$URL="http://www.panticz.de/sites/default/files/magento/back-button/back-button.view.phtml";
echo $URL;
echo "

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

";
?>

mkdir -p ./app/design/frontend/default/default/template/catalogsearch/
cp ./app/design/frontend/base/default/template/catalogsearch/result.phtml ./app/design/frontend/default/default/template/catalogsearch/result.phtml
<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/result.phtml.diff";
echo $URL;
echo "

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

";
?>

mkdir -p ./app/design/frontend/default/default/template/page/
cp ./app/design/frontend/base/default/template/page/1column.phtml ./app/design/frontend/default/default/template/page/
<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/1column.phtml.diff";
echo $URL;
echo "

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

";
?>

Links
http://www.mxperts.de/zuruck-button-fur-die-produktansicht/

apt / dpkg

# run update
export DEBIAN_FRONTEND=noninteractive
LANG=en_US.UTF-8 sudo apt-get update -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean -y

# allow unauthenticated repository
apt-get update --allow-unauthenticated

# list updatable packages
apt list --upgradable

# view avaiable package version
apt-cache show wget
apt-cache madison wget

# install specific version
apt-get install package name=version
apt-get install wget=1.6

# install from specific repository
apt-get install -t squeeze-backports wget

# view available versions