The provided code for preventing image hotlinking is going to break your own website when user agents are configured to suppress the referer header, which is a common setting (and sometimes enforced at the firewall) in some corporations.
I think there are broader strategic issues with this advice, too. Bandwidth is cheap. I'd much rather encourage people to hotlink and use Javascript to give them suggested HTML to do the linking -- for example, HTML which gave them the image they wanted and a link with appropriate anchor text to credit my site. See: http://www.polepositionmarketing.com/seo-sem/link-building-s...
I do something spiritually similar with PDF files on my site -- or at least I did, can't quite remember if I disabled it at some point. Users attempting to access my free PDFs from my site get PDF files, users attempting to access them from other places on the Internet without being cookied as having visited me get discretely redirected to the HTML page containing the PDF so that they get a full dose of branding and an opportunity to convert to my free trial prior to getting the PDF. (For example, if a teacher hotlinks my activities from her class home page. I want to encourage that, after all.)
Rewriting example.com/category/post-title to example.com/post-title makes sense only if you've already been using categories for a while and have a strong reason to abandon them. If you're just starting, configure your CMS properly (this takes about five seconds in the vanilla install of Wordpress) and you'll save wasted HTTP requests and minor juice leakage for the rest of your site's life. If you're already using category names, changing for the heck of it doesn't offer much in the way of concrete benefits.
The provided code for making the .htaccess file inaccessible will make the .htaccess file inaccessible. As well as, well, everything else in that directory and its subdirectories.