This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Crypt::OpenSSL::Bignum; | |
use Crypt::OpenSSL::EC; | |
use Crypt::RIPEMD160; | |
use Digest::SHA qw(sha256); | |
use Encode::Base58::GMP; | |
sub wif2addr { | |
my $wif = shift; | |
my $bytes = pack 'H*', decode_base58($wif, 'bitcoin')->Rmpz_get_str(16); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.012; | |
use warnings; | |
use XML::LibXML::Reader; | |
my $reader = XML::LibXML::Reader->new(IO => \*STDIN); | |
my $xpc = XML::LibXML::XPathContext->new; | |
$xpc->registerNs('w', 'http://www.mediawiki.org/xml/export-0.10/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SolveMedia Captcha Tweaks | |
// @namespace http://gist.github.com/gray | |
// @description Make the SolveMedia captcha less annoying | |
// @include * | |
// @grant none | |
// ==/UserScript== | |
// Remove the captcha iframe wrapper from the tab order, so a single tab | |
// brings focus to the input field. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.012; | |
use warnings; | |
use File::Temp; | |
use IPC::System::Simple qw(capture system); | |
use LWP::UserAgent; | |
use URI; | |
use URI::QueryParam; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bitcoin-cli listunspent 0 \ | |
| jq -r 'group_by(.address) | map({ | |
address: .[0].address, | |
amount: map(0, select(.spendable == true).amount) | add | |
}) | .[] | .address + ": " + (.amount | @text)' \ | |
| awk '{printf "%s %.8f\n", $1, $2}' \ | |
| sort -n -r -k 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will capture the contents of the div of interest, including any nested div tags. | |
use 5.010; | |
my ($div) = $content =~ m[ | |
\Q<div id="matchme">\E | |
( (?> [^<]++ | <(?!/?div\b) | <div\b[^>]*+>(?1)</div> )*+ ) | |
</div> | |
]x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = isset($_GET['t']) ? $_GET['t'] : '0.0000005'; | |
$width = 140; | |
$height = 32; | |
$img = imagecreate(140, 32); | |
$white = imagecolorallocate($img, 255, 255, 255); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.014; | |
use warnings; | |
use Carp::Always; | |
use ElasticSearch; | |
use File::Spec::Functions qw(catfile tmpdir); | |
use LWP::UserAgent; | |
use PerlIO::gzip; |
NewerOlder