Permalink
Browse files

generate a hash of all the stuff in data/ with perl

  • Loading branch information...
1 parent 2dbea79 commit a4ef9b3dbf4b3ce1ea8a349fc0b0a3a7df555457 @substack substack committed Nov 20, 2010
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1 @@
+{"data/data-png.png":"548520f69c729f360a0aa4551ba0960b","data/data-rand-14":"3248419b78b256c7adafc95248c14137","data/data-rand-13":"648b78d7ee4a7a0af2d3dbda8d7b7d57","data/data-rand-17":"1de788e6b3210265d9ca6c7074ad3fd2","data/data-rand-03":"21cfce2fd1139ee2cc183ecc77a4f5e5","data/data-rand-20":"1c5eec2b5f512e13151991e47d40938c","data/data-rand-12":"94ee2ba841d27338654dea8b1fa4d4d8","data/data-rand-05":"6e69465580a7bb42deef6c6ea53973af","data/data-rand-19":"a4941ce69f9f2fb5fdc6a97aa529d166","data/data-rand-01":"ac629c88b103d231bd72e5502af32475","data/data-rand-15":"6ca1d38ee971bd48f597ad72700415f0","data/data-png.png-node-out":"d41d8cd98f00b204e9800998ecf8427e","data/data-png.png-perl-out":"a51e0d8830aa136db584b6b483a2f932","data/data-rand-18":"74212ef8822144f95d26da9e27389615","data/data-rand-07":"8dee8bfd7af68b16c4f4f6ac570243ad","data/data-rand-10":"0f962d76955f3396da02894ced195214","data/data-rand-16":"ba8481f2fc2a5e60fcc6377876cd458d","data/data-rand-02":"a1d7280e597a234ed64381c2d3f5d63f","data/data-rand-11":"2fd15bf19a5f3862758d1bd7518c5043","data/data-rand-09":"6e67528dd61a9fcf5ff69a765b574b83","data/data-source-code.c":"3aed4614a67e69869515deb764ad571e","data/data-rand-06":"27d78faea63cb97f4413d715656ecb42","data/data-rand-04":"e8226d7cde3421de741dd5b0b03a55cd","data/data-rand-08":"8759d2d8a3af80bc66ba11a598c82818"}
View
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+use MIME::Base64 qw/encode_base64/;
+use Digest::MD5 qw/md5_hex/;
+use JSON qw/encode_json/;
+use Slurp qw/slurp/;
+
+print encode_json({ map {
+ $_ => md5_hex(encode_base64(slurp($_)))
+} glob "data/*" });
File renamed without changes.
@@ -1,11 +0,0 @@
-#!/usr/bin/perl
-
-use MIME::Base64 qw(encode_base64);
-
-my $filename = shift || die "no filename, use me as `$0 <filename>`";
-
-open my $file, '<', $filename or die "$!";
-while (read($file, $buf, 60*57)) {
- print encode_base64($buf, '');
-}
-

0 comments on commit a4ef9b3

Please sign in to comment.