Here's my list of the ultimate htaccess code snippets and examples that I use all the time. I tried to keep them extremely minimalistic.
Don't miss checking out this example htaccess file, its very comprehensive
Heres the actual code that I use when I'm developing sites for clients
This lets google crawl the page, lets me access the whole site
(24.205.23.222) without a password, and lets my client access the page
WITH a password. It also allows for XHTML and CSS validation! (w3.org)
# ELITE HTACCESS FOR WEBDEVELOPERS
##############################################
AuthName "SiteName Administration"
AuthUserFile /home/sitename.com/.htpasswd
AuthType basic
Require valid-user
Order deny,allow
Deny from all
Allow from 24\.205\.23\.222
Allow from w3.org htmlhelp.com
Allow from googlebot.com
Satisfy...