The AI2 communities abound with these, but here is another random password generator.
You can set the minimum length, the length (most important!), and choose between lowercase and uppercase letters, digits, and special characters (one, some or all).
I have excluded the "$" sign because this may not always be handled correctly without escaping the character (depends on what you are doing).
This is what I started from, which is a simple but effective random password generator, I believe by @dora_paz :
I expanded on this to include the options as indicated above. The procedure ensures that if a set of characters is selected to be used, that at least one of those characters is present.
This is just a password generator. No claims with regard to security. Please do you own research.
Note: the procedure blocks are draggable (click on them [twice] to make big, then drag into blocks editor)