1075Generating a Random Password with pseudo-random bytes

openssl rand -base64 12

rand
Generate pseudo-random bytes.

base64
Base64 Encoding

1062Resetting a User Password in ProcessWire

It happens to best of us: You have an local installation of your favourite CMS - and then you can't remember the password! Login throtteling kicks in, you still can't remember it. And this being a local XAMPP installation, you can't send an email to recover the password.

Here is Ryan1 to the resuce:

You can always reset your password just by pasting this temporarily into any one of your templates, and then viewing a page that uses the template:

$u = $users->get('admin'); // or whatever your username is
$u->of(false); 
$u->pass = 'your-new-password';
$u->save();

1 Who is Ryan? Ryan Cramer is the founder and lead developer of ProcessWire.

973Create a Password-Protected Zip

zip -er test.zip MyFiles

From man zip

-e
--encrypt

Encrypt the contents of the zip archive using a password which is entered on the terminal in response to a prompt (this will not be echoed; if standard error is not a tty, zip will exit with an error).  The password prompt is repeated to save the user from typing errors.

-r
--recurse-paths
Travel the directory structure recursively

-P
--password password
Use password to encrypt zipfile entries (if any).  THIS IS INSECURE!

zip -er -P mypassword test.zip myFiles