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

Boot Linux on nVidia Tegra2 from SDCARD

# prepare directory
mkdir ~/tegra
cd ~/tegra

# download
wget http://developer.download.nvidia.com/tegra/files/linux_for_tegra_os_pack_rel_10.7.2_20100810.run.zip

# extract
unzip linux_for_tegra_os_pack_rel_*.run.zip
bash linux_for_tegra_os_pack_*.run
# answer yes
cd linux4tegra
export L4TROOT=${PWD}

# prepare fs
./unpack_targetfs.sh
./apply_l4t.sh

# partitionize sdcard
sudo umount /dev/mmcblk0p1
sudo fdisk /dev/mmcblk0 < fdisk_helper.txt

# format sdcard
sudo mkfs.ext3 /dev/mmcblk0p1

# mount sdcard
sudo mount /dev/mmcblk0p1 /mnt

# copy data to sdcard
sudo cp

SSH

create SSH key
ssh-keygen -q -b 4096 -f ~/.ssh/id_rsa -N '' -C "${USER}@$(hostname -f)"

Copy public key to server (/home/foo/.ssh/authorized_keys)
ssh-copy-id foo@example.com

show log
tail -f /var/log/auth.log
journalctl _COMM=sshd -f

# configuration
~/.ssh/config: user configuration
/etc/ssh/ssh_config: system-wide client configuration
/etc/ssh/sshd_config: system-wide server configurtion

http://www.panticz.de/SSH-server-enable-disable-password-authentication
http://www.panticz.de/ssh_pre-shared-key_authentication

Install NetBeans

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.netbeans.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 "

";
?>

# configure jdk
# echo netbeans_default_options="netbeans_default_options="--jdkhome" | sudo tee -a /opt/netbeans/etc/netbeans.conf
# Cannot find java. Please use the --jdkhome switch

Add git repository
https://www.youtube.com/watch?v=mzzAUEFS4vs
https://netbeans.org/kb/docs/ide/github_nb_screencast.html

OPTIONAL: install MySQL driver
sudo apt-get install libmysql-java

DEP: fix ubuntu locale settings for german
sed -i 's|en_US.UTF-8|de_DE.UTF-8|g' /etc/scim/global

DEP: disable compiz effects (Visual Effects (System > Preferences > Appearance > Visual Effects => none)
metacity --replace &

Fix bold fonts under Linux
sudo apt-get remove -y fonts-unfonts-core

Ansible role
git clone https://github.com/panticz/ansible.git /tmp/ansible
cd /tmp/ansible/
export ANSIBLE_ROLES_PATH=$(pwd)/roles
ansible-playbook -K /dev/stdin <Links
http://www.techytalk.info/netbeans-cannot-find-java-please-use-jdkhome-switch/ - HowTo (re)configure JAVA JDK
http://wiki.netbeans.org/NBPackagingPlan

Configure file association / default application for file

# global system configuration
/etc/gnome/defaults.list

# user configuration
#~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list

sed -i 's|totem.desktop|vlc.desktop|g' /etc/gnome/defaults.list

sudo sed -i 's|totem.desktop|vlc.desktop|g' /etc/gnome/defaults.list

image/x-psd=gimp.desktop

# Links
https://help.ubuntu.com/community/AddingMimeTypes
http://www.libre-software.net/change-the-default-application-ubuntu-linux
http://askubuntu.com/questions/289337/how-can-i-change-file-association-globally

APC Back-UPS ES 700G: apcaccess status

APC : 001,036,0920
DATE : Wed Aug 18 16:16:22 CEST 2010
HOSTNAME : ubuntu
VERSION : 3.14.6 (16 May 2009) debian
UPSNAME : ubuntu
CABLE : USB Cable
MODEL : Back-UPS ES 700G
UPSMODE : Stand Alone
STARTTIME: Wed Aug 18 16:06:53 CEST 2010
STATUS : ONBATT
LINEV : 000.0 Volts
LOADPCT : 17.0 Percent Load Capacity
BCHARGE : 074.0 Percent
TIMELEFT : 19.4 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 180.0 Volts
HITRANS : 266.0 Volts
ALARMDEL : Always
BATTV : 12.4 Volts
LASTXFER : Low line voltag

APC Back-UPS ES 700G under Ubuntu

# install
apt-get install -y apcupsd

# configure
sed -i 's|UPSCABLE smart|UPSCABLE usb|g' /etc/apcupsd/apcupsd.conf
sed -i 's|UPSTYPE apcsmart|UPSTYPE usb|g' /etc/apcupsd/apcupsd.conf
sed -i 's|DEVICE /dev/ttyS0|DEVICE|g' /etc/apcupsd/apcupsd.conf
sed -i 's|ISCONFIGURED=no|ISCONFIGURED=yes|g' /etc/default/apcupsd

# start apcupsd demon
/etc/init.d/apcupsd start

# get status
apcaccess status

# configure
/etc/init.d/apcupsd stop
apctest

# monitor
tail -f /var/log/apcupsd.events

# OPTIONAL: configure /etc/apcupsd/apccontrol

# LINKS

Android

http://www.panticz.de/android

adb shell COMMAND
adb pull PATH
adb push FILE PATH

# adb repository
#dep?# sudo add-apt-repository -y ppa:nilarimogard/webupd8
#dep?#sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

https://developer.mozilla.org/de/Firefox_OS/Debugging/Installing_ADB

# install sdk
sudo apt-get install -y sun-java6-jdk
wget http://dl.google.com/android/android-sdk_r08-linux_86.tgz -P /tmp/
tar xzf /tmp/android-sdk_r*-linux_86.tgz -C ~/
echo "export PATH=\${PATH}:${HOME}/android-sdk-linux_86/tools" >> ~/.bashrc