Racer D
what?
I know there have been ways of doing this since like forever, but it always took an opening of one app (terminal or some prefpane) and relauncing finder. I've found a way to make it even easier 
1) navigate to /Applications/AppleScript and launch Script Editor
2) copy & paste this code into script editor's window
3) go to file / save and save to wherever you like with a name you like
but be sure to set file format to application and to uncheck all options
[optional]) change the file's icon
4) Now navigate to the folder where you saved your file and drag & drop the file into your Finder's toolbar (You have to hold the file above the toolbar for about a second and then drop it to make it work)
now, by clicking the icon in your toolbar, the finder will relaunch, toggling the state of hidden files (show/hide). clicking the icon again will toggle back.
it's a simple applescript that edits Finder's preferences file and relaunches Finder.
WARNING: hidden files are hidden for a reason. Use this script only if you know what you're doing. I hold no responsibility for f*cked up macs.

1) navigate to /Applications/AppleScript and launch Script Editor
2) copy & paste this code into script editor's window
Code:
do shell script "if [ `cat ~/Library/Preferences/com.apple.finder.plist | grep -A 1 AppleShowAllFiles | grep string | cut -c10-11` == 'ON' ]; then
defaults write com.apple.finder AppleShowAllFiles OFF
else
defaults write com.apple.finder AppleShowAllFiles ON
fi"
tell application "Finder" to quit
delay 1
tell application "Finder" to launch
3) go to file / save and save to wherever you like with a name you like

[optional]) change the file's icon
4) Now navigate to the folder where you saved your file and drag & drop the file into your Finder's toolbar (You have to hold the file above the toolbar for about a second and then drop it to make it work)
now, by clicking the icon in your toolbar, the finder will relaunch, toggling the state of hidden files (show/hide). clicking the icon again will toggle back.
it's a simple applescript that edits Finder's preferences file and relaunches Finder.

WARNING: hidden files are hidden for a reason. Use this script only if you know what you're doing. I hold no responsibility for f*cked up macs.