Skip to content

Instantly share code, notes, and snippets.

View rustyconover's full-sized avatar
🕶️
The future is so bright.

Rusty Conover rustyconover

🕶️
The future is so bright.
View GitHub Profile
use strict;
use warnings;
use Benchmark;
use Crypt::ScryptKDF qw(scrypt_hash random_bytes);
my $types = {
map {
my $v = $_;
$v => sub {
scrypt_hash("s3kr1t_password", random_bytes(), 2**$v, 8, 1, 32);
% These are the standard size rules, they list the tier and the
% limitations.
%
% Record format: Tier name, longest, median, shortest, max lenght plus
% girth, is media flag, max weight
standard_size_tier_rule(product_size_tier_small_standard_size, 15, 12, 0.75, _, 1, 14/16).
standard_size_tier_rule(product_size_tier_small_standard_size, 15, 12, 0.75, _, 0, 12/16).
standard_size_tier_rule(product_size_tier_large_standard_size, 18, 14, 8, _, _, 20).
% Determine the rules that are standard size tiers
#!/usr/bin/perl
# Resolve many domain names at a TLD for the zone asynchronously.
#
# Author: Rusty Conover <rusty@luckydinosaur.com>
#
use strict;
use warnings;
use AnyEvent::DNS;
use AnyEvent;