Though I wrote the plugin initially for personal use, now the same is available for you to use in your WordPress sites. Link: https://wordpress.org/plugins/wp-showgithubfile/ You can either download it from the directory, or install directly within your WordPress installation. Here is a live demo of the plugin: