Having inadvertently run
rm -rf ~/.foo whilst connected in via my laptop, I needed to restore that folder back via Time Machine.
Here are the steps I took to get it back,
Renamed the folder as
mv ~/.foo ~/_fooso that it is no longer hidden, and I can delete it manually — this was only needed as some files within this folder were being accessed by my irssi client at the time; so you may not have to do this.
defaults write com.apple.finder AppleShowAllFiles YESand
Run Time Machine, pick the folder you want to replace. BOOM!
defaults write com.apple.finder AppleShowAllFiles NOand
Note: Notice that finder is explicitly
Finder in the commands above!