installer.

Spickzettel, stets aktualisiert


oh-my-zsh

http://ohmyz.sh/

Installation

curl

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

wget

sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

Config

vim ~/.zshrc
10gg
2w
cw
clean

# ZSH_THEME="clean"

Themes

https://github.com/robbyrussell/oh-my-zsh/wiki/Themes


tmux

tmuxifier

https://github.com/jimeh/tmuxifier

Installation

git clone https://github.com/jimeh/tmuxifier.git ~/.tmuxifier
vi ~/.zshrc
export PATH="$HOME/.tmuxifier/bin:$PATH"

tricks

tmux shortcuts & cheatsheet


spacevim

https://github.com/SpaceVim/SpaceVim

Installation

curl -sLf https://spacevim.org/install.sh | bash

Config

  • Falls die Nummerierung stört:
    • vi ~/.SpaceVim/autoload/SpaceVim.vim
    • let g:spacevim_relativenumber = 0

iproute2

init

ip link show
ip link set up enp3s0
ip a add 10.10.1.2/24 dev enp3s0
ip r add default via 10.10.1.1

Debian

Tools

apt install tmux curl git screen wget vim zsh
chsh 
    /usr/bin/zsh

Arch Linux

Locale

cat <<EOF >>/etc/locale.gen
de_DE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
EOF
locale-gen

ioncube

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz
php -i | grep extension_dir
cp /tmp/ioncube/ioncube_loader_lin_7.2* /usr/lib/php/modules
echo "zend_extension=ioncube_loader_lin_7.2.so" > /etc/php/conf.d/ioncube.ini
php -v

Tools

pacman -S vim curl git tmux screen wget 

pacman -R vi

ln -s /usr/bin/vim /usr/bin/vi

vi ~/.zshrc
    EDITOR=/usr/bin/vim

transfernetzwürfel

python
import random
print("10.{}.{}.X".format(random.randint(0,255), random.randint(0,255)))

Server

systemctl enable sshd
systemctl start sshd
ip a

static ip

  • device name: ip link show
  • create /etc/conf.d/net-conf-device
  • vim /etc/conf.d/net-conf-eth0
address=
netmask=24
broadcast=.255
gateway=.1

  • vim /etc/systemd/system/network@.service
[Unit]
Description=Network startup (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/net-conf-%i
ExecStart=/sbin/ip link set dev %i up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/sbin/ip route add default via ${gateway}
ExecStop=/sbin/ip addr flush dev %i
ExecStop=/sbin/ip link set dev %i down

[Install]
WantedBy=multi-user.target
  • systemctl enable network@eth0.service
  • vi /etc/resolv.conf

tinc

install

Arch Linux

yaourt tinc-pre

init

## auf server:
# ufw allow 655

tinc -n NETZNAME init CLIENTNAME
tincd -n NETZNAME
tinc -n NETZNAME add subnet 10.55.0.1
echo 'ip addr add 10.55.0.1/24 dev $INTERFACE' > /usr/local/etc/tinc/NETZNAME/tinc-up
echo 'ip link set $INTERFACE up' >> /usr/local/etc/tinc/NETZNAME/tinc-up

client hinzufügen

## long story short:
tinc -n NETZNAME invite CLIENTNAME
tinc join 
# <invite-url>
tincd -n NETZNAME
tinc -n NETZNAME add subnet 10.55.0.
# ip
echo 'ip addr add 10.55.0.XXX/24 dev $INTERFACE' > /etc/tinc/NETZNAME/tinc-up
echo 'ip link set $INTERFACE up' >> /etc/tinc/NETZNAME/tinc-up
pkill -9 tincd
systemctl enable tinc@NETZNAME
systemctl start tinc@NETZNAME
# tincd -n NETZNAME
# tincd -n vpn -D -d3

ssh

public_key cm18

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5vv7pIdXBaCtzLi/LDi2iPQ9BNuXo2yp/VfDLQ2W+0uK0oJZHh+fyzf3Ujj6XmsPXF/7r9akLi3NwA6qwqU43lohMf8dDe6R3sNPmZI93ZMqw78DQLzoV6dLolhyZ8TYH1vHSKxSoGJrgliqx6ju413+lHMSeQBKf3cY1T0UPWTXpLxSVvg38qBJ9fn5V+NzmxL0nE9mQHGlmqmFnd7iWU83LhEFwK6yxVOgHNIthgrW2IthB/GUCrq1IzoV7CPFAUHNXrw2b59Uy721vx/eApZxN+NFtnHzRXP9PA3B92DPxMfZ2jlVjOVn9IPIXnlUlxWkQ4RuBUed+HrBd/IwVw== cm18@gw




Kontakt / Impressum / Startseite