Emacs Org-mode's org-babel functionality. I have a few org-mode files storing all the dotfiles, put under version control. I can update and deploy them from within Emacs.
fascinating. never heard of doing something like this, though i use emacs all day long (but not org mode -- didn't even know org mode could do this).
https://github.com/skx/dotfiles/tree/master/.emacs.d
In there you'll find ~/.emacs/init.el which parses ~/.emacs/init.md which is a markdown file containing both documentation and executable Lisp.
There are other files in separate directories/packages, but I like the idea of placing everything in one readable file:
https://github.com/skx/dotfiles/blob/master/.emacs.d/init.md