How do I configure an .osx file?
Select settings that look interesting, paste them in a terminal, and then quit and reopen applications to try them out.

You might also save the whole script as for example ~/.osx and then run bash ~/.osx in a terminal. It includes commands for things like changing the computer name though.

The defaults commands modify files like ~/Library/Preferences/.GlobalPreferences.plist, and you only have to run them once. Adding them to .bash_profile would only make your shell startup time longer. You might keep a personal file like .osx though in case you make a clean installation of OS X. And for example chflags nohidden ~/Library has to be run again after every OS X update.

I have a file like .osx only for settings that can't be changed from the UI (defaults.txt). I think it's easier to transfer settings to new OS X installations by recreating them manually, by copying the plist files, or by using Migration Assistant.