Bypassing Mac Firmware Password

So I had a rather embarrassing situation today where I needed to boot my Macbook pro from a usb device but I had forgotten my password. After some background reading I found a very simple solution. From within OS X (I used snow leopard but the procedure should be the same for any Intel based mac) open terminal and run the following command:
sudo nvram -d security-mode
And the password is gone!
I believe it’s also trivial to decode your password from the output of nvram -p

Hiding Files in OS X

Just a quick post which might help anybody who wants to be able to hide files in Finder on their mac.
The chflags command lets you set a hidden flag that prevents a file from appearing in Finder (not the same as prepending the name with a . which is the typical way of hiding files in a unix based system)
This automator service creates a context menu in Finder to hide files easily. To show them again requires Terminal since you clearly can’t click a file you can’t see!
To show files the command is chflags nohidden [FILE]
(or add sudo if needed)
the code is as follows.
on run {input, parameters}
set myfilepath to (last item of input) as text
set command to "sudo chflags hidden \"" & POSIX path of myfilepath & "\""
do shell script command password "MY PASSWORD" with administrator privileges
end run

Code as above in Applescript action
If you don’t want your password saved in plain text in the automator file then simply remove the password “…” part and you will be prompted each time.

EDIT: It is also possible to manually add a Keychain item containing your password and have applescript use that instead. I don’t have the code to hand but if you’re interested then let me know.