linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Upgrade SSH to v7.3 with include support

echo "deb http://archive.ubuntu.com/ubuntu yakkety main" > /etc/apt/sources.list.d/yakkety.list
apt-get update
apt-get install -y ssh
rm /etc/apt/sources.list.d/yakkety.list
apt-get update

ssh -V
OpenSSH_7.3p1 Ubuntu-1, OpenSSL 1.0.2g 1 Mar 2016

mkdir ~/.ssh/config.d
sed -i '1iInclude config.d/*' ~/.ssh/config

Links
https://superuser.com/questions/247564/is-there-a-way-for-one-ssh-config-file-to-include-another-one

Graphite

# connect to JVM
https://github.com/jmxtrans/jmxtrans

# run as docker container
docker run -d --name graphite -p 8080:80 -p 2003:2003 sitespeedio/graphite
user: guest
pass: guest

# Links
http://graphiteapp.org/

OpenShift

apt-get install docker-engine=1.13.1-0~ubuntu-xenial

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.openshift.sh -O - | bash -

#!/bin/bash

. /etc/os-release
if [ "${ID_LIKE}" == "debian" ]; then
    wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.docker.sh -O - | bash -
    sudo apt-get install git wget
    sudo sed -i 's|ExecStart=/usr/bin/dockerd -H fd://|ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry 172.30.0.0/16|g' /etc/systemd/system/multi-user.target.wants/docker.service
    systemctl daemon-reload
else
    yum install -y docker git wget
    sudo sed -i "s|# INSECURE_REGISTRY='--insecure-registry'|INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16'|g" /etc/sysconfig/docker
fi

systemctl enable docker
systemctl start docker

wget https://github.com/openshift/origin/releases/download/v1.5.0-rc.0/openshift-origin-client-tools-v1.5.0-rc.0-49a4a7a-linux-64bit.tar.gz -qO /tmp/openshift-origin-client-tools-linux-64bit.tar.gz 
tar xzf /tmp/openshift-origin-client-tools-linux-64bit.tar.gz -C /tmp/
cp /tmp/openshift-origin-client-tools-*/oc /usr/local/bin/

rm -rf /tmp/openshift-origin-client-tools*

# create test project
oc cluster up #--public-hostname=openshift.example.com --loglevel=10
oc login -u developer -p developer
oc whoami
oc new-app -L
oc projects
oc new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-ex
oc get all
oc get pod -w
oc logs -f ruby-ex-1-build
oc get services
oc expose service ruby-ex #--hostname=app1.example.com
oc get route

echo "192.168.178.31 ruby-ex-myproject.192.168.178.31.xip.io" >> /etc/hosts

Manage OpenShift with Ansible
https://github.com/openshift/openshift-ansible
https://www.ansible.com/blog/2013/09/19/deploying-highly-available-openshift-origin-clusters

# Ansible playbook
https://github.com/panticz/ansible/tree/master/roles/ansible

Links
https://www.openshift.org/
https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#linux
https://github.com/openshift/origin/releases/latest
https://github.com/OpenShiftDemos/openshift-cd-demo

rsync under OpenElec / Kodi

mkdir /tmp/deb
wget http://ftp.us.debian.org/debian/pool/main/r/rsync/rsync_3.1.1-3_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/a/attr/libattr1_2.4.47-2_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/a/acl/libacl1_2.2.52-2_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/p/popt/libpopt0_1.16-10_armhf.deb -qP /tmp/
dpkg -x /tmp/rsync_3.1.1-3_armhf.deb /tmp/deb
dpkg -x /tmp/libattr1_2.4.47-2_armhf.deb /tmp/deb
dpkg -x /tmp/libacl1_2.2.52-2_armhf.deb /tmp/deb
dpkg -x /tmp/libpopt0_1.16-10_armhf.deb /tmp/deb

cryptsetup luks

sudo cryptsetup luksChangeKey /dev/sda5
sudo cryptsetup luksDump /dev/sda5
https://ubuntuforums.org/showthread.php?t=837416

nmcli - NetworkManager command line tool

# list all connections
nmcli con

# show connection details
nmcli con show 'MY_CONNECTION_1'

# start vpn from command line (ubuntu)
nmcli con up id VPN_NAME

nmcli dev wifi list

nmcli con add con-name MY-WIFI ifname wlan0 type wifi ssid MY-WIFI
nmcli con modify MY-WIFI wifi-sec.key-mgmt wpa-psk
nmcli con modify MY-WIFI wifi-sec.psk 'pass1234'

Autostart delayed VPN connection
# /home/foo/.config/autostart/vpn.desktop
[Desktop Entry]
Type=Application
Exec=nmcli con up VPN1
Hidden=false
NoDisplay=false
X-GNOME-Autostart-Delay=3

ip

ip addr show eth0

ip link set eth0 up
ip link set dev up
ip link set dev down

ip addr add 192.168.1.33/24 dev eth0

ip addr del 10.0.0.2/24 dev tun2
ip link set tun0 down

ip -4 route get 8.8.8.8

# show routing table
ip route

# shut down interface
ip link set eth0 down

sudo ip route del default
sudo ip route add default via 192.168.1.254
sudo ip route add 10.0.3.123 dev tun0 scope link
sudo ip route add 10.23.0.0/16 via $(getent hosts vpn.example.com | cut -d" " -f1)

ip link add link eth0 name eth0.100 type vlan id 100

Lakka (Retro game emulation distribution)

# download and create installation usb disc
URL=http://mirror.lakka.tv/nightly/Generic.x86_64/Lakka-Generic.x86_64-devel-20161221183017-r21729-g274b40f.img.gz
DEV=/dev/sdb
wget ${URL} -q -O - | gunzip | sudo dd of=${DEV}

# gamepad
http://www.lakka.tv/doc/Input-settings/
http://www.lakka.tv/doc/Contributing-your-joypad-config/

# links
http://www.lakka.tv/get/linux/generic/
https://www.loveroms.com/
http://html5gamepad.com/ - HTML5 Gamepad Tester

Syndicate content