htaccess

# Redirect http to https
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.panticz\.de [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.panticz.de/$1 [L,R=301]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]

RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
RewriteRule ^(/)?$ page [L]

# Allow directory listing
# enable "AllowOverride All" in VHost configuration first
Options +Indexes

# Allow show bash files

Allow from all
AddType text/plain .sh .bash

# Enable PHP5
AddType

Burning iPXE into Intel network adapter

# install required packages
apt-get install -y build-essential liblzma-dev git linux-headers-$(uname -r)

# list controller
#lspci -nn | grep Ethernet

# get device id
lspci -nn | grep Ethernet | cut -d"[" -f3 | cut -d"]" -f1 | tr -d ":"

# v1 (intel 100 mbit, WORKING)

# build ipxe rom
git clone git://git.ipxe.org/ipxe.git /tmp/ipxe

# preconfigure boot server (local, www.panticz.de)
cat < /tmp/ipxe/src/boot.ipxe
#!ipxe

dhcp && chain http://\${next-server}/\${mac} || chain http://preseed.panticz.de/\${mac}
EOF

# compile
cd /tmp/ipxe/src
make bin/80861229.rom EMBE

Install MySql Workbench under Ubuntu

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

";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
$result = curl_exec($ch);
curl_close($ch);
htmlspecialchars($result);

echo "

";
?>

# test
. /etc/os-release
cat < /etc/apt/sources.list.d/mysql.list
deb http://repo.mysql.com/apt/${ID}/ $(lsb_release -cs) mysql-apt-config
deb http://repo.mysql.com/apt/${ID}/ $(lsb_release -cs) workbench-6.3
EOF

# fix utopic ?
sed -i 's|utopic|trusty|g' /etc/apt/sources.list.d/mysql.list

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5072E1F5

sudo apt-get update

debconf-set-selections <<\EOF
mysql-apt-config mysql-apt-config/select-workbench select workbench-6.2
EOF

sudo apt-get install -y mysql-apt-config

# sudo apt-get install libmysqlclient18
sudo apt-get install -y mysql-workbench-community

# test 2
# dpkg --force-all
# sudo apt-get install libaio1
# sudo apt-get install libcairo2

# cat /etc/apt/sources.list.d/mysql.list
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.6
deb http://repo.mysql.com/apt/ubuntu/ trusty workbench-6.2
# deb http://repo.mysql.com/apt/ubuntu/ trusty connector-python-2.0
# deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-utilities-1.5

apt-get update
sudo apt-get install -y mysql-workbench-community

# deb-src http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.6

# ssh tunnl error
http://bugs.mysql.com/bug.php?id=75764

# admin mysql client
#audo apt-get -y install mysql-admin
#audo apt-get -y install mysql-query-browser

Links
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
http://dev.mysql.com/downloads/workbench
http://wiki.ubuntuusers.de/MySQL/Werkzeuge

OpenWrt connect to UMTS with Huawei E620 3G USB Modem

# install packages
opkg update
opkg install usbutils
opkg install kmod-usb-serial kmod-usb2 kmod-usb-uhci kmod-usb-ohci
opkg install ppp kmod-ppp
opkg install huaweiaktbbo
opkg install comgt
opkg install usb-modeswitch usb-modeswitch-data

# OPTIONAL, webgui support for 3g
opkg install luci-proto-3g

# list USB devices
lsusb

# OUTPUT:
Bus 001 Device 002: ID 12d1:1520 Huawei Technologies Co., Ltd.

Intel AMT (vPro) under Linux

#
# enable KVM (VNC)
#
# install wsman
#wget http://ppa.launchpad.net/jared-dominguez/wsmancli/ubuntu/pool/main/w/wsmancli/wsmancli_2.2.6-1_amd64.deb -O /tmp/wsmancli_2.2.6-1_amd64.deb
#sudo dpkg -i /tmp/wsmancli_2.2.6-1_amd64.deb
sudo apt-get install -y wsmancli

# configure parameter
export AMT_HOST=192.168.254.10
export AMT_PASSWORD=Admin123$
export VNC_PASSWORD=P@ssw0rd

# set the vnc password
wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h ${AMT_HOST} -P 16992 -u admin -p ${AMT_PASSWORD} -k RFBPassword=${VNC_PASSWORD}

# enable KVM re

Install Jameica + Hibiscus online banking

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

";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
$result = curl_exec($ch);
curl_close($ch);
htmlspecialchars($result);

echo "

";
?>

Ansible playbook
https://github.com/panticz/ansible/tree/master/roles/hibiscus
- hosts: localhost
roles:
- hibiscus

# broken
echo "deb http://de.archive.ubuntu.com/ubuntu cosmic main restricted universe multiverse" > /etc/apt/sources.list.d/cosmic.list
apt install -y jameica
rm /etc/apt/sources.list.d/cosmic.list

# broken
sudo add-apt-repository ppa:marko-preuss/hibiscus
sudo apt-get update
sudo apt-get install hibiscus-orig

Links
https://www.willuhn.de/wiki/doku.php?id=support:ubuntu_18.04_64bit
https://wiki.ubuntuusers.de/Hibiscus/
http://www.willuhn.de/products/jameica/download.php
http://www.willuhn.de/products/hibiscus/download.php
https://www.willuhn.de/wiki/doku.php?id=support:bezugsquellen
http://www.heise.de/download/linux/office/finanzsoftware/homebanking-50003505037/

Update Mellanox firmware under Ubuntu

Install
boot from Ubuntu Live CD

wget http://www.mellanox.com/downloads/MFT/mft-3.1.0-8.tgz -P /tmp
tar xzf /tmp/mft-*.tgz -C /tmp

apt-get update
apt-get install -y rpm2cpio

# compile kernel module
cd /tmp
rpm2cpio /tmp/mft-*/SRPMS/kernel-mft-*.src.rpm | cpio -i --make-directories
tar xzf /tmp/kernel-mft-*.tgz -C /tmp/
cd /tmp/kernel-mft-*
apt-get install -y linux-headers-$(uname -r)
apt-get install -y make
apt-get install gcc -y --no-install-recommends
make
mkdir /lib/modules/$(uname -r)/kernel/drivers/mft/