This file contains 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
function gen_keys { | |
[ -z "$1" ] && { echo "Usage: $FUNCNAME passphrase"; return 1; } | |
local passphrase="$1" privatekey=$(mktemp) publickey=$(mktemp) | |
openssl genrsa -aes128 -passout pass:"$passphrase" -out $privatekey 2048 >/dev/null | |
openssl rsa -in $privatekey -passin pass:"$passphrase" -pubout -out $publickey >/dev/null | |
printf "Private Key: %s\nPublic Key: %s\n" $privatekey $publickey | |
} | |
function sign_file { | |
[ -z "$2" ] && { echo "Usage: $FUNCNAME file privatekey publickey"; return 1; } |
This file contains 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
#!/bin/bash | |
PERL_STABLE="5.26.0" | |
echo '%< --- installing perlbrew ---' | |
echo | |
echo 'If this fails, apt install build-essential' | |
curl -kL http://install.perlbrew.pl | bash | |
source ~/perl5/perlbrew/etc/bashrc |
This file contains 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 | |
package Mojo::URLQueue; | |
use Mojo::Base 'Mojo::EventEmitter'; | |
use Mojo::UserAgent; | |
has queue => sub { [] }; | |
has ua => sub { Mojo::UserAgent->new(max_redirects => 5) }; | |
has concurrency => 4; |