Embed gists, then reuse portions of them preserving their original line numbers (also, only retrieves each gist once... reusing it for additional references in your page).
First, include jQuery then the gist-embed-customized.js file.
Next, in your html...
To display a full gist:
<code id="gist-6104937"></code>
To display a range of lines from a gist:
<code id="gist-6104937" data-line="11-20"></code>
To display a discrete selection of lines from a gist:
<code id="gist-6104937" data-line="5,10,14"></code>
See the included sampleindex.html file for more examples.