Easy stuff with docker

docker

Docker images list

    docker image ls
    docker image ls -a

Docker containers list

    docker container ls
    docker container ls -a

. . .


Docker network

docker

Docker network list

    docker network ls

Inspect network

    docker network <network_name> inspect

. . .


EXIT FROM VIM

vim

HOW GET OUT FROM VIM

    :q and press enter

OR

    :q! and press enter

OR

    :qw and press enter

Eazy stuff with vim

vim

Undo and redo

    u
    ctrl + r

Find something

    press / and type stuff for search

Copy and paste

    press v and select text for copy then press v again
    press p for paste

Java

java


Eazy stuff with git

git

Create branch

    git checkout -b <name>
    git checkout -b <name> <tag>

Delete branch

    git branch -D <name>

. . .


Test z

java

one

Two


Firewall or iptables settings

linux

Letz say you need configure firewall. There is one simple way by iptables.

  1. Create sh file with shell commands. Example in the end this article.
  2. Execute this sh file for settings iptables: sudo ./myIptables.sh
  3. Execute next command for save applyed settings iptables in some file on your directory: sudo iptables-save > myIptables.up.rules
  4. For allowing system restore iptables settings every time after restart add new file to the directory /etc/network/if-pre-up.d/ with next content:

. . .


Eazy stuff with linux

linux

Watching to the connection

    netstat -nputw
    ss -nputw

Watching content changing in the file

    tail -f log.txt

. . .


tar, zip, etc stuff

linux

Watching archive file content

    unzip -l example.zip

Update archive file

    zip example.zip newfile