vpn for ubuntu 20.04 code example
Example 1: install vpn client for ubuntu 20.04 gui
$ sudo apt install network-manager-openvpn network-manager-openvpn-gnome openvpn openvpn-systemd-resolved -y
Example 2: random password generator
function rand_string( $length ) {
$str = "";
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$size = strlen( $chars );
for( $i = 0; $i < $length; $i++ ) {
$str .= $chars[ rand( 0, $size - 1 ) ];
}
return $str;
}
//and call the function this way:
$mypass = rand_string(10);