How to create a self-signed certificate with OpenSSL

linux

You can do that in one command:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

You can also add -nodes (short for no DES) if you don't want to protect your private key with a passphrase. Otherwise it will prompt you for "at least a 4 character" password.

. . .


Category, functor, monad

links

Further demistifying the Monad in Scala: a Category Theory approach


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:

. . .