Skip to content

Instantly share code, notes, and snippets.

find . -type f -print0 | xargs -0 md5sum > md5list.txt
perl -ne '/^(\S+)\s+(.+)/ and push @{$h{$1}},$2}{@$v>1&&print join"\n\t",$k,@$v,"\n"while($k,$v)=each%h' md5list.txt
@qgp9
qgp9 / benchmark.sh
Last active August 29, 2015 14:20
Prime Factor
#!/bin/bash
TargetNumber=${1:-5712925402340856}
{
echo "##### Target Number = $TargetNumber"
echo
echo -n "##### primeFactor.pl : perl ";perl -E'say $^V'
time ./primeFactor.pl $TargetNumber
echo
@qgp9
qgp9 / decay.pl
Last active January 14, 2017 13:34
Simple decay simulation
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
my @PNS = ( 3, 4, 5, 6 );
my $lambda = 0.1;
for my $PN ( @PNS ){