Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (14 sloc) 0.392 kB
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple qw(get);
use HTML::Entities qw(encode_entities);
my $gist = shift or die "No gist ID specified";
my $raw = get("http://gist.github.com/${gist}.txt");
my $escaped = encode_entities($raw);
chomp $escaped; # we add a newline unconditionally below
print <<HTML;
<pre id="fake-gist-$gist" class="fake-gist">
$escaped
</pre>
HTML
Jump to Line
Something went wrong with that request. Please try again.