Skip to content

Instantly share code, notes, and snippets.

@h4ck3rm1k3
Created November 11, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4ck3rm1k3/c84e05906e70549aea94 to your computer and use it in GitHub Desktop.
Save h4ck3rm1k3/c84e05906e70549aea94 to your computer and use it in GitHub Desktop.
No agenda donation generator
my $data = <<END;
shut up slave
in the morning
hit people in the mouth
glitch
deconflicting
juice
END
my $btc = 326.43;
my $t = 0;
print "<table border='1' cellpadding='1' cellspacing='1' style='width:50%;background-color:#ffffcc;border-collapse:collapse;border:1px solid #ffcc00'>";
print "<thead><tr><th>Term</th><th>Ascii</th><th>Bitcoin</th><th>Total</th></tr>\n</thead><tbody>";
for my $l (split("\n",$data)) {
my $l2 = "0.";
for my $c (split("",$l)) {
my $o = unpack("W",$c);
$l2 .= $o;
#print "C : $c $o\n";
}
my $b = $btc * $l2;
$t += $b;
print "<tr>
<td>$l</td>
<td>$l2</td>
<td>$b</td>
<td>$t</td>
</tr>\n";
}
print "</tbody></table>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment