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.

988Reset Local Git Repo

git reset --hard origin/main

main is the name your main branch.

849Resetting brew

From http://codesandnotes.com/how-to-reset-homebrew/

Recently I had some trouble updating my Homebrew install and while I do like digging into the perfect solution sometimes an easy fix is all you need. These commands will overwrite your local brew with the latest from Git and do a hard reset on your local install, essentially clearing everything. Copy and run these lines in your shell one after another. If it says ‘remote origin already exists’, just continue.
# change to your brew directory
cd `brew --prefix`

# same as
cd /usr/local

# hard reset git
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master