9 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Base64;
use IO::All;
my $g = io($ARGV[0])->binary->all;
print '<IMG SRC="data:image/png;base64,', encode_base64($g), '" alt=""/>';
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Base64;
use IO::All;
use YAML;
my %files = ();
for my $to_store (@ARGV) {
$files{$to_store} = encode_base64(io($to_store)->binary->all);
}
print Dump %files;
1
2
3
4
5
6
--- pack_files.pl
--- |
IyEvdXNyL2Jpbi9wZXJsCgp1c2Ugc3RyaWN0Owp1c2Ugd2FybmluZ3M7Cgp1c2UgTUlNRTo6QmFz
ZTY0Owp1c2UgSU86OkFsbDsKdXNlIFlBTUw7CgpteSAlZmlsZXMgPSAoKTsKCmZvciBteSAkdG9f
c3RvcmUgKEBBUkdWKSB7CiAgICAkZmlsZXN7JHRvX3N0b3JlfSA9IGVuY29kZV9iYXNlNjQoaW8o
JHRvX3N0b3JlKS0+YmluYXJ5LT5hbGwpOwp9CgpwcmludCBEdW1wICVmaWxlczs=
9 Einträge, 1 Seite |