I can confirm that the content from a github gist, embedded in a page counts as the page's content for Google. The good thing is that you can test it.
The following gist contains a specific/unique base64 encoded string which is embedded on a website (you can find it here and test it: https://timberlin.de/link-maskierung-javascript-base64/ [disclosure: the content was written by me]
Here is the google search result for it:
If you search in google for the specific string, the URL is shown as result. I.e. the indexing works and google renders the script.